Re: [LAD] FULL audio-signal path

From: Dan Mills <dmills@email-addr-hidden>
Date: Sat Jul 21 2007 - 15:56:27 EEST

On Sat, 2007-07-21 at 14:42 +0400, Andrew Gaydenko wrote:
> Hi, All!
>
> Say, we have such audio-chain:
>
> 1. analogue source (say, mic-amp),

Adds noise.

> 2. sound card's line input (let sound card be rme hdsp9632),

Soundcard must dither correctly (This sorts the linearity of the
quantisation process), and means that the bit depth ONLY changes the
noise floor, you can still detect signals down to below 1 LSB).
Output is (In your case),24 bit samples packed into 32 bit words.
Typically you actually get somewhere around 19 bits with the lowest few
being swamped by thermal noise.

> 3. JackRack (or some other JACKified LADSPA host) with the only LADSPA plugin,
> let last one be a simple aplifier,

All the Jack stuff converts to 32 bit floats, which provides for a 24
bit mantissa (Convenient that!).

> 4.1. sound card SPDIF output.
> 4.2. sound card analogue output,

Jack converts back to soundcard native format (24 bit integer in 32 bit
word IIRC for the HDSP), full sale is considered to be +-1.0 on the
float side of the equation. For 16 bit cards, dither is optionally added
to this conversion to linearise it. This is not considered necessary at
24 bit as the error is buried in the system noise for all practical
systems anyway.

> OK, ALSA-driver, HdspMixer, JACK-server and something else are somewhere
> inside this "user' POV" list.

Hdspmixer deals with DSP on the card, who knows what it does to the
audio exactly? But it is probably done right.

Alsa driver just passes along the DMA buffers from the card.

Jack converts the integer sample values to floating point (Effectively
lossless), and scales to +- 1.0 full scale (not saying that signals
within the jack graph cannot exceed +-1.0, but that if they do at the
output they will clip.

> And more generally: are there common rules for keeping sound quality intact? I mean
> only format-related probable issues rather hardware issues like jitter and such.

Be very careful how you write float->int conversions (it is not
trivial), and work in floating point as far as is possible, there is
little reason (other then marketing) to move to doubles (IIR filters
possibly excepted).

When writing plugins, watch out for possible aliasing.

With that card you do NOT need to be peaking at -1dbFS, you have plenty
of dynamic range, so line up for your nominal zero level to be somewhere
around -16 or so, you will loose far less takes to digital overs, and
generally sweat less.

Regards, Dan.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Sat Jul 21 16:15:03 2007

This archive was generated by hypermail 2.1.8 : Sat Jul 21 2007 - 16:15:04 EEST