the best way to optimise music

FirstDanFirstDan Member Posts: 208
hi

how can i best optimise my music files to ensure the best performance in my game?

i have a dozen music tracks and my sound effects in my project

Dan

Comments

  • famekraftsfamekrafts Member, BASIC Posts: 834
    I am also realising in later stages sound is causing some lag, or maybe it's for some other reason, I have to beta test it yet. A tip or two will help.
  • betatafbetataf Member Posts: 5
    Hello !

    I have another question , if i make a music who is more longer than the limit , how can do . i try to cut the music in 3 parts , and to play the other part after 30 seconds and minutes for the part 2 and 3 but that doesn't work in web preview , another idea ?
  • famekraftsfamekrafts Member, BASIC Posts: 834
    If you want optimise use small looping music, the bigger can creating lags. Look at every game out their, they use same looping music, even big games. If you want to use it use attributes and timer, say after 1 minutes the attribute changes to 2 so when it is 2 play the other music.
  • betatafbetataf Member Posts: 5
    Thank , i'm going to try
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited November 2012
    That's some good advice on optimizing music. I agree, you should TRY to keep music tracks to a simple 24-30 second loop, and that will keep the file size down. You could also take into consideration export settings. All my games use 24-30 second loops for the music, and I have them at somewhat high quality settings. Not CD quality, but higher quality than say AM radio.

    Usually a variable bitrate of 192-256 kbps, stereo, and at 44.100mhz. This can be considered overkill, but I take into consideration people playing with headphones, or on an iPod. The iPhone/iPad is not capable of true stereo, but the iPod is. And I like to do a lot of panning back and forth between left and right channels with both music, and sound effects, so this works best for me.

    You could get away with 128 kbps, mono and 44.100mhz. And I believe this would be the most popular setting amongst audio developers, when developing for iPhone. Maybe not, everybody is different.

    And if you want to push your luck, you could try 96kbps, and 22.000mhz, but you start losing noticeable quality in this range. Although, this seems to be a good setting for Android devices with their notorious sound issues. If you had to cut down more on file size, you COULD use these settings for sound effects, but like I said, you can hear the difference in quality at this range.
  • FirstDanFirstDan Member Posts: 208
    @SlickZero - thanks for the advice as you are an sound expert am i right?
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    I wouldn't consider myself an expert, exactly. But yes, I do have experience with sound design and audio editing. I've worked on hundreds of television commercials and radio commercials, and did the editing on 3 surfing documentaries, and got to even do the entire music score for one of them. I still learn something new everyday about the audio world, though.
  • sebmat86sebmat86 Member Posts: 339
    I actually came up with this idea on how to optimize music... Ok, so this may be a somewhat far-fetched solution. But it could work rather good in your game.

    So let´s say you make a track in GarageBand that ends up being around 5 MB large. And let´s say you would love to have 2-3 cool tracks in your game. What I ended up trying was to speed up the tracks in GarageBand before mixing them down. So instead of having the track 90 or up to 120 bpm i change it to the max, witch is 240 bpm. Then I exported the track to mp3 and ended up having more than halved the file size!! But, you may say, now it is really sped up!

    So I imported the mp3 to GS. BUT, AS SOUND, NOT AS MUSIC! This way I can pitch the track any way I like! From a super sped up track to a super slow track, if I like! And also, when importing as sound, I´ve noticed that the looping works much better!!

    So, save memory by speeding up the track before mixing it down to mp3. Then importit as sound in GS so that you can slow down the track to the speed you want it to be in. Also, as mentioned, by importing the track as sound, makes the loop unnoticeable!!

    You might have to experiment a bit with this, but hope this helps!

    /Sebastian @ Venerable Rain
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Usually a variable bitrate of 192-256 kbps, stereo, and at 44.100mhz.
    Megahertz!! : o You don't want to kill your audience !! : P (I think you mean kHz).

    : )

    VBR at 192-256 Kbps is way higher than you need for great quality audio, 128 Kbps is more than enough.
    The iPhone/iPad is not capable of true stereo, but the iPod is.
    What makes you say the iPhone and iPad are not capable of true stereo ? And what are you defining as true stereo ?

  • SocksSocks London, UK.Member Posts: 12,822
    @sebmat86

    Your method simply lowers the sampling rate.
  • PixelMetalPixelMetal Member Posts: 283
    hi

    how can i best optimise my music files to ensure the best performance in my game?

    i have a dozen music tracks and my sound effects in my project

    Dan
    Sound effects can most likely be set to mono if you're using positional sound. There's no obvious difference between stereo & mono at that point. 16bit 44k. Some sounds can probably go as low as 32k without the quality obviously decreasing.

    .m4a files for music can be lowered to 96 or 112k. This range should ABOUT equal a 128k stereo mp3 file. I've never been able to get ride of the pause in a looping m4a file, though - every program I've tried seems to insert some silence at the beginning or the end when converting to m4a on either OSX or Windows, even if there's no metadata inserted into the file.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    16bit 44k. Some sounds can probably go as low as 32k . . . . . music can be lowered to 96 or 112k. . . . .
    I think for people new to the technical side of digital audio using 'k' interchangeably to mean both Kbps and kHz might be a little confusing (obviously Kbps and kHz are entirely different things).

    It might be easier on people's brains for them to read: 'Some sounds can probably go as low as 32kHz / music can be lowered to 96 or 112kbps'



    P.S. I agree with all your figures though, music can still sound great at 128kbps and even lower and dropping the sampling rate to 32kHz on some audio works fine (especially audio with little high frequency content).
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    I've never been able to get ride of the pause in a looping m4a file, though - every program I've tried seems to insert some silence at the beginning or the end when converting to m4a on either OSX or Windows, even if there's no metadata inserted into the file.
    I just use iTunes to convert wavs to m4a (on OSX) and they loop correctly without that slight gap you get with mp3 files.

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited December 2012
    Megahertz!! : o You don't want to kill your audience !! : P (I think you mean kHz).

    : )
    Hahaha!...Megahertz, Kilohertz - It's all the same thing until you stick a fork in the wall socket.
    VBR at 192-256 Kbps is way higher than you need for great quality audio, 128 Kbps is more than enough.
    Hence the..."This can be considered overkill" and "you could try 96kbps, and 22.000mhz" and "128 kbps, mono and 44.100mhz"
    What makes you say the iPhone and iPad are not capable of true stereo ? And what are you defining as true stereo ?
    Well, I found out the other day that the iPad 2 and 3 do have stereo output with the built in speakers, but the iPhone does not. The headphones are capable of true stereo, and by true stereo, I mean 2 channels independent of one another, not just a mono split into 2 channels.
  • SocksSocks London, UK.Member Posts: 12,822
    Hahaha!...Megahertz, Kilohertz - It's all the same thing until you stick a fork in the wall socket.
    Lol : )
    Well, I found out the other day that the iPad 2 and 3 do have stereo output with the built in speakers, but the iPhone does not.
    Ah ! I see what you mean now, you mean the actual built in speaker rather than the audio system as a whole ! Yes, that makes sense.
Sign In or Register to comment.