Author Topic: Question About Headroom  (Read 15632 times)

Aerithos

  • Sub Bass
  • *
  • Posts: 68
  • Honor: 16
    • aerithos
    • View Profile
    • Aerithos Youtube Channel
Re: Question About Headroom
« Reply #15 on: May 09, 2016, 10:46:59 pm »
I just tested this in FL Studio (Sine -> 300db Boost -> 300db Cut -> Waveform Display), and there was no loss of precision, visible or otherwise. So at least for FL Studio, my expectations were wrong. So that probably means samples aren't directly mapped to a floating point value, but maybe some form of "linearizing" curve/function is used? I don't know.

What I do know, is that my previous post is useless...

FarleyCZ

  • Low Mid
  • **
  • Posts: 493
  • Honor: 93
    • farleycz
    • farleycz
    • View Profile
    • I tried to code a page, look!
Re: Question About Headroom
« Reply #16 on: May 09, 2016, 11:36:49 pm »
That's the fun of floating point. It actually really shifts the decimal point to preserve given number as precisely aspossible.

I think what happens in daw when you gain something is, that it tries to multiply the samle value by gain amount. It probably takes those numbers, loads them into SSE vector and sends it to CPU for computing. Modern CPUs have so called FPU coprocessors, which are blocks dedicated just to dealing with floating point operations. Those probably find out how much decimal point shifting is needed and try to preserve the precision while doing so. That's why you didn't end up with quantized stair hills, but neat sinewave at the end. It just shifted decimal point, leaving the "values" themselves almost intact.
« Last Edit: May 09, 2016, 11:38:23 pm by FarleyCZ »
"Earth is round right? Look at it from right angle and you'll be always on top of the world."
...but don't overdo it, because that's called being a d***k.

Aerithos

  • Sub Bass
  • *
  • Posts: 68
  • Honor: 16
    • aerithos
    • View Profile
    • Aerithos Youtube Channel
Re: Question About Headroom
« Reply #17 on: May 10, 2016, 12:58:04 am »
I think I was expecting the logarithmic scale of dB to relate directly to sample values, but yeah, that's probably not the case beyond values of -1.0 to 1.0.

I have no clue how much the SSE/AVX instructions affect the math, but I was under the impression that they were there purely for acceleration purposes, i.e. fewer AVX instructions required for vector tasks. Maybe they do use double precision internally or something...

I was thinking more along the lines of values losing decimal precision as they grow in size. The extreme example being that single precision floating point can only represent even integer values between 224 and 225.

FarleyCZ

  • Low Mid
  • **
  • Posts: 493
  • Honor: 93
    • farleycz
    • farleycz
    • View Profile
    • I tried to code a page, look!
Re: Question About Headroom
« Reply #18 on: May 10, 2016, 07:30:21 am »
I got ya. But also I don't think any precision is lost while gaining the same signal. It just shifts the decimal point and does some small multiplication to move the values inside of the target range. Better test might be this: Make full scale 0db sinewave, mix it with -100db one, render it out and check how the quiet sinewave survived.
"Earth is round right? Look at it from right angle and you'll be always on top of the world."
...but don't overdo it, because that's called being a d***k.

Mussar

  • Administrator
  • Mid
  • *****
  • Posts: 631
  • Honor: 252
    • mussarmusic
    • mussarmusic
    • View Profile
    • My Site
Re: Question About Headroom
« Reply #19 on: May 10, 2016, 01:53:57 pm »
This is partially why I think it's still not a horrible idea to leave headroom. :P

Marrow Machines

  • Mid
  • ***
  • Posts: 788
  • Honor: 101
  • Electronic Music
    • marrow-machines
    • MarrowMachines
    • View Profile
Re: Question About Headroom
« Reply #20 on: May 10, 2016, 05:34:50 pm »
This is partially why I think it's still not a horrible idea to leave headroom. :P

science aside, i think head room is nice because it definitely gives your tracks room to actually breath an entire breath if it needs to. the varying level of the breaths it takes also gives you different feelings as it hits into your effect chains.
Josh Huval: Honestly, the guys who are making good art are spending their time making it.