How to Upload Sounds to Second Life
42 minute music and oral communication 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 showroom? This fix of scripts and one prim makes that happen in Second Life or OpenSim. Information technology's ideal for artists, exhibits, sim owners, and landowners anywhere. You can use information technology to tell the story of your globe, to announce what a piece of art is nearly, give directions ("you are on the path to ..."), or anything else y'all dream up. You can play any length of music, spoken words, or conversation to speech from my free text-to-wav file program, up to 43 minutes long, without using shared media. You lot tin can single play, or loop forever, too.
It takes only one prim per station, and since you already accept prims in your artwork, you can just add the music and i script to it and it will take upward ZERO prims. Anyone side by side to the sensor script will hear it play whatever you want. The sounds end when you walk away, and start up at the next exhibit. Information technology's also easy to convert to a music actor for 2nd 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 showroom for the Linden Endowment for the Arts, and it is and so useful I had to postal service it for everyone to utilise. Cheers, Noke!
There are many ways to use this: to as a single prim, where anyone tin can hear it in globe, or every bit a headset and broadcaster prim, or every bit a HUD for privacy.
Want to play MP3 files, also?
Yous tin only play wav files in SL, but since you probably want MP3 capability, here is a free and easy manner to batch convert MP3 files to Wav files.
Scripts:
All the scripts are located in my free script library. There are two sets of scripts, one for standalone, single prim mode, and a fix for use for HUD or headphone utilize.
Scripting Single-Prim Way
This mode useful to give out instructions at the landing point, or speak or play music anywhere else that people walk or stand. Anyone tin 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 volition detect any avatar that is nearby and trigger the sounds to get-go playing in order. The sounds will finish when all avatars take left the area.
You tin can also delete the sensor script. Affect the prim and the music will commencement to play. You should then change Looping variable beneath so it will loop forever:
Looping:
In that location is a variable 'loop = FALSE' in the actor script that tin be set to play them in one case, or to loop forever by setting loop = Truthful. It is prepare 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 every bit this free mesh headset and wear it. Anyone near the prim with the sensor script will play the sounds. This also lets y'all encounter that your visitor is correctly using the system.
You lot will need to put the wav files and the Sensor.lsl script within a prim near the artwork or exhibit. When someone stands side by side to the showroom, the sounds will play.
Here is a nice ready of mesh earphones by Geraldo Cockerham. I've converted information technology to 2d Life format, and reworked the textures to be much smaller. Information technology is licensed equally Artistic Commons/By/SA, which means you tin utilise it for costless 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 Histrion script within the headset and clothing it. Whenever you get near the showroom prim, the sounds volition play.
Scripting HUD manner
The organization acts like a 'museum recorder' in HUD way. Just the HUD owner tin can hear it, just like museum headphones. The organisation is triggered whenever someone stands in front of an exhibit. You tin accept 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:
\
The Sensor.lsl script and music files are placed in i prim that will detect avatars. The Music_script.lsl is placed in a second prim that must be attached to the avatar equally a HUD. The HUD tin can be invisible, or not.
Now just make the HUD into a pocket-size box, 0.020" X 0.20 and attach the prim as a HUD to any HUD position. You can make information technology invisible, or add a logo.
How to make 10 second Wav files for Second Life
Wav files must exist in 44.i kHz wav format and must be no longer than 10 seconds for 2d Life or OpenSim. If y'all have MP3 files, you need to convert them with Goldwave, first.
To practice this, use a smashing, 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, inside a few seconds your music volition play.
mungomerycallibed.blogspot.com
Source: https://outworldz.com/secondlife/posts/musicplayer/