Subject: Re: [linux-audio-dev] misc ladspa questions
From: David Olofson (david_AT_gardena.net)
Date: Wed Mar 22 2000 - 00:30:52 EET
On Mon, 20 Mar 2000, Kai Vehmanen wrote:
> Ecasound now has initial LADSPA support. Richard's example plugins work
> fine, although I still have to resolve a few issues (the end-user
> interface, etc). Anyway, here's some questions:
>
> 1. Value range for audio data. I remember someone mentioning [-1,1], but
> Richard seems to use the 16bit-range [-32768,32767]. Which one shall
> we use?
No max/min limits anywhere near the normal signal levels. Period.
I'd just like to point out that a default 0 dB level would be very
useful. How would you otherwise find out what kind of gain you need
to get the signal to a level that makes sense to level sensitive
plugins? Manual trial and error? No way.
Now, what 0 db level to use?
As we're dealing with digital systems, some power-of-2 value is
needed. Looking at what a floating point number actually is, it seems
to me that it doesn't matter much if integer data is normalized to
peak at approximately [-1,1] or say, [-32765,32767]. That is, the
"normalizing" is done by just multiplying with a suitable
1/power-of-2 number, so that the mantissa bit patterns are unchanged,
but the exponents are adjusted to get the peak levels where we want
them.
So, [-3,3] or similar would not work, but anything
[-power-of-2,power-of-2] should be fine.
Finally, the 0 dB level is just a recommended peak level for audio
data. As we're dealing with digital floating point data, it has no
other effect than making the whole systems less confusing to users.
BTW, integer data is quite different in this regard. With 16 bit
data you pretty much have to set 0 dB at the clip level, and make
sure everyone stays beneith it, while with 32 bit data, it might be
acceptable to do like I did in the old 16 bit Audiality engin; set 0
dB at the 24 bit clip level, so that a full resolution 24 bit signal
gets 8 bits of headroom. That's pretty much for transporting data
between plugins...
//David
.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'
This archive was generated by hypermail 2b28 : Wed Mar 22 2000 - 01:11:47 EET