Jump to content
  • 0

Question about full lenght songs


MIVIMEX
 Share

You are about to reply to a thread that has been inactive for 2191 days.

Please take a moment to consider if this thread is worth bumping.

Question

Hello! A question about full lenght songs. Why do some sound files start to play faster than others? I use the usual music player, but I have to wait for the song to be loaded. Some songs are played almost immediately, others have to wait. And does not depend on that for the first or the tenth time I listen to the song. On what does it depend? Any help please! 

Thanks!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

It depends on how the script has been written. In order to hear a sound file in SL, you need to have it preloaded into the sound cache on your own computer. (A cache is a temporary storage location that stores new information locally so that your computer doesn't need to keep downloading it over and over again each time you encounter it on the Internet.)  If it's not preloaded, the sound will be muted the first time it is played within your hearing range. A full-length song consists of several 10-second sound bites stitched together to make the whole song, so each of those separate 10-second sound bites has to be preloaded.

There are two ways to do it. One way is to use a scripting function, llPreloadSound.  The other way, which turns out to be more reliable, is to play the sound with the volume turned down to zero.  Either method lets your computer's sound system "hear" the sound before it is played at full volume for you to enjoy.  As you might guess, preloading takes time.  The longer the song, the more 10-second sound bites have to be preloaded.  Using the most reliable method takes a little longer than using llPreloadSound too.  As a result, some songs may have a longer delay then others before you can hear them.

Then there's the matter of your own computer.  Once it has "heard" a song and loaded it into its sound cache, the computer should be able to hear it over and over again without more preloading.  Cache is a temporary storage facility, however.  Older sounds are gradually removed to make room for newer ones.  If your cache is rather small and you are listening to many sounds, a preloaded bit of music that you heard last week or even yesterday might already have vanished.  That's true for all of the various caches in your computer, so that's why it is rarely a good idea to clear your cache files, and why it is always a good idea to make them as large as your computer will allow.

 

Edited by Rolig Loon
  • Thanks 1
Link to comment
Share on other sites

  • 0
16 minutes ago, Rolig Loon said:

...

There are two ways to do it. One way is to use a scripting function, llPreloadSound

...

 

@Rolig Loon

Thank you for answer!

Yes, I'm using script with scripting function llPreloadSound. But how to explain that some sound files start to play faster than others even for different people?

Link to comment
Share on other sites

  • 0
15 minutes ago, MIVIMEX said:

But how to explain that some sound files start to play faster than others even for different people?

If some people already have the sound files cached on their computers, they won't need to preload them a second time unless the cached version has expired. The sound cache size varies from one computer to another, and so does each computer's efficiency at accessing cached information, to say nothing of the data transfer rate over the Internet.  There are too many variables in play, so saying exactly why one person waits a little longer than another is impossible. 

11 minutes ago, MIVIMEX said:

Сan this depend on the object in which the script is placed and the length of the name of the sound file?

No.

  • Thanks 1
Link to comment
Share on other sites

  • 0

Just a simple thought about why one song loads faster than the other. It could easily be the COMPRESSION used in the sound file. Lots of choices for doing that and the end results make a big difference in the size of the file. 

  • Thanks 1
Link to comment
Share on other sites

  • 0

I don't think so, Chic, although it is an appealing idea.  SL requires audio of a specific format (44.1 KHz stereo WAV files), so "compression" (i.e. data compaction, like in an MP3 file) isn't a factor.  The other sort of audio "compression", the sort you can apply in a audio editing program like Audition, does not affect the file size.  It's a type of audio processing that increases the volume level of quiet passages, making the clip as a whole sound "louder", at the expense of decreasing the clip's dynamic range.

  • Thanks 1
Link to comment
Share on other sites

  • 0
1 hour ago, Lindal Kidd said:

I don't think so, Chic, although it is an appealing idea.  SL requires audio of a specific format (44.1 KHz stereo WAV files), so "compression" (i.e. data compaction, like in an MP3 file) isn't a factor.  The other sort of audio "compression", the sort you can apply in a audio editing program like Audition, does not affect the file size.  It's a type of audio processing that increases the volume level of quiet passages, making the clip as a whole sound "louder", at the expense of decreasing the clip's dynamic range.

Actually: 16-bit, 44.1 KHz, Mono, Uncompressed.WAV files. ~toothy grin~

@Chic Aeon I believe what @Lindal Kidd is saying is this: sound file data will be consistent - there is no compressing/uncompressing, etc.

However, there *could* be if you cheat: for example: compress a sound to 8-bit mono 11 KHz - then reconvert back to what SL wants - even though it is now back to 16-bit, 44.1KHz, etc - it still has LESS data - BUT, also sounds horrible. I wouldn;t be surprised if this is what the OP @MIVIMEX is actually experiencing: low-quality, low-grade audio files that have been upscaled, but still contain less data = begin downloading faster, but sound muddy.

  • Thanks 1
Link to comment
Share on other sites

  • 0
35 minutes ago, Alyona Su said:

However, there *could* be if you cheat: for example: compress a sound to 8-bit mono 11 KHz - then reconvert back to what SL wants - even though it is now back to 16-bit, 44.1KHz, etc - it still has LESS data - BUT, also sounds horrible. I wouldn;t be surprised if this is what the OP @MIVIMEX is actually experiencing: low-quality, low-grade audio files that have been upscaled, but still contain less data = begin downloading faster, but sound muddy.

I don't do sound files for SL (obviously) but I do know that sound compression has a lot to do with video files so that was my thought and I have noted music that seems "muddy" as you say so I was suspecting that is what happened. It would in some way answer the OP.   

So yes, your idea here is what I was thinking about :D. 

  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2191 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...