Optimising Sound?

MetzoPainoMetzoPaino Member Posts: 195
edited May 2012 in Working with GS (Mac)
So that I can have a dynamic soundtrack where music seamlessly fades between tracks I need all of my music to be sound files rather than music files, meaning that they're taking up a lot of memory (about 20MB).

Anyway to cut that down? A specific format to import into GS that keeps size low, or best settings? Currently my music is AIFF, 16 bit and 44100 sample size.

Best Answers

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,922
    edited May 2012 Accepted Answer
    Gamesalad does not compress audio files. These are cut from two of my series on audio watch the first one scan to 8:00min I explain audio compression and the second video.. Scan up to 7:00min and start watching there and then look on my YouTube for part two. I would output ACC and pick a medium compression rate it's the only way to get your file size down. Aiff is uncompressed audio so you should see a big drop in file size.







  • HoneyTribeStudiosHoneyTribeStudios Posts: 1,792
    edited May 2012 Accepted Answer
    When using sounds I used to use .ogg files (converted from wav in Audacity) as this is the native sound format in GS.

    As an experiment I imported the same set of sounds as (the original) wavs. So they were converted by GS. And they ended up using less RAM than the .ogg files according to the viewer. (EDIT: and there was no audible loss in quality)

    But unless you are happy to assign the bulk of your RAM usage to audio, you might want to rethink your sound design and use shorter sounds. Then again if the game runs smoothly and it is doing everything you want it to do then don't worry about it.

Answers

  • GreenHavenGamesGreenHavenGames Member Posts: 62
    I would recommend to focus on quality over file size. Try the files at lower samples and listen to them through head phones. See what sounds you lose and ask yourself if you can live without them.

    Also, I would recommend importing them as music. Otherwise, are you going to have zero sound FX? If music all you need, then, sure it will work. I think I would prefer sound FX to transitional fades.

  • MetzoPainoMetzoPaino Member Posts: 195
    I can't import them as music. So that they can transition in a vaguely musical way all of my music needs to start playing at the same time, then when a variable is met one piece will fade out as another comes in and it will all be in time.

    I've still got SFX, it's volume is just tied to a different variable than the music sounds.

    I do want to keep quality as high as possible (I'm primarily a musician) but my game's framerate is all over the place on a 3GS.
  • Holderness_Media_IncHolderness_Media_Inc Member Posts: 118
    Try this, instead of making your original files 44.1khz, convert them to 22khz mono. THEN import to GS and it will convert them to .ogg. You should see a performance boost.
  • MetzoPainoMetzoPaino Member Posts: 195
    Try this, instead of making your original files 44.1khz, convert them to 22khz mono. THEN import to GS and it will convert them to .ogg. You should see a performance boost.
    I'll give that a go and see what happens, though I'm not sure the composer in me can sacrifice stereo sound.
    Gamesalad does not compress audio files. These are cut from two of my series on audio watch the first one scan to 8:00min I explain audio compression and the second video.. Scan up to 7:00min and start watching there and then look on my YouTube for part two. I would output ACC and pick a medium compression rate it's the only way to get your file size down. Aiff is uncompressed audio so you should see a big drop in file size.
    Thanks for the tips, I never realised that GS doesn't compress audio and that sound files have a limit length (though that won't be a problem for this project). Just wiki'd the details of ACC and that looks very suitable so fingers crossed.

    I agree with the "Music" and "Sound" files issue too. Seems like it should be "Static" and "Dynamic" with one being more efficient and the other being more flexible. That would probably be more confusing to GS beginners though.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited May 2012
    As far as I know there is no limit to sound files play length I ran a test at five minutes and it ran the length. I think that is another rumor that became fact or could be old information.

    One other tip the quality of an audio clip is based on it's bit depth more than the sample rate. The best prosumer level bit depth is 24 I see your files are down to 16 so the file type you go with won't produce much loss as you have such a small bit depth. It's always good to start at a higher bit depth and when you compress down the algorithm will dither the weakest bits and leave you with a solid track at 16 bits.
  • MetzoPainoMetzoPaino Member Posts: 195
    Ah I can't use AAC as it can only be imported as a Music file. Looks like I'm going to need to use MP3, probably at 192kps.
  • MetzoPainoMetzoPaino Member Posts: 195
    edited May 2012
    Ok so something weird is going on.

    I replaced all of my AIFF files, which when outside of the game come to 38.8MB with MP3 versions which come to 6.7 outside of the game.

    Somehow GameSalad Viewer now shows that it's now using 36MB of sound, rather than the 16.8MB it used to use.

    Built it again and it was at 19.2MB. Even if it was the 16.8MB it used to be, it still seems strange that it wouldn't be smaller than the AIFF build. Perhaps GS only cares about the length of a file?

    Any help @FryingBaconStudios / anyone?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Did you name the sounds differently? Add a number to the end of the new ones before importing. Then do a new save as.
  • MetzoPainoMetzoPaino Member Posts: 195

    But unless you are happy to assign the bulk of your RAM usage to audio, you might want to rethink your sound design and use shorter sounds. Then again if the game runs smoothly and it is doing everything you want it to do then don't worry about it.
    Hmm. I can't really sacrifice the sound side of things as this project is going towards my university music coursework.
    Did you name the sounds differently? Add a number to the end of the new ones before importing. Then do a new save as.
    I deleted all of the sounds previously and brought the new ones in.

    I should point out that all of the sounds added together, music and SFX comes to about 4 minutes of material.

    Photobucket

    Photobucket

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Gamesald has been known to have naming issues so I'd would not make them the same name as the ones you deleted. Delete again do a save as and then reimport with new names just add like a letter or number to the name you have now.
Sign In or Register to comment.