Doctored Strange Levels: Or, How I Learned to Stop Worrying and Love the Limiter

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #398055
    FujiSkunk
    Keymaster

      This is a product of my excursion into figuring out how to solve volume fluctuations between songs while playing Rock Band 3.

       

      TL;DR: Try to keep your final audio mixes around -6.4dBFS in average loudness. For multitracks, this means the final mix should be around -6.4dBFS, but individual tracks can be something else. Limiting of any given audio track is necessary only if that track has peaks above -0.1dBFS.

       

      Listen to music of any flavor from any source long enough, including official tracks released for the Rock Band series, and you’ll likely find yourself reaching for the volume knob now and then to keep everything at a listenable level. This is partly because there is no single standard that defines what is “loud enough” and what is “too loud”, and so just about every producer, engineer and music game project manager have their own beliefs and opinions. Other factors, such as the infamous “loudness wars” in the ‘00s, complicate things even more. There are ways to normalize your tunes (pun intended), but if not done properly these can leave everything sounding so flat and dead that all dynamics are sucked right out of the music (FM radio, for example), or they can result in “clipping”, the hideous clicks, pops and distorted blaring that poorly engineered audio is infamous for (Rush’s Vapor Trails, for example).

       

      After realizing some of my own customs were coming in louder or softer than others, I decided to create a process that would enable my tunes to be at a consistent volume, and allow them to mesh well with the rest of the library. There were two significant challenges to this goal: one, how to define “consistent volume”, and two, how to set tunes to this “consistent volume” without destroying the music. Looking at my digital music library for ideas, I decided to rely on a thing called ReplayGain. ReplayGain is a very handy tool that does exactly what I would want it to, only for MP3s and Ogg Vorbis files rather than for RB3 customs. Specifically, ReplayGain analyzes a music file, then calculates a gain (higher or lower volume) for that file, so that every song with a ReplayGain adjustment will have the same “average” volume. Only one volume adjustment is made for each entire song, so there is no “flattening” of loud and soft parts like you hear on the radio, and software that uses ReplayGain can make further adjustments to prevent clipping. I also decided as a reference, I should focus on a single game’s on-disc songs. I figured, even if the entire official library is an unreliable reference, a single disc’s songs probably had more care put into their mixing, to ensure they flowed well together. And since RB3 is the game we’re all focused on, what better on-disc collection than RB3’s 83 songs? My plan became this: calculate how loud the songs on the RB3 disc are, figure out how I can use ReplayGain to compute their intended volumes, and then do some math to see what kind of volume adjustments I should make to my own songs. I knew at some point I would also have to learn how to use a limiter, which would also involve learning exactly what a limiter does and how to handle it safely!

       

      I could probably write a book, or at least a few long chapters on the rabbit holes I fell down during my research before learning what I actually needed to know, but I’ll spare you and boil it down to the four most important points:

       

      Point One: ReplayGain was created based on the idea that contemporary music is optimally presented at 89 decibels (d:cool:. This dB scale refers to a sound’s loudness as heard by your ears. It is the scale people talk about when they say 0dB is absolute silence, 120dB is a loud rock concert, 150dB is a jet engine taking off, and anything above 200dB will probably render you instantly deaf. Note that you can measure a sound’s loudness at its source, or at the point it reaches your ears. ReplayGain’s recommendation is 89dB at the source.

       

      Point Two: Decibels are also used in audio programs like Audacity and REAPER, however, this is in fact a different scale. These numbers, which start at zero and count backwards, refer to how loud a sound is compared to how loud it possibly can be in the given format. Different audio formats can have different volume ranges — DVDs can store wider volume swings than CDs, for example — but they all have a maximum possible loudness for recording without clipping or distortion. The peak loudness for digital audio formats is especially firm; there simply aren’t any data bits available to represent anything louder. For simplicity’s sake, audio applications define this maximum loudness as 0dB across all formats. That way, the scales are easily interchanged: -6dB in one format is easily converted to -6dB in any other format, and they will sound the same, or at least have the same volume, in both formats. To help prevent confusion, some people refer to this scale as dBFS, which means decibels relative to full scale. Note that some digital formats, 32-bit floating-point WAV for example, actually can store volume levels defined above 0dBFS. Even then, however, 0dBFS is to be treated as a hard limit for final mixing, with any higher values shifted down before release.

       

      Point Three: Converting dBFS values to real-world dB values is completely arbitrary, for obvious reasons. You can make that 0dBFS sound as loud or as soft as you want simply by turning the volume knob. To make this conversion less arbitrary, more context is needed. Long story short, the ReplayGain standard establishes enough context so that 89dB converts to -14dBFS, regardless of the digital format used. Once you know this dBFS number, you can completely forget about the 89dB number.

       

      Point Four: Audio can have an average loudness well below 0dBFS, but still have peaks that would be above 0dBFS if not for the hard limit. Music producers and engineers have all kinds of tools and creative ideas for keeping those peaks below the red line without the music going too soft, but for Rock Band, you need only one tool: the limiter. A limiter does exactly what it’s named for: it limits an audio track’s peaks, so that anything above a certain point gets squelched back down to the limit, but it does so in a way that audio below the limit is unaffected, and also in a way that doesn’t cause the unwanted artifacts of clipping. A limiter can also have a second purpose: to increase the volume of the sound that’s left over, so the result is louder than before the limiter was applied. To illustrate, here is the waveform of a song clip as displayed in Audacity, colored so that reds represent the softest peaks and yellows represent the loudest.

       

      Let’s say you’ve decided there shouldn’t be any peaks above the blue range. You would set your limiter’s “threshold” to whatever value corresponds to the loudest of the blues; we’ll call it -6dBFS, just to pick a number. With the threshold at -6dBFS and ignoring the “ceiling” setting (more on that later), the resulting waveform would look like this:

       

      Now, let’s say you’re happy with the new peaks, but now you want the overall volume to be louder, back in the green range. This is where the ceiling setting comes in. When the ceiling is at 0dBFS, you’re telling the limiter that, once it has sliced away all peaks above -6dBFS, the volume of the remaining audio should be increased so that the remaining peaks reach as high as 0dBFS. If you set the ceiling to -6dBFS, the same as our hypothetical threshold, you’re telling the limiter to cut off the existing peaks but leave the remaining audio exactly as is; in other words, the resulting waveform would again look like what you see above. So, if the threshold that created the waveform above was -6dBFS, and this time you set the ceiling to, say, -3dBFS, the resulting waveform would look like this:

       

      In conclusion, the lower the threshold, the flatter (or more “brick-walled”) the resulting sound. The higher the ceiling, the louder the resulting sound. With both values the same, only flattening takes place. Obviously, limiting the sound too much can flatten it to the point of ruining the experience, but careful use of the limiter can help you keep your intended volume without anyone noticing you shaved off those highest peaks.

       

      Armed with these four points, I knew I had to determine two things about each song on the RB3 disc. One, what is the average volume of each song’s final mix, at least as determined by the same method used by ReplayGain, and two, what are the peak volumes of each song’s individual stems? Answering the second question turned out to be easy: I quickly discovered Harmonix didn’t worry about adhering to anything beyond the hard 0dBFS limit, and simply kept the peaks below zero, if sometimes only barely. Answering the first question was a little more involved: because the game uses multiple audio tracks for each song, it is entirely possible for each stem to be kept below 0dBFS, and even possible for the mixed stems as a whole to average out below 0dBFS, while the peaks of that final mix still hit above 0dBFS. After all, the more audio you pile on, the louder the whole thing gets, and multiple stems allow you to store louder audio without hitting against the same limits you would with a single stereo track. I could have recorded the downmixed audio to a format that actually allows for values above 0dBFS, like the 32-bit floating-point WAV format mentioned earlier, but the ReplayGain tools I have only work on formats like MP3 and FLAC, which can’t store volumes over 0dBFS. So, calculating the average volume became a three-step process: one, record each song to a single stereo track; two, calculate the volume necessary to soften the stereo track until its peaks went no higher than 0dBFS; and three, apply ReplayGAIN to that track, noting the volume change it calculated. Then, with a little final arithmetic, I could determine what average volume Harmonix aimed for. My results are in this spreadsheet. I discovered the songs actually have a noticeable range of volumes, from “Crosstown Traffic” being the loudest to “Antibodies” being the softest. Still, the range isn’t ridiculously wide, about 5.2dB, with the average coming in near -6.4dBFS.

       

      So, what this means for customs authors is, if you want your custom to be around the same volume as the game’s original releases, make sure your final mix’s average volume is around -6.4dBFS, or at least no louder than -3.7dBFS and no softer than -8.9dBFS. For single-tracked songs, this simply means making sure your track is friendly with these numbers. For multitrack mixes, this means making sure all your tracks mix to something in this volume range when they are played together (of course make sure you’re happy with how the mix sounds to your ears before you start fiddling with the final mix’s volume). Then, once you have your volumes set for each track, use REAPER’s peak meter to make sure no track’s peaks go above 0dBFS. If they do, just apply the W1 limiter to that track (you’ll probably have to add the limiter to the master track, since plug-ins are applied before the volume sliders of individual tracks), set the limiter’s threshold and ceiling both to something like -0.1 (you don’t have to worry about the “release” setting), and re-render. Since all we’re doing is just making sure the audio doesn’t go above 0dBFS, there is really no reason to use settings any lower than -0.1. Theoretically we could even stay at 0, but a peak right at 0dBFS could still cause clipping depending on how it is processed by the underlying software and hardware, so staying a little below zero is a good safety measure. It is also possible that the limiter will affect the average volume, but if your peaks only occasionally go above zero, especially for multitrack mixes, odds are you can get away without readjusting track volumes.

       

      Unfortunately REAPER 4.22 doesn’t have any easy way to incorporate ReplayGAIN into its recording and file saving process, so doing all this involves making use of other applications; I used the FLAC command-line tools available at Xiph.org, which have ReplayGain capabilities built in. I’ve read newer versions of REAPER actually have added ReplayGain features, so those brave enough to try something newer than 4.22 may be rewarded. If anyone has other suggestions on how to make this whole thing easier, I welcome any feedback. Any which way, I hope this helps explain why songs can seem overly loud or soft compared to other songs, and what can be done to prevent your customs from having the same problem. Happy charting!

      #513462

      Very interesting thanks FujiSkunk! I will definitely bear this in mind for future customs.

       

      Also please confirm that all Spinal Tap tracks are one louder?

      #513470

      i think the default settings on the c3 template have something set to -0.5, while the master track also bumps up the volume 0.5db.

      #513472
      FujiSkunk
      Keymaster

        That’s a good point. My numbers assume the master track volume is at 0dBFS.

        #513505
        Fat Halpert
        Participant

          Great title.

          You can reach me on Discord: Fat Halpert#3165

        Viewing 5 posts - 1 through 5 (of 5 total)
        • You must be logged in to reply to this topic.
        Back to top button