[Top][All Lists]

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

Re: [fluid-dev] Floats and doubles, simd and interpolation

From: David Henningsson
Subject: Re: [fluid-dev] Floats and doubles, simd and interpolation
Date: Sun, 28 Nov 2010 17:24:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Thunderbird/3.1.6

On 2010-11-28 12:52, Pedro Lopez-Cabanillas wrote:
On Saturday 27 November 2010, David Henningsson wrote:
On 2010-11-27 10:35, Pedro Lopez-Cabanillas wrote:
On Saturday 27 November 2010, David Henningsson wrote:
Yesterday, I tried to chase down a bug I discovered - I rendered a song but
a few notes were slightly out of tune, but only when using floats, not when
using doubles!
I wonder what is causing the bug you described though.  If we could
setup a reproducible file rendering case it would probably help track
down the problem.

The soundfont is the standard FluidR3_GM.sf2, the midi file is
, and the first offending notes are on channel 2, ~25 seconds into the
song. The notes are affected by pitch bend, this is probably related
somehow. That's how long I've come so far.

I couldn't reproduce the problem in any of my development machines. Using 
floats or doubles it sounds pretty much alike.

But I've remembered another report about a similar problem, also related to 
notes and pitch bend events:

I couldn't reproduce a wrong behavior playing this song, either.

After long search, I finally found it! \o/

It's committed as http://sourceforge.net/apps/trac/fluidsynth/changeset/395/

Seems like we[1] used fluid_real_t to represent sample offsets at one
time, and then the sample offsets got rounded off, so that the loop went
slightly longer or shorter.

I've created a simple test case; find it attached [pbtest1.mid]. When rendered 
with FluidR3 and FS 394 compiled with floats, it sounds out of tune. With the 
same scenario but doubles instead of floats, it sounds right. Now, after your 
fix in 395 it sounds right in both cases. Congratulations!

I couldn't verify if this is the same problem reported in ticket #91. Can you 
please take a look?

Yes, it seems to be the same bug. Thanks for the assistance!

// David

reply via email to

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