Traktor's Gain Structure
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Tech Guru mostapha's Avatar
    Join Date
    May 2010
    Location
    Atlanta
    Posts
    4,742

    Default Traktor's Gain Structure

    So…for those of you who don't know what I'm talking about…just ignore this thread. Mostly, I'm posting publicly so people can use this information if it's of use to them. Realistically, I kind of just want to get information from people who have a reason to know the real story (Karlos comes to mind).

    So…how does Traktor's internal gain structure work with regards to the internal digital representations?

    I remember reading somewhere that Traktor has about 200dB of SNR inside the software, which kind of implies that they're using a 32-bit representation inside the software. Which makes sense.

    Most audio files that DJs use are 16-bit, and I think it's not really realistic to assume that anyone has files more than 24-bit that they'd regularly use DJing…hence their choice. It would also be pointless to do that, since most DJ-oriented interfaces don't do 32-bit output.

    But, anyway, there are 2 reasons to do that: headroom and noise floor. As long as your 0dBFS point for each bit depth is consistent, it doesn't really matter what you use (dance music is insanely compressed anyway).

    So…which one are they trying to maximize, or did they do it the smart way?

    If the 16-bit 0dBFS point is the same as the internal 32-bit 0dBFS point, then any additional gain applied to your music would cause clipping. I don't think that's what they're doing, based on empirical observation. A 16-bit render of a pure sine wave set so that it just barely doesn't cause intersample modulation distortion can still take a LOT of gain inside Traktor before it starts to generate overtones (assuming you set the master output low enough to avoid clipping your sound card outputs).

    Having "silent" (-infinity dBFS) being the same place for all the different files doesn't make sense either…16-bit and 24-bit files wouldn't play at the same volume if you did that…the 24-bit files would be 48dB louder…which is well outside the range that Traktor's gain controls allow. I can't test that empirically without rendering a 24-bit file, which I kind of just don't feel like doing. I'm pretty sure it doesn't work this way.

    Alternatively, 24-bits could have -48dB of gain applied when playing…which would put the 0dB points for 16 and 24 bit files at the same place and just chop off the quietest 48dB of the 24-bit files which–thanks to really compressed dance music–probably doesn't have much real information in it anyway.

    So, my theory:

    0dB for 24-bit files is set so that they have another 8-bits of headroom (48dB) on top. 16-bit files have some gain applied to them so that they have the same 8-bits of headroom on top with an assumed 8-bits of noise (either from something like a dithering algorithm or just arbitrary data) on the bottom. That seems like it's the best of both worlds with regard to preserving the information that's in each type of file while allowing enough headroom for Traktor's internal mixer to basically never clip (assuming the master is set low enough that you don't clip your DAC).

    The biggest implication of doing it this way is that it would be easy to just set Traktor's channel gains pretty hot so that you could use the more consistent range of Traktor's Volume Fader controls (which seem to accelerate towards the top) the way that you used to use the rotary gain controls on something like the old Urei mixers (which only had that one control, not separate trim and level controls for each channel).

    I'm interested only because I like that method of mixing, and I'd like to know if it's viable to just set Traktor's gains hot, ignore Traktor's channel meters, and use rotary MIDI controls that way. I wouldn't use all of the headroom available (not by a long shot), and the testing I've done (with sine waves) seems to imply that it's perfectly viable as long as the master is set low enough.

    I'm also curious exactly how the master volume control works. In a DAW, it effectively sets the output bit depth, meaning that -6dB on the master fader means it's actually outputing a 15-bit signal (assuming the sound card is set to 16-bit…or a 23-bit signal for a 24-bit sound card). Considering that Traktor seems to use a 32-bit internal representation and outputs to either 16- or 24-bit sound cards…it doesn't seem that it works the same way as–for example–Pro Tools.

    So, is that how it works, or is my testing misleading me?

    And, because I know a lot of you are thinking this…


  2. #2
    Tech Mentor
    Join Date
    Jan 2011
    Posts
    177

    Default

    Quote Originally Posted by mostapha View Post
    I remember reading somewhere that Traktor has about 200dB of SNR inside the software, which kind of implies that they're using a 32-bit representation inside the software. Which makes sense.
    pretty much every DAW and most pro audio applications use floating-point (i.e., 32-bit) representation internally. Some plugins may use double (i.e., 64-bit). lots of articles available on the internets on the why and how.

    edit: i might try to dig up some articles & post linkys here later tonight. i suspect hydrogenaudio might have some good stuff...

  3. #3
    Tech Mentor
    Join Date
    Jan 2011
    Posts
    177

    Default

    ok, getting back to this thread... i think about these issues more from the perspective of a computer scientist rather than the perspective of a musician (or someone who does mastering).

    there are two key advantages to using floating point. (you will enjoy these advantages when using 32-bit floating point or "single precision" and even more so when using 64-bit floating point or double precision.)

    1.) traktor (more accurately, your CPU) executes many, many computations on the audio you throw at it. in doing so, it makes rounding errors. each time traktor makes a rounding error, it adds noise to the signal. now, the point is that rounding errors will be much, much larger if your samples are 16-bit (or even 24-bit) fixed-point values than when your samples are 32-bit floating point values.
    in other words, traktor represents audio samples as floats internally to avoid signal degradation. here's an article with an elementary discussion of the topic.

    2.) modern computers use word sizes of 32 or 64 bits. (A word is a natural unit of data for a given computer processor.) for the last 15 years or so (15 years ago, the Intel Pentium Pro was introduced), x86 microprocessors (and later AMD64/Intel 64 processors) have been best at crunching 32-bit and 64-bit numbers.
    so even if you could demonstrate that representing audio samples by 24-bit numbers is fine in the sense that it provide us with sufficient headroom/satisfactorily low noise floor, it would be a bad idea to work with 24-bit variables in practice! why? because modern microprocessors can do computations on 32-bit numbers FASTER than computations on 24-bit numbers.

  4. #4
    Tech Guru
    Join Date
    Feb 2010
    Location
    Desert Hot Springs, CA
    Posts
    763

    Default

    I comprehend the info.. but don't know what to do with the new info lol.
    Hardware: Akai Max49, Maschine, Equator D5 monitors, Saffire Pro 14
    Software: Logic, Maschine
    My Neighbors Listen to House Music.. Because They Have To.

  5. #5
    Tech Mentor
    Join Date
    Jan 2011
    Posts
    177

    Default

    Quote Originally Posted by DJ Asand View Post
    I comprehend the info.. but don't know what to do with the new info lol.
    yeah, i hear you. there's nothing you can directly "do" with it. it merely clarifies why internal resolution will be different from the resolution you set for your audio interface.

    but i believe there are a lot of misperceptions about resolution, sample rate settings, and signal processing more generally. there are many things few of us (myself included) understand. i think a better understanding of how audio is processed in pro audio software will help me make better decisions (do i need HD audio files? what are sensible settings in the audio control panel? etc.)

  6. #6
    Tech Convert
    Join Date
    Oct 2011
    Posts
    17

    Default

    That was interesting and I don't think i blinked the entire time i read that. Both my brain and eyes hurt but it makes complete sense
    DJ Gear: S4 | Traktor 2
    Audio Engineering Gear: 15" Macbook Pro | Logic Studio 2 | Presonus Firestudio | SM58's | Blue Spark | M-Audio Studiophile AV 40 Monitors

  7. #7
    Tech Mentor ajrindy's Avatar
    Join Date
    Feb 2011
    Posts
    186

    Default

    I comprehend some of it, but I'm not sure. I know you meant to keep noobs out of this thread, but I will only ask: where do you recommend one read up on things such as this, so that others forum members, including myself, will be able to become educated about bits and dBFS? It would be very honourable to provide a source of knowledge, and certainly more fair than knowingly and actively shutting out a (probably rather large) portion of the forum readers.
    thanks. I know it might not be easy to put together a source or sources, but I'm also genuinely interested in learning.
    Do I err in posting this?

  8. #8
    Tech Mentor michaeldunne109's Avatar
    Join Date
    Nov 2009
    Location
    The land of the leprechaun
    Posts
    451

    Default

    Quote Originally Posted by DJ Asand View Post
    I comprehend the info.. but don't know what to do with the new info lol.
    Me too. But a very interesting post.

    Cheers
    I play everything Indie/ Rock/ HipHop/ Cheese/ Electro/ Dubstep and anything that sounds good

    Tsp 1.7/ Tsp 2/ Sony vaio Win 7 4gb Ram / Macbook Pro 13 inch (Main machine) /vci 100 se/ mixdeck/ audio 8/ technics rph headphones/ Custom xBox Controller/ Akai Lpd8

  9. #9
    Tech Guru mostapha's Avatar
    Join Date
    May 2010
    Location
    Atlanta
    Posts
    4,742

    Default

    itskindahot, I don't think any of your information is plain wrong…but it's completely irrelevant to my original question.

    As to what you actually said:

    First, the difference between floating point calculations and integer calculations is smaller than you think it is. The mantissa of the floating point number winds up being about the same data as a similarly sized integer representation. The exponent winds up basically a gain value. It gets more detail out of very quiet signals if the final sum stays quiet, but it doesn't actually increase dynamic range without a lot of extra processing.

    Second, in a modern system, the noise floor is low enough that rounding errors are inaudible.

    As to what I asked:

    I can't hear a difference in doing it my way or the "right" way, and Traktor makes it very difficult to do things the right way. Autogain is one of the big indicators of how they're representing audio. For example, I have tracks that Traktor's auto-gain applied a positive gain to. It "sounds right," meaning that it's about the same perceived volume as other tracks played and it doesn't sound like it's clipping (with my internal mixer set to 9dB of headroom and about -2dB of gain). In Ableton or Logic, the track at unity causes intersample modulation distortion. If I use the value specified by Traktor's auto gain, it peaks really hot…I've seen some tracks peak at like +18dB this way. And they still don't clip.

    They're doing something to increase headroom beyond the design spec for 16-bit Wav/mp3/flac/etc. files…I just want to know if I'm thinking about things accurately or if I'm going to run into problems down the line.

  10. #10

    Default

    CPUs used to be much faster than GPUs (fixed versus floating point use.) the IBM Power architecture changed that. ARM is still slow with floating point instructions.

    Anyway, this all is so subjective so the best tool you could really use is your ears concerning your questions.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •