Loss of quality with --enable-float option?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Loss of quality with --enable-float option?

Marcus Weseloh
Hi all,

I'm just wondering: have any of you ever noticed a difference in sound
quality between FluidSynths that have been compiled with the standard
double and the --enable-float option?
My intention is not to change anything here. I'm just curious, as I
really can't hear a difference...

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Loss of quality with --enable-float option?

Tom M.
> have any of you ever noticed a difference in sound quality

No.

... But let me try a mathematical approach (feel free to correct me):
fluidsynth uses floats in the range [-1.0 ; 1.0]. Floats have a
precision of about 10^-7 . Considering rounding errors that may occur
during the bunch of operations that we apply to a single audio sample
(voice mixing, panning, attenuating, reverb, chorus, IIR) we might end
up with a precision of 10^-5 in worst case. Transforming this to a
more handy 16 bit signed integer samples: 10^-5 * 32768 = 0.32768 .
This is the relative sample quantization error that we make when using
single precision. Let's just ceil this value, i.e. for every sample
computed in single precision we may have an integer quantization error
of +-1 . This is exaggerated and I doubt that this error is audible,
but in any case: One could just take any favorite piece of audio and
apply a random quantization error of +-1 to each and every sample.
Experimentally increase this error until some difference to the
original waveform is audible.

(Btw. for the old autotools build system enable-floats was actually
true by default. Not sure whether this was intentionally changed when
switching to cmake.)


Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Loss of quality with --enable-float option?

Ceresa Jean-Jacques

Hi,

> have any of you ever noticed a difference in sound quality

Me too never heard any difference trough my old head phone !.

 

Thanks to useful Tom's pratical approch to evaluate the smallest error estimate from float to 16 bit PCM.

 

>Experimentally increase this error until some difference to the original waveform is audible.

Problably an easy and excellent experiment to do. If one will do this experiment, please take care to disable dithering (inside the code).

jjc.

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Loss of quality with --enable-float option?

Carlo Bramini
In reply to this post by Tom M.

Hello,

This is the relative sample quantization error that we make when using

single precision. Let's just ceil this value, i.e. for every sample
computed in single precision we may have an integer quantization error
of +-1 .

BTW, it should be noted that since dithering is applied when writing 16bit samples, the LSB of each sample is not significant because it moves in a pseudo-random way. So, probably this quantization error is a "do-not-care" error when emitting with 16bit samples, indipendently by the math resolution.


Sincerely.


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev