Optimizing sound and music for your game.

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

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Speeding a track up in GarageBand (or any other DAW) and then slowing it down via the pitch control in Gamesalad simply lowers it's sample rate.

    So if you take a 120bpm track at 44.1kHz then speed it up to 240bpm (more correctly: pitch it up, so that the tempo and the pitch is doubled) import it into Gamesalad and then lower the pitch via the sound behaviour's pitch control so it's back to 120bpm all you have done is lower the sample rate to 22.05kHz.

    A quicker way would be to simply export your file at 22.05kHz in the first place.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yep you beat me to it socks. When you lower the sample rate you degrade the quality of the track. So the answer to how to optimize sound depends on the quality one desires for their sound tracks. Heck I won't even record something lower than 96khz then bump it down using a fluctuating sampling algorithm.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    P.S yes looping in 'sound' is much better than 'music'
    . . . how to optimize sound depends on the quality one desires for their sound tracks. . .
    Absolutely, where as a busy dance track (with lots of high frequency audio) might need at least 44.1kHz to prevent it sounding aliased, you can probably get away with 22.05kHz for speech and 11kHz for a low bass sound (imagine a dark drone in the background of a game).

    And all those guys doing 1980s 'chiptune'/8-bit retro type music and effects can drop the bit depth on their audio right down to (unsurprisingly given the genre's name!) 8 bit.

    Like you say it all depends on what you are after - and should be done an a sound by sound basis.
  • SocksSocks London, UK.Member Posts: 12,822
    "Heck I won't even record something lower than 96khz then bump it down using a fluctuating sampling algorithm"

    Bat ears ?

    ; )
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I'm a pro sound engineer studied at the Recording Workshops. 96K 24 bit is minimum. I've done ear training for every frequency. Heck you should see us in the studio just picking the right mic combos to acquire a tone..lol
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    For pretty much all music I reckon your average mobile gamer will be happy with 16 bit 44.1 compressed to 128 kbps m4a

    You can prob get away with 96 kbps if your original track is decent.

    I reckon the emotional impact of the song/audio is more significant than whatever compression settings you decide to use.

    Also keep in mind that 'music' tracks, as opposed to 'sounds' won't really affect your game performance. And now that the limit for mobile downloads on iOS is 50mb many games maybe able to be a bit more generous with the allocation of space for music tracks.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2012
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    The music on Rusty Boat sounds nice and loose/natural and warm. I reckon natural vox would suit better but that's just personal preference.
  • sebmat86sebmat86 Member Posts: 339

    So if you take a 120bpm track at 44.1kHz then speed it up to 240bpm (more correctly: pitch it up, so that the tempo and the pitch is doubled) import it into Gamesalad and then lower the pitch via the sound behaviour's pitch control so it's back to 120bpm all you have done is lower the sample rate to 22.05kHz.

    A quicker way would be to simply export your file at 22.05kHz in the first place.
    Yeah, I figured my idea was far-fetched, as I said. But @Socks or @FryingBaconStudios, where can I lower the kHz within GarageBand? Can´t find those settings...

    Does lowering the kHz also lower the quality of the track? And is lowering kHz just another way of doing what I did, or is it actually a better way of cutting the size of the track?

    Thanks,

    Seb
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    When exporting out of Garage band select custom. @honeytribestudios checkout this first pass mix down of the instruments of a song for my wife's album. Left channel is a Washburn acoustic with a royer ribbon R-121 reversed and a Sennheiser E606 on the 12th fret. In the right is an acostostrat straight in. All instruments were processed through a custom tubed preamp. Solo is a strat with hotrail pickups mixed in all three settings.

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    where can I lower the kHz within GarageBand? Can´t find those settings...
    I don't use Garageband so I can't help you out there, but there are a million ways to convert the sample rate of a file, if you are not able to do it in Garageband you could just bounce out a full quality WAV - open iTunes - change iTunes' import settings to whatever you want - and do the conversion there (good for doing a load of sounds at once). Or open using quicktime 7 player and export to whatever quality you want.
    Does lowering the kHz also lower the quality of the track?
    Yes, it does, the lower the sample rate, the lower the maximum frequency you can play back, a 44.1kHz file uses 44,100 samples a second - and without getting too technical with the reasons why (Nyquist frequency and all that) this will allow you to hear a maximum frequency of 22.05kHz (half the sample rate).

    Our ears naturally have a range (on average) of around 20Hz to 20kHz (20 to 20,000 Hz) so being able to play back sound up to 22.05kHz covers pretty much the range of human hearing.

    Drop the sample rate to 32kHz and the maximum frequency you can play back is 16kHz - still pretty decent for most stuff.

    Drop the sample rate to 22kHz and the maximum frequency you can play back is 11kHz - which starts to sound a bit crappy as the high frequencies are really aliasing by now.

    And is lowering kHz just another way of doing what I did, or is it actually a better way of cutting the size of the track?
    I wouldn't say lowering the sample rate (the kHz) is any better than your method, it's just more straightforward - both methods end up in exactly the same place.

    Sampling rate it just one way to lower the file size of a piece of audio, along with bit depth and bit rate - they all follow the same basic rule, make the numbers smaller and the file get smaller (and sounds worse).

    And of course there's always the standby that literally slices your file size in two - convert stereo to mono.





  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    When exporting out of Garage band select custom. @honeytribestudios checkout this first pass mix down of the instruments of a song for my wife's album. Left channel is a Washburn acoustic with a royer ribbon R-121 reversed and a Sennheiser E606 on the 12th fret. In the right is an acostostrat straight in. All instruments were processed through a custom tubed preamp. Solo is a strat with hotrail pickups mixed in all three settings.

    The lead guitar towards the end together with the arpeggio sound really nice.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    That's why we oversample to avoid aliasing and allow the anti-aliasting filters room to keep a smooth wave when you down sample.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    That's why we oversample to avoid aliasing and allow the anti-aliasting filters room to keep a smooth wave when you down sample.
    Yeah, makes sense to record at the highest fidelity you can.
  • sebmat86sebmat86 Member Posts: 339
    Thanks @Socks, for the help, and for clearing out stuff! :)

    Cheers mate,
    Seb
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    That's my friend Craig he's a great guitarist. We'll be adding a cello in the next session do our complete mix down and then the vocals and another mix down.
Sign In or Register to comment.