[Top][All Lists]

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

Re: [fluid-dev] Loss of quality with --enable-float option?

From: Tom M.
Subject: Re: [fluid-dev] Loss of quality with --enable-float option?
Date: Tue, 11 Jun 2019 17:53:20 +0300

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


... 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.)


reply via email to

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