Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Wav files

Natasha Bakalava
Registered User
Join date: 30 Jun 2005
Posts: 2
04-11-2006 14:18
I'm not sure if this is the right place to ask this, but don't know where else to put it. I have a .wav file I would like to cut into 10 second segments to upload and string together. Do I need a special program to cut the file into smaller segments?
Buxton Malaprop
Mad Physicist
Join date: 8 Jun 2005
Posts: 118
04-11-2006 16:06
You need any half-way-good audio editor. For something fairly simple and free, I'd suggest Audacity (for Windows, Mac and Linux).

Please note that the end result will probably be horrible. There'll be a noticable glitch between segments, possibly big pauses if they don't load quickly enough. *Please* do not use the LSL sound functions when you should be using the proper Streaming Media features.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-11-2006 16:24
From: Buxton Malaprop
Please note that the end result will probably be horrible. There'll be a noticable glitch between segments, possibly big pauses if they don't load quickly enough. *Please* do not use the LSL sound functions when you should be using the proper Streaming Media features.

The end result doesn't have to be horrible. In fact it can work VERY well if the cuts are precise. This method was the norm, if you recall, before streaming was implimented. It still is the norm for audio devices that need to be portable, and for audio files that can't be streamed. Not everyone's got a server to stream FROM, even if they have land to stream TO, afterall.

Natahsha, since I'm not much of a scripter myself, I'm afraid I can't help you except to say yes, it can be done. I've been given a few "radios" here and there that have music stored inside them, arranged in 9-second clips, and played back just as you described. They've all worked flawlessly.

The scripts in these devices have always been no-mod so I'm sorry to say I can't see them to tell you how they work. I could tell you how to play one clip at a time, but I don't know exactly how to get the, all to play in sequence, or to preload them so there are no gaps. I'm sure it can't be all that hard to do though. Keep asking around, and I'm sure someone will explain how. It's pretty common.

So, as long as you've got the copyright to whatever audio files you're talking about, go for it.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-12-2006 04:04
There are some tricks to it - but ultimately it is an artform.

Your clips must actually be shorter than 10s, 9.9 works just fine... but

It's better to go through and do it by ear - find the places that the music stops, changes, pauses etc. and divide it there if you can. Obviously if you've got something that does that a lot wait and choose one as close to but under 10s as possible rather than every possible point.

llPlaySound will let you play a sound, llPreloadSound will let you load the next one so it plays on more or less seamlessly - a search of the scripting library for sound scripts by Thilli Playfair will give you a script that works just fine. You just have to put your sounds into the prim with the script, make sure the sounds are in the right alphanumeric order (sound1, sound2 etc. works just fine), and touch the prim, off you go...

Audacity is good, Amadeus is excellent if you're a mac user for the sound editing software (I use both as each does some things better than the other) but it's a judge by ear thing still that gives the best results rather than a hard and fast automated 9.9s chop.
Natasha Bakalava
Registered User
Join date: 30 Jun 2005
Posts: 2
04-12-2006 11:00
Thanks so much for the tips folks. You've given me a good starting point. And yes Chosen, I need something portable. I love playing bluegrass-style mandolin, so I'm making a mandolin attachment and am attempting to upload files of me actually playing. Since all the tunes are in public domain, I don't have to worry about copyrights. Thanks again guys.