fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Purpose of dither?


From: Josh Green
Subject: Re: [fluid-dev] Purpose of dither?
Date: Wed, 09 May 2007 19:38:21 +0200

On Wed, 2007-05-09 at 09:44 -0700, Z F wrote:
> I would also like to know if there is this feature in fluidsynth that
> the gain depends on the average signal intensity in the way I outlined
> above. Again, ideally this job should be done by the end-point hardware
> connected to the speakers. All other intermediate steps should be
> linear. Unfortunately, many computer audio cards have only a line
> output. Correct line output (and line input for that matter) is linear.
> Connecting speakers directly to it is not correct but is often done (I
> do that).
> 

Currently FluidSynth uses just a fixed gain value.  I agree, and have
mentioned before, that it would be nice if there was a more convenient
way of handling this.  Since indeed, a fixed gain is hard to get right
and often times the output ends up being rather bad sounding digitally
clipped garbage.  Having some sort of dynamic (following average) gain,
or something similar, would be a nice option (provided it can be turned
off).  Automatic Gain Control I suppose.

> My understanding that Mihail introduced dithering into the synthesizer
> because of the gain issue which he outlined above. I think that that
> issue can and should be solved differently. If the output of
> synthesizer is connected directly to the speaker than gain-control
> feature which I outlined should be implemented, possibly with
> dithering. If output of synthesizer is used as input to jack (or other
> module) than the synth output should be linear and no dithering should
> be used. It is the job of the following modules to do the gain-control.
> 

Indeed no dithering occurs with Jack, as mentioned several times ;)

> Implementing gain-control is not simple. It should react on average
> volume not instantaneous. No matter what you do, since the module will
> perform a non-linear operation, it will introduce non-linear
> distortions
> into the signal. That is why all audio modules opearate (or should
> operate) using linear input/outputs, and the last stage will do the
> non-linear thing. Many hardware audio amplifiers have the non-linear
> thing build-in, but I am not sure that you can control the shape of the
> curve.
> 
> This is how I understand the audio processing chain.
> 
> Oh, even though I made such a long speach.. this discussion is very
> educational to me. So, I hope to hear more, even though people are
> probably tired of that...
> 
> All the best
> 
> ZF
> 

I for one appreciate discussions more than no discussions, and if
something productive comes out of it, even better! :)

Anyone have any suggestions for algorithms to use for an automatic gain
control?  Is such a thing even desirable?  Some sort of running average
I imagine would suffice.  How does other software handle this?
        Josh






reply via email to

[Prev in Thread] Current Thread [Next in Thread]