removed useless _ folders
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<Solution name="Radio Buttoned Sound Player">
|
||||
<Project name="Radio Buttoned Sound Player" path="Radio Buttoned Sound Player\Radio Buttoned Sound Player.prj" active="true"/>
|
||||
</Solution>
|
||||
@@ -0,0 +1,189 @@
|
||||
// :CATEGORY:Music
|
||||
// :NAME:Radio Buttoned Sound Player
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-09-08 19:06:13
|
||||
// :EDITED:2014-09-08
|
||||
// :ID:1042
|
||||
// :NUM:1633
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life, Opensim
|
||||
// :DESCRIPTION:
|
||||
// Music player for radios or paianos with multupole buttons and sounds..
|
||||
// Can play many 9-second clips in sequence.
|
||||
// Put this script in multile proims., Each prim gets unique wav files. Click a prim to play a music clip.
|
||||
// ************************************************************************************
|
||||
// You MUST add a channel number unique to the music in this prim to the description to use with the slave script..
|
||||
// You can use as many slave scripts in a region as you like. Change the channel number
|
||||
// to play more than one sound.
|
||||
// ************************************************************************************
|
||||
|
||||
// :CODE:
|
||||
// May be triggered to run continually, start it by touching it or use the sensor script when someone gets nearby.
|
||||
|
||||
// This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
|
||||
// http://creativecommons.org/licenses/by-nc/3.0/deed.en_US
|
||||
// This script cannot be sold even as part of another object, it must always remain free and fully modifiable.
|
||||
|
||||
// 10-09-2012 first released by Ferd Frederix
|
||||
// 01-05-2014 ev 1.1 change order of vars and set it to 9.0 seconds length files. added touch on/offRT
|
||||
// 9-27-2014 Rev 1.2 optimized for Opensim
|
||||
//
|
||||
// Drop 9 second song clips in the inventory of the obect, and touch to play. You an set the lenngth in timer_interval variable.
|
||||
// 9 seems to work well.
|
||||
// A great free tool to make these files is the slice audio file splitter at http://www.nch.com.au/splitter/index.html
|
||||
// Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.
|
||||
|
||||
// Scriptable Control:
|
||||
// Send a link message string of 'play' and 'stop' for use with external control scripts.
|
||||
// Or just touch the prim to play
|
||||
|
||||
|
||||
// tunable bumbers follow:
|
||||
integer debugflag = FALSE; // chat debug info to owner if TRUE
|
||||
float timer_interval = 8.9; // how long you sliced your wave files, must be less than 10. 9.0 is typical.
|
||||
float set_text_alpha = 1; //Set this to 0 to disable hovertext the text transparency fo alpha text.
|
||||
integer play_at_master = TRUE; // if TRUE, the master will play sounds, too. Set to FALSE and the Master will only broadcast to slaves.
|
||||
float VOLUME = 1.0; // 1.0 = full volume
|
||||
|
||||
// Stuff that you should not mess with:
|
||||
|
||||
integer preloadchannel ;
|
||||
integer playchannel ;
|
||||
|
||||
integer running = TRUE; // flag to say we are on
|
||||
vector set_text_colour = <1,1,1>; // colour of floating text label ( white)
|
||||
|
||||
|
||||
integer total_wave_files; // number of wave files
|
||||
integer i_playcounter; // used by timer() player
|
||||
|
||||
|
||||
DEBUG (string msg)
|
||||
{
|
||||
if (debugflag) llSay(0,msg);
|
||||
}
|
||||
|
||||
|
||||
go(integer play) {
|
||||
|
||||
if (play)
|
||||
{
|
||||
Preload();
|
||||
llSetTimerEvent(timer_interval);
|
||||
running = TRUE;
|
||||
llSetColor(<0,1,0>,ALL_SIDES);
|
||||
} else {
|
||||
llStopSound();
|
||||
running = FALSE;
|
||||
llSetTimerEvent(0.0);
|
||||
//llStopSound();
|
||||
DEBUG("Stopped");
|
||||
llSetText(llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
|
||||
llSetColor(<0,0,1>,ALL_SIDES);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Preload()
|
||||
{
|
||||
string preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
|
||||
llRegionSay(preloadchannel,preloading_wave_name); // tell slaves to preload a file
|
||||
DEBUG("Preloading wav: " + (string)i_playcounter + " " + (string) preloading_wave_name);
|
||||
llSetTimerEvent(2.0);
|
||||
// start playing
|
||||
}
|
||||
|
||||
Loadnext()
|
||||
{
|
||||
|
||||
i_playcounter ++;
|
||||
if (i_playcounter >= total_wave_files)
|
||||
i_playcounter = 0;
|
||||
|
||||
integer next = i_playcounter +1;
|
||||
if (next > total_wave_files)
|
||||
next = 0;
|
||||
|
||||
string preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
|
||||
llRegionSay(preloadchannel,preloading_wave_name); // tell slaves to preload a file
|
||||
DEBUG("Preloading wav: " + (string)i_playcounter + " " + (string) preloading_wave_name);
|
||||
llSetTimerEvent(timer_interval);
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llMessageLinked(LINK_SET,0,"stop","");
|
||||
total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
|
||||
llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
|
||||
preloadchannel = (integer) llGetObjectDesc();
|
||||
playchannel = preloadchannel +1;
|
||||
//set text above object to the name of the object
|
||||
llSetText(llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
go(TRUE);
|
||||
}
|
||||
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
if (!running) {
|
||||
llMessageLinked(LINK_SET,0,"stop","");
|
||||
llSetText("Starting\n" + llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
go(TRUE);
|
||||
} else {
|
||||
go(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
string playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
DEBUG("llPlaySound wav: " + (string)i_playcounter + " " + playing_wave_name );
|
||||
|
||||
llRegionSay(playchannel,playing_wave_name); // tell slaves to play a file
|
||||
if (play_at_master)
|
||||
llPlaySound(playing_wave_name,VOLUME);
|
||||
|
||||
|
||||
|
||||
string toplay = llGetInventoryName(INVENTORY_SOUND, i_playcounter );
|
||||
llSetText(toplay + "\n"
|
||||
+"Playing " + (string)(i_playcounter +1)
|
||||
+ " of " + (string)(total_wave_files) , set_text_colour, set_text_alpha);
|
||||
|
||||
DEBUG("Playing wav:"
|
||||
+ (string)(i_playcounter )
|
||||
+ ":"
|
||||
+ (string) toplay);
|
||||
|
||||
|
||||
Loadnext();
|
||||
}
|
||||
|
||||
link_message(integer sender_number, integer number, string message, key id)
|
||||
{
|
||||
DEBUG("Sender num " + (string) sender_number);
|
||||
DEBUG("Link num " + (string) llGetLinkNumber());
|
||||
if (sender_number == llGetLinkNumber())
|
||||
return;
|
||||
|
||||
if (message == "play")
|
||||
{
|
||||
go(TRUE);
|
||||
}
|
||||
else if (message == "stop")
|
||||
{
|
||||
go(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
on_rez(integer param)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
// :CATEGORY:Music
|
||||
// :NAME:Radio Buttoned Sound Player
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-09-08 19:05:37
|
||||
// :EDITED:2014-09-24
|
||||
// :ID:1042
|
||||
// :NUM:1631
|
||||
// :REV:1.1
|
||||
// :WORLD:Second Life, Opensim
|
||||
// :DESCRIPTION:
|
||||
// Music player for radios or paianos with multupole buttons and sounds..
|
||||
// Can play many 9-second clips in sequence.
|
||||
// Put this script in multile proims., Each prim gets unique wav files. Click a prim to play a music clip.
|
||||
// ************************************************************************************
|
||||
// You MUST add a channel number unique to the music in this prim to the description to use with the slave script..
|
||||
// You can use as many slave scripts in a region as you like. Change the channel number
|
||||
// to play more than one sound.
|
||||
// ************************************************************************************
|
||||
|
||||
// :CODE:
|
||||
// Rev 1.1: 09-18-2014 used llTriggerSOund instead of llPlaySOund for skipping in Firestorm
|
||||
|
||||
// May be triggered to run continually, start it by touching it or use the sensor script when someone gets nearby.
|
||||
|
||||
// This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
|
||||
// http://creativecommons.org/licenses/by-nc/3.0/deed.en_US
|
||||
// This script cannot be sold even as part of another object, it must always remain free and fully modifiable.
|
||||
|
||||
// 10-09-2012 first released by Ferd Frederix
|
||||
// 01-05-2014 ev 1.1 change order of vars and set it to 9.0 seconds length files. added touch on/offRT
|
||||
// 9-27-2014 Rev 1.2 optimized for Opensim
|
||||
//
|
||||
// Drop 9 second song clips in the inventory of the obect, and touch to play. You an set the lenngth in timer_interval variable.
|
||||
// 9 seems to work well.
|
||||
// A great free tool to make these files is the slice audio file splitter at http://www.nch.com.au/splitter/index.html
|
||||
// Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.
|
||||
|
||||
// Scriptable Control:
|
||||
// Send a link message string of 'play' and 'stop' for use with external control scripts.
|
||||
// Or just touch the prim to play
|
||||
|
||||
|
||||
// tunable bumbers follow:
|
||||
integer debugflag = FALSE; // chat debug info to owner if TRUE
|
||||
float timer_interval = 8.9; // how long you sliced your wave files, must be less than 10. 9.0 is typical.
|
||||
float set_text_alpha = 1; //Set this to 0 to disable hovertext the text transparency fo alpha text.
|
||||
integer play_at_master = TRUE; // if TRUE, the master will play sounds, too. Set to FALSE and the Master will only broadcast to slaves.
|
||||
float VOLUME = 1.0; // 1.0 = full volume
|
||||
|
||||
// Stuff that you should not mess with:
|
||||
|
||||
integer preloadchannel ;
|
||||
integer playchannel ;
|
||||
|
||||
integer running = TRUE; // flag to say we are on
|
||||
vector set_text_colour = <1,1,1>; // colour of floating text label ( white)
|
||||
|
||||
|
||||
integer total_wave_files; // number of wave files
|
||||
integer i_playcounter; // used by timer() player
|
||||
|
||||
|
||||
DEBUG (string msg)
|
||||
{
|
||||
if (debugflag) llSay(0,msg);
|
||||
}
|
||||
|
||||
|
||||
go(integer play) {
|
||||
|
||||
if (play)
|
||||
{
|
||||
Preload();
|
||||
llSetTimerEvent(timer_interval);
|
||||
running = TRUE;
|
||||
llSetColor(<0,1,0>,ALL_SIDES);
|
||||
} else {
|
||||
llStopSound();
|
||||
running = FALSE;
|
||||
llSetTimerEvent(0.0);
|
||||
//llStopSound();
|
||||
DEBUG("Stopped");
|
||||
llSetText(llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
|
||||
llSetColor(<0,0,1>,ALL_SIDES);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Preload()
|
||||
{
|
||||
string preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
|
||||
llRegionSay(preloadchannel,preloading_wave_name); // tell slaves to preload a file
|
||||
DEBUG("Preloading wav: " + (string)i_playcounter + " " + (string) preloading_wave_name);
|
||||
llSetTimerEvent(2.0);
|
||||
// start playing
|
||||
}
|
||||
|
||||
Loadnext()
|
||||
{
|
||||
|
||||
i_playcounter ++;
|
||||
if (i_playcounter >= total_wave_files)
|
||||
i_playcounter = 0;
|
||||
|
||||
integer next = i_playcounter +1;
|
||||
if (next > total_wave_files)
|
||||
next = 0;
|
||||
|
||||
string preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
|
||||
llRegionSay(preloadchannel,preloading_wave_name); // tell slaves to preload a file
|
||||
DEBUG("Preloading wav: " + (string)i_playcounter + " " + (string) preloading_wave_name);
|
||||
llSetTimerEvent(timer_interval);
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llMessageLinked(LINK_SET,0,"stop","");
|
||||
total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
|
||||
llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
|
||||
preloadchannel = (integer) llGetObjectDesc();
|
||||
playchannel = preloadchannel +1;
|
||||
//set text above object to the name of the object
|
||||
llSetText(llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
go(TRUE);
|
||||
}
|
||||
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
if (!running) {
|
||||
llMessageLinked(LINK_SET,0,"stop","");
|
||||
llSetText("Starting\n" + llGetInventoryName(INVENTORY_SOUND,0), <0,1,0>, set_text_alpha);
|
||||
go(TRUE);
|
||||
} else {
|
||||
go(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
string playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
|
||||
DEBUG("llPlaySound wav: " + (string)i_playcounter + " " + playing_wave_name );
|
||||
|
||||
llRegionSay(playchannel,playing_wave_name); // tell slaves to play a file
|
||||
if (play_at_master)
|
||||
llTriggerSound(playing_wave_name,VOLUME);
|
||||
|
||||
|
||||
|
||||
string toplay = llGetInventoryName(INVENTORY_SOUND, i_playcounter );
|
||||
llSetText(toplay + "\n"
|
||||
+"Playing " + (string)(i_playcounter +1)
|
||||
+ " of " + (string)(total_wave_files) , set_text_colour, set_text_alpha);
|
||||
|
||||
DEBUG("Playing wav:"
|
||||
+ (string)(i_playcounter )
|
||||
+ ":"
|
||||
+ (string) toplay);
|
||||
|
||||
|
||||
Loadnext();
|
||||
}
|
||||
|
||||
link_message(integer sender_number, integer number, string message, key id)
|
||||
{
|
||||
DEBUG("Sender num " + (string) sender_number);
|
||||
DEBUG("Link num " + (string) llGetLinkNumber());
|
||||
if (sender_number == llGetLinkNumber())
|
||||
return;
|
||||
|
||||
if (message == "play")
|
||||
{
|
||||
go(TRUE);
|
||||
}
|
||||
else if (message == "stop")
|
||||
{
|
||||
go(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
on_rez(integer param)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<Project name="Radio Buttoned Sound Player" guid="7114b6cb-cddc-4a21-a885-c5a4a2c4a296">
|
||||
<Object name="Button 2" guid="f2591b57-16ab-4459-9ea1-5102cdfb6e6d">
|
||||
<Script name="Master.lsl" guid="aceb7120-52c2-4f4d-acee-243275514d32">
|
||||
</Script>
|
||||
</Object>
|
||||
<Object name="Button1" guid="ca012130-a957-4caf-a0d3-baf09d4c0ca9" active="true">
|
||||
<Script name="Master.lsl" guid="3615a86f-6dc8-40a6-8509-90e1094b50ca">
|
||||
</Script>
|
||||
</Object>
|
||||
<Object name="Slave prim" guid="325a9fc3-ab3c-4066-b3f2-be0627d9751a">
|
||||
<Script name="Slave Script.lsl" guid="6b286920-505d-42c5-98e7-22fcacfb7b4b">
|
||||
</Script>
|
||||
</Object>
|
||||
<Object name="Stop Button" guid="64f13357-597c-459c-93ec-322bb7ed052b">
|
||||
<Script name="stop button.lsl" guid="42e4d06a-a5a2-4522-8318-0ced267e4a6d">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -0,0 +1,65 @@
|
||||
// :CATEGORY:Music
|
||||
// :NAME:Radio Buttoned Sound Player
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-09-08 19:06:13
|
||||
// :EDITED:2014-09-08
|
||||
// :ID:1042
|
||||
// :NUM:1634
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life, Opensim
|
||||
// :DESCRIPTION:
|
||||
// Radio/Music player slave script. Add the sound clips the same as in the master(s).
|
||||
// Put these about every 20-25 meters to spread sound through an entire region.
|
||||
// ************************************************************************************
|
||||
// You MUST add a channel number unique to the music in this prim to the description.
|
||||
// IT MUST match thje Master player(s)
|
||||
// ************************************************************************************
|
||||
|
||||
// :CODE:
|
||||
|
||||
|
||||
integer preloadchannel ;
|
||||
integer playchannel ;
|
||||
float text = 1.0; // set too to see debug title text
|
||||
|
||||
default
|
||||
{
|
||||
|
||||
state_entry()
|
||||
{
|
||||
preloadchannel = (integer) llGetObjectDesc();
|
||||
playchannel = preloadchannel + 1;
|
||||
llListen(preloadchannel,"","","");
|
||||
llListen(playchannel,"","","");
|
||||
llSetText("", <0,1,0>, 1.0);
|
||||
}
|
||||
|
||||
listen(integer channel, string name, key id, string music)
|
||||
{
|
||||
if (channel == playchannel)
|
||||
{
|
||||
llSetText(music + "\n playing", <0,1,0>, text);
|
||||
llPlaySound(music,1.0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
llSetText(music + "\npreloaded", <0,1,0>, text);
|
||||
llPreloadSound(music);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
changed(integer what)
|
||||
{
|
||||
if (what & CHANGED_INVENTORY)
|
||||
llResetScript();
|
||||
}
|
||||
|
||||
on_rez(integer param)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// :CATEGORY:Music
|
||||
// :NAME:Radio Buttoned Sound Player
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-09-08 19:06:13
|
||||
// :EDITED:2014-09-08
|
||||
// :ID:1042
|
||||
// :NUM:1632
|
||||
// :REV:1
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// A multi-selection Music Player for long lengths of music
|
||||
// :CODE:
|
||||
|
||||
|
||||
default
|
||||
{
|
||||
|
||||
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
|
||||
llMessageLinked(LINK_SET,0,"stop","");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
Binary file not shown.
Reference in New Issue
Block a user