GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Music (best practices)

I know this has been covered. I've done my research. But I never found a true concrete answer. Thought ya'll could help out (if you'd be so kind). My game is huge. About 100mb (lots of graphics. Like, LOTS). Anyways my music guy has made some great music that ranges from 30 seconds to one minute and thirty seconds. Curious what's the best quality/settings i should tell him to output (without destroying game performance)? At this point im not concerned with game size. Just performance. I dont need the music to be cd quality but id love for it to sound as good as possible. Any thoughts? And should i import them as aac or as uncompressed and let gs do the conversion (ive read conflicting views on this). A trillion thanks!

Comments

  • SocksSocks London, UK.Posts: 12,822Member
    edited December 2012
    Have your music guy give you uncompressed AIFFs or WAVs so you can experiment with different settings until you find a balance of quality / file size / performance.

    I would then convert the files externally (ie: don't let GameSalad do it) and directly place (or replace) them in the sounds folder of the project file.

    As for the best settings that's a matter of taste:

    For high quality recordings 128kbps is a good starting point, you may be able to get away with a lower bit rate on some pieces of music.

    I'd keep the sampling rate at 44.1kHz, but again some tracks might survive perfectly well at lower sampling rates, but don't go too much lower than 32kHz as you start to hear aliasing (things get 'crunchy').

    For bit depth 16bit is ideal, higher bit depths like 24bit are largely pointless at the playback stage (although they have their uses in recording) - again same story as above you can get away with lower bit depths on some tracks, but go too low and the track turns into cornflakes.

    Some tracks (occasionally) will survive being rendered in mono, especially a track with little stereo content, a mono file is half the size of a stereo file (unsurprisingly).

    Playing with all the above parameters will be a waste of your time unless you use the direct to the audio folder method (rather than allowing GS to convert on import).
  • anatomyofdreamsanatomyofdreams Posts: 723Member
    @socks, brilliant answer. Really really phenomenal! Thank you! I'm going to do exactly as you've suggested. Final question, just to be clear, the final music tracks I use, should be AAC, correct? If not, can you let me know which is the best format to bring them in as? Thanks1
  • SocksSocks London, UK.Posts: 12,822Member
    edited December 2012
    For music use M4a.

    Actually I need to correct one thing I said, the 'you must use the direct to the sound folder method' warning doesn't apply to M4a files, all other audio files types are converted by GS to what it thinks is best, but if you drag an M4a file into GameSalad (and not into the sounds folder of the project) it does no conversion at all.

    So . . .

    A 320 Kbps M4a imported into GS results in a 320 Kbps M4a.
    A 64 Kbps M4a imported into GS results in a 64 Kbps M4a.

    . . . etc etc

    Whereas MP3s, WAVs, AIFFs (etc) when imported as 'music' will all be converted to 128 Kbps M4a files. Even if they were 64 Kbps or 320 Kbps to begin with GS will make them 128 Kbps.

    On a side note you can also sneak some otherwise GS 'incompatible' file formats into GS using an Apple .caf container.
  • anatomyofdreamsanatomyofdreams Posts: 723Member
    When you say drag into the sounds folder of the project vs. dragging into game salad- what do you mean by this? I generally just go to SOUNDS and the DO ADD SIGN, and pick my SONG/SOUND.
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO

    hi @anatomyofdreams adding your music/sounds via the plus sign is fine of course, but as @Socks says, you can also drag the sound files from your desktop/folder straight into the Sounds Library in GSC.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    Yes, if your files are converted to the appropriate format, GameSalad will just import them without any conversions, with either import method.

    Music is .m4a format

    Sound Effects are .ogg format

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • anatomyofdreamsanatomyofdreams Posts: 723Member
    @socks @gyroscope @slickzero THANK YOU! I appreciate it. Consider the question ANSWERED! Thanks again!
  • SocksSocks London, UK.Posts: 12,822Member
    SlickZero said:


    Sound Effects are .ogg format


    Does anyone know why two different formats are used for audio in Gamesalad ?
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited January 2013

    Hi @Socks interesting question...that thought crossed my mind at some time or other too... I don't know the answer but maybe there's a clue in the fact that m4a is recommended for 30 seconds or more, the ogg files for 30 seconds or less...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • sniffy176sniffy176 Posts: 48Member, PRO
    just a quick question on music...

    I'm trying to add a looping music track into my game, but it seems that upon researching an m4a track actually adds 1/10s silence to the beginning of the track.

    Which basically makes looping seamlessly impossible. Is there anyway around this?

    Thanks!
  • anatomyofdreamsanatomyofdreams Posts: 723Member
    I'm not sure about that. If it is true and if there's no way around it, then perhaps a really crappy idea would be to build your music with that in mind. Perhaps a hook that pauses every x amount of time (beat), so that the delay actually sounds like the intended beat pause in the song. Terrible suggestion i know, but if no one else can help you with an answer (and i'm sure they can)- then at least thats some kind of tangible solution.
    Have you tried doing a test to see if its true? Have you tried different methods and format inputs (even though i believe gs translates it back to m4a anyways)?
  • SocksSocks London, UK.Posts: 12,822Member
    gyroscope said:

    Is there anyway around this?

    Use 'Sound' rather than 'Music'.
  • SocksSocks London, UK.Posts: 12,822Member
    edited January 2013
    Quick example -

    http://www.mediafire.com/?xnexc44t46hwsen

    Hold your mouse down on the white square to compare how 'Sound' loops in comparison to 'Music'.

    (the actual loop is a little 'grabby', but that's just my quick shoddy editing rather than the 'Sound' looping accuracy - but you can still hear that the gap is gone whereas it's fairly obvious on 'Music').
  • zzap64zzap64 Posts: 405Member
    i have 10 MB of audio files but when running the app the Audio RAM is 55 MB, is there anything in particular that would help to reduce the RAM ?
  • zzap64zzap64 Posts: 405Member
    edited January 2013
    I find that importing my audio files as Music has much less RAM usage rather than imported as sound effects. Good for me :)
This discussion has been closed.