On 2010-02-03 01:59, ypatios wrote:
hello
i understand that for sound level representation in the digital domain, a special dB scale is used: The dB full scale (or dBFS). In this scale 0dB represents the maximum possible magnitude of a sample before clipping (e.g.: |x(n)|=1=0dBFS). I noticed the scale on the vu object and it seems it has an analog look, meaning it has some 12dB "headroom" above 0dB. Now, in most audio software (editors like audacity, plug-ins etc..) level meters go usually to 0dB max, and there is just an indicator to notify when clipping occurs.
So what is the use of the analod style scale of vu?
the dBFS has the implicit assumption that there is a "full scale". this makes total sense when you have a fixed-point arithmetic, where no value can go beyond a certain maximum point. e.g. if you have a 8bit signed signal, the values will always be in the range of [-127,128], you will never ever encounter a value of (say) 270, simply because it cannot be expressed in 8bit.
now in Pd we are not using fixed-point math (well, in PDa you do; but not in "proper" Pd) but floating point math, with the agreement that values in the range of [-1.0,+1.0] are the equivalent of "full scale".
this has really only a meaning when Pd interfaces with the real world: e.g. many (but not all!) audio APIs (ALSA, MMIO,...) will take the audio data as fixed point (e.g. 16bit), which has an absolute "full scale". [-1,+1] will be mapped to the audio APIs full range. therefore if you send values between [-2,+2] to the [dac~], you will notice clipping (because the conversion process between fixed pint and floating point will have under/overruns).
within Pd you are free to do whatever you want with your signal: e.g. you can run your internal signals in a range [-1e5,+1e5], and it will all be just the same (as long as you take care to scale the signals back into the standardized range before your [dac~]). there is no "clipping" in Pd [1].
this means, that you can have signals louder than 0dBFS, and this is the reason why the vu-meters show a little bit of "headroom". the notion of "headroom" is obviously owed to the normal use of the meters with sort-of-normalized signals.
fgmasdr IOhannes
[1] for the sake of simplicity it is; obivously even floats have their limits, and there is a maximum at about 840dBFS. you probably don't want a vu-meter that has a range of almost 1000dB where you are usually using the lower 10%!