Re: [linux-audio-dev] LADSPA problem

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] LADSPA problem
From: David Olofson (david_AT_gardena.net)
Date: Mon Oct 23 2000 - 02:33:43 EEST


First, I'm not enough up to date with LADSPA to answer this;

On Thu, 19 Oct 2000, Steve Harris wrote:
> Hi,
>
> I've been playing with LADSPA on and off for a couple of days, but I've
> hit a problem: as far as I can tell the input range of an audio stream is
> not specified, I was expecting it to be -1 to 1, but it looks like the
> host can choose any value it likes.

Well, a host cannot actually choose a signal range at all, as it
can't know how all plugins will affect the signals. For example,
filters (resonant ones in particular) can affect the peak amplitudes
to great extent, and dynamically.

So, what do you do; apply a dynamic compressor after every plugin,
passing the current attenuation over a sidechain channel, or just do
nothing?

To me, the latter makes a lot more sense, as that's what happens in
analog systems. Also, one of the major advantages of using floating
point data is just that you get rid of the restricted dynamic range
of integer data. This makes things a lot easier inside the DSP loops,
and I really think this advantage should serve the user as well, by
letting entire plugin nets operate along the same principles.

> This causes problems with amplitude dependent plugins. I don't seem to be
> able to specify upper and lower bounds on audio ins (analyseplugin gets
> confused, anyway, always shows 0 to 0).

Do you have upper bounds on analog inputs when designing hardware FX
boxes?

Well, yes you do, due to limitations of how high reference voltages
you can use in the cirquitry, but in general, you try to keep these
limits way above any sane signal levels, so that clipping won't
distort the signals in ways that the FX box cannot control.

I think the same design principles make a lot of sense to floating
point DSP plugins, and it should apply there as well.

> What are you supposed to do? The limiter I looked at works by asking
> for the threshold (in arbitary units), but this isn't a very good
> solution.

How about dB?

> Surely the user isn't expected to know the internal ranges
> of thier application?

No, but knowing that plugins think about some certain amplitude as
the 0 dB level should do. Whether the actual amplitude is fixed or
negotiated per connection is another matter, but I think the first
alternative is a lot more sane than the latter.

> There is a LADSPA_HINT_SAMPLE_RATE, why not a
> LADSPA_HINT_AMPLITUDE?

Or how about just saying that -1.0 .. 1.0 is the desired 0 dB
amplitude of signals? This doesn't restrict anyone from using a
completely different range, but it would make things a lot easier for
users.

(As to plugin packages with different 0 dB signal levels, that would
be pretty much like interfacing between the analog standards around
in studio and consumer equipment, on that it's pointless with
floating point digital signals. Amplitude does not affect SNR in this
world.)

We have discussed this on LAD, but I can't remember if any final
decision was made, or if it's in the offcial spec...

//David

.- M u C o S -------------------------. .- David Olofson --------.
| A Free/Open Source | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
| for | | Open Source Advocate |
| Professional and Consumer | | Singer |
| Multimedia | | Songwriter |
`-----> http://www.linuxdj.com/mucos -' `---> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Oct 23 2000 - 04:04:46 EEST