5

I'm trying to integrate multiple sound effects (46 files), and multiple background music files (7 files) into an iOS game I'm currently developing. The volume levels of my downloaded audio assets are not well proportionate. Having absolutely no prior experience with sound design, google pointed me to normalization through sox.

I learned sox's norm effect performs normalization but wouldn't give the desired results since it's based on peak level normalization rather than average RMS level (all those are new ambiguous terms to me). There also seems to be quite a few other volume level manipulation effects such as compand, loudness, gain and others ... but I'm not quite sure which one suits my need best. My audio files are either wav or mp3, some are stereo (2 channels) others are mono channel, and I'd like to convert all the files to wav, mono channel before I "normalize" their volume.

My question is what would be a good sox command (or command sequence) to achieve what I described above? an example applied to a single file would be perfect... I can then write a script to replicate it on all my files.

PS: I don't expect an automated magic formula that would perfectly adjust all my audio files volume, I'm just hoping for acceptable automated conversion of most files, and if some remain disproportionate, I can tweak them individually. I'm also open to other MacOS or linux tools suggestions.

4
  • superuser.com/questions/323119/… seem to be a good post for you , I don't know sox but ffmpeg is huge , the loudnorm command looks a bit like what you need.
    – JSmith
    Commented Jun 17, 2016 at 2:10
  • 1
    Thanks for the link, looks interesting! As I said, I'm not a sound design engineer, and have vague familiarity with sound technical terms. What I basically want is an overall volume level that sounds the same to human ear for all audio files. In fact, after a bit of rethinking, I might actually need peak normalization for sound effects (short clips with less than a second for most files) and probably as you just pointed "compression and mastering" for the longer background music resources. I'll dig into your link and ffmpeg and post my findings later on today.
    – ALTN
    Commented Jun 17, 2016 at 2:27
  • 1
    I ended up processing all files individually using sox... going through ffmpeg docs and getting myself familiar with sound design concepts and technical terms would have taken me more time than I can afford. Thx for the suggestion though :)
    – ALTN
    Commented Jun 17, 2016 at 19:02
  • your welcome :)
    – JSmith
    Commented Jun 17, 2016 at 20:25

1 Answer 1

5

Normalizing your audio probably won't have the desired effect that you're trying to achieve.

Probably what you want to do is load all your audio into a software application, where you can mix the relative levels of the audio files so that they sound good in relation to each other.

If you normalize all your audio, the crisp packet rustling along the floor will sound similar in level to the motorbike revving engine, which of course is undesirable.

I'd suggest loading the samples into a DAW (like Pro Tools, Logic etc) and then setting the relative levels of the effects together, then bouncing them out at that level. I know it's more work but it'll sound better in the long run.

I once developed a cross-platform space invaders clone game, and I went a stage further and used a platform independent Game Audio Middle-ware tool called FMOD. You can mix the audio in real-time whilst you're testing your game, very cool! Well worth learning as it's becoming very popular.

4
  • Thanks for the suggestions @Simon, FMOD looks interesting but I wish I knew about it earlier. I last mentioned that I went for tweaking my files volume individually, which after further testing turned out to be unsatisfying, manual tweaking kept going on and on and was taking too much time. I ended up creating a java based script which reads a set of params from a json file and then generates the output straight into my ios project where I can test the adjusted sounds directly from the game. I'll share a link to the script's git repo as soon as I free up to write docs and make it more generic.
    – ALTN
    Commented Jun 21, 2016 at 16:22
  • Sorry @ALTN I was a bit late to the party! Sounds like you've set-up a good workflow though, so that's cool. FMOD could be overkill if it's a really simple game. It took me a week of going through tutorials to get up to speed as a user, without even looking at the programming side. If game audio is something you're going to revisit it's worth the investment! Commented Jun 22, 2016 at 11:57
  • This is a good answer if the audio levels can't be changed at a later stage. If they can, then normalizing the files was probably the best way. (I know little to nothing about game design)
    – n00dles
    Commented Jun 22, 2016 at 12:20
  • 1
    @SimonBosley the concept of my game is pretty simple, it's actually a 2D puzzle game with quite a few animations and special effects. No positional audio or anything fancy in terms of sound though, just playing background music and a few sound effects. Your answer will come in handy for people who are working on more complex stuff, I'm sure, including myself potentially in future projects, but as for now I'm sticking to my script which is perfect for my current needs... wish I had enough reps to upvote!
    – ALTN
    Commented Jun 22, 2016 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.