Audio for SL Converter v2.0
A tool to quickly convert audio to be suitable for SL upload.
24 / 02 / 2024
Now updated to split to 29.9s
Script on this page was updated too.
Use this tool to convert audio files to be suitable for uploading to Second Life.
It will split the audio into 29.9s chunks with correct sample rate for Second Life. The audio volume will also be normalized.
Notices / Disclaimer
Disclaimer
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgements
Code is used from the following open source projects:
- nAudio: http://naudio.codeplex.com
- normalizer: https://neon1.net/prog/normalizer.html
- mediatoolkit https://www.mediatoolkit.com
- mediainfo https://mediaarea.net/en-us/MediaInfo
Download
Script
Simple script for putting in a music/sound box (This ones for the 29.9s version. Scroll down for 10s version)
integer playing = FALSE;
integer numAudioFiles = 0;
integer position = 0;
default
{
state_entry()
{
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
}
touch_start(integer num_detected)
{
playing = !playing;
if (playing)
{
numAudioFiles = llGetInventoryNumber(INVENTORY_SOUND);
if (numAudioFiles == 0)
{
llSay(DEBUG_CHANNEL, "You need to put your sounds in me first!");
playing = FALSE;
return;
}
llSetText("Preloading, Please Wait", <0.5,0.5,0.5>, 0.5);
llPlaySound("1", 0.01);
llSleep(9.9);
llSetTimerEvent(29.9);
llSetText("Playing", <0.5,0.5,0.5>, 0.5);
llTriggerSound("1", 1.0);
llPlaySound("2", 0.01);
position = 2;
}
else
{
llSetTimerEvent(FALSE);
llSay(0, "Stopping");
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
}
}
timer()
{
llTriggerSound((string)position, 1.0);
position = position + 1;
if (position < numAudioFiles || position == numAudioFiles)
{
llPlaySound((string)position, 0.01);
}
else
{
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
llSetTimerEvent(FALSE);
playing = FALSE;
}
}
}
Audio for SL Converter v1.0 (OLD VERSION)
What it does
Feed it an audio file such as an mp3 and it will
- Normalize the volume to be appropriate for SL
- Split the audio file into numbered 9.9s .wav segments so they can be uploaded to SL
Enjoy uploading your sounds!
Notices / Disclaimer
Disclaimer
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgements
Code is used from the following open source projects:
- nAudio: http://naudio.codeplex.com
- normalizer: https://neon1.net/prog/normalizer.html
- mediatoolkit https://www.mediatoolkit.com
- mediainfo https://mediaarea.net/en-us/MediaInfo
Download (OLD VERSION)
Script (OLD VERSION)
For putting in a sound/music box
integer playing = FALSE;
integer numAudioFiles = 0;
integer position = 0;
default
{
state_entry()
{
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
}
touch_start(integer num_detected)
{
playing = !playing;
if (playing)
{
numAudioFiles = llGetInventoryNumber(INVENTORY_SOUND);
if (numAudioFiles == 0)
{
llSay(DEBUG_CHANNEL, "You need to put your sounds in me first!");
playing = FALSE;
return;
}
llSetText("Preloading, Please Wait", <0.5,0.5,0.5>, 0.5);
position = 1;
llSetTimerEvent(9.9);
llPreloadSound("1");
}
else
{
llSetTimerEvent(FALSE);
llSay(0, "Stopping");
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
}
}
timer()
{
llTriggerSound((string)position, 1.0);
llSetText("Playing", <0.5,0.5,0.5>, 0.5);
position = position + 1;
if (position < numAudioFiles || position == numAudioFiles)
{
llPreloadSound((string)position);
}
else
{
llSetText("Click to play", <0.5,0.5,0.5>, 0.5);
llSetTimerEvent(FALSE);
playing = FALSE;
}
}
}