Nice find!  Glad that issue got resolved, even if we[1] was part of
the original problem ;-)

Cheers,
Element

On Sun, Nov 28, 2010 at 8:24 AM, David Henningsson <di...@ubuntu.com> wrote:
> 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
>>>>>
>>>>> http://www.mididatabase.com/20100702/pop/steviewonder/Dont_You_Worry_About_a_Thin.mid
>>>>> , 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:
>>>> http://lists.nongnu.org/archive/html/fluid-dev/2010-10/msg00101.html
>>>> http://sourceforge.net/apps/trac/fluidsynth/ticket/91
>>>>
>>>> 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
>
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/fluid-dev
>

_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to