Join us in Outworldz at www.outworldz.com:9000 or follow us:
42 minute music and speech player/broadcaster for Second Life.
Ever been to a museum and been given a headset and player that speaks and plays music whenever you get next to an exhibit? This set of scripts and one prim makes that happen in Second Life or OpenSim. It's ideal for artists, exhibits, sim owners, and landowners anywhere. You can use it to tell the story of your world, to announce what a piece of art is about, give directions ("you are on the path to ..."), or anything else you dream up. You can play any length of music, spoken words, or chat to speech from my free text-to-wav file program, up to 43 minutes long, without using shared media. You can single play, or loop forever, too.
It takes just one prim per station, and since you already have prims in your artwork, you can just add the music and one script to it and it will take up ZERO prims. Anyone next to the sensor script will hear it play whatever you want. The sounds stop when you walk away, and start up at the next exhibit. It's also easy to convert to a music player for Second Life that can play up to 45 minutes of continuous music!
The original idea came from an project I made using shared media. It didn't work very well, as no one enabled shared media on a prim. But Noke Yuitza, a noted choreographer, theatrical designer, and Second Life artist, asked for this for her exhibit for the Linden Endowment for the Arts, and it is so useful I had to post it for everyone to use. Thanks, Noke!
There are many ways to use this: to as a single prim, where anyone can
hear it in world, or as a headset and broadcaster prim, or as a HUD for privacy.
|Multiple users can hear the sounds and music playing continuously as they walk nearby.||A set of mesh headphones lets you see who is listening to your exhibit||Privacy is gained by wearing a HUD, where only a person wearing the HUD can hear sounds played by the broadcast prim.|
Want to play MP3 files, too?
You can only play wav files in SL, but since you probably want MP3 capability, here is a free and easy way to batch convert MP3 files to Wav files.
Scripting Single-Prim ModeThis mode useful to give out instructions at the landing point, or speak or play music anywhere else that people walk or stand. Anyone can hear the music or sounds.
All of your wav audio files and both the sensor script and a player script are put into a prim. The system will detect any avatar that is nearby and trigger the sounds to start playing in order. The sounds will stop when all avatars have left the area.
You can also delete the sensor script. Touch the prim and the music will start to play. You should then change Looping variable below so it will loop forever:
There is a variable 'loop = FALSE' in the player script that can be set to play them once, or to loop forever by setting loop = TRUE. It is set to play the files one time as a default.
integer loop=FALSE; to integer loop=TRUE;
Scripting a prim headset
Put the HUD player script into a prim such as this free mesh headset and wear it. Anyone near the prim with the sensor script will play the sounds. This also lets you see that your visitor is correctly using the system.
You will need to put the wav files and the Sensor.lsl script inside a prim near the artwork or exhibit. When someone stands next to the exhibit, the sounds will play.
Here is a nice set of mesh earphones by Geraldo Cockerham. I've converted it to Second Life format, and reworked the textures to be much smaller. It is licensed as Creative Commons/BY/SA, which means you can use it for free as long as you credit Geraldo and share it with others.
Download the headset, upload it to Second Life with the texture upload enabled, and add the Player script inside the headset and wear it. Whenever you get near the exhibit prim, the sounds will play.
Scripting HUD mode
The system acts like a 'museum recorder' in HUD mode. Only the HUD owner can hear it, just like museum headphones. The system is triggered whenever someone stands in front of an exhibit. You can have as many different exhibits as you like, and the wave files can be updated at the exhibit prim.
Here is a small plywood prim showing it in use:
script and music files are placed in one prim that will detect avatars.
is placed in a second prim that must be attached to the avatar as a HUD.
The HUD can be invisible, or not.
Now just make the HUD into a small box, 0.020" X 0.20 and attach the prim as a HUD to any HUD position. You can make it invisible, or add a logo.
How to make 10 second Wav files for Second Life
Wav files must be in 44.1 kHz wav format and must be no longer than 10 seconds for Second Life or OpenSim. If you have MP3 files, you need to convert them with Goldwave, first.
To do this, use a great, free tool: Slice Audio File Splitter.
Now upload the 10 second wav files and put into your sensor prims. When
you walk up to your sensor, within a few seconds your music will play.
Back to the Best Free Tools in Second Life and OpenSim.