


#Lsl play sound code
It seems she liked it enough to create the code and I am happy I started the conversation. Where Cinder Roxley added the code 22 March 2016. In which I added information I found just now at: (using Isolde Caron name) (on 14 February 2016) I have given most of them to a couple of friends and they love it. I am using these in my varregion in Metropolis to play songs and it is pretty cool. On 11 February 2016 I created this blogpage:ĭue to some conversations on g+ and my own testing. Link_message(integer sender_number, integer number, string message, key id) I_playcounter++ //increment for next wave file in sequence! LlPreloadSound(llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload)) Preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload) If(i_playcounter + waves_to_preload <= (total_wave_files -1)) Playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter) If( i_playcounter > (total_wave_files -1) ) Integer local_total_wave_files = total_wave_files -1 įor (counter = 0 counter, set_text_alpha) LlSetSoundQueueing(TRUE) // only works on llPlaySound not llTriggerSound, so we can queue these silently
#Lsl play sound full
Integer counter = 0 //do full preload of sound Total_wave_files = llGetInventoryNumber(INVENTORY_SOUND) String playing_wave_name // the name of the wave being played String preloading_wave_name // the name of the wave file being preloaded Integer i_playcounter // used by timer() player Integer total_wave_files // number of wave files times just below 60 seconds are suitable as we use sound queueing Vector set_text_colour = // colour of floating text label ( white)įloat timer_interval = 60.0 // time interval between requesting server to play the next 60 second wave Integer secret_channel = 54345 // just a magic number Integer waves_to_preload = 2 // wave files to Preload ahead of the wav being played.įloat preload_load_time = 0.0 // seconds pause between each preloaded wave file attempt b4 play commences Integer debugflag = FALSE // chat debug info to owner if TRUE Integer loop = TRUE // set to TRUE to loop again and againįloat set_text_alpha = 1 // the text transparency fo alpha text. modified for 60 second or less sounds when Meerkat viewer uploads them Isolde Caron 3.11.16 Send a link message string of 'play' and 'stop' for use with external control scripts. Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.
#Lsl play sound free
A great free tool to make these files is the slice audio file splitter at Drop 10 second song clips in the inventory of the obect, and touch to play. This script cannot be sold even as part of another object, it must always remain free and fully modifiable. This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License. May be triggered to run continually, start it by touching it or use the sensor script when someone gets nearby. Trigger it with a link message, the above sensor script, or touch the prim Can play up to 254 10 second clips in sequence. You can leave this script out and just use the music player. This will detect any avatar coming nearby and trigger the music from the beginning.

Sensor Script - Put this in a prim along with the Music script and as many 60 second or less sound clips as you want. Have fun and let me know how it goes for you also, if you wish-)Ĭode: Select all // Script Name: Music_Box.lsl I don't yet know how long the file can be, perhaps someone may test that, the one on freesound is almost 1 minute long. I can imagine quite a few ways I can use this. I then put it in a prim with a touch to start sound script and it played there as well.

Then started Meerkat in my own simonastick, it worked there, so then on Kitely. I then exported it as a type ".wav microsoft signed 16 bit pcm" Used to change the project rate (bottom left side of the program) to "44100". I got some long files from (that is one file I used to test it) Here that is, choose your own flavor but I used "Meerkat_0-2-2-211_Setup.exe" In a discussion in another place someone mentioned that the Meerkat viewer could upload longer sound files. I just discovered that I can now upload sounds longer than 10 seconds!
