Pedro, and all:

It's interesting from your point of view, that the problem happens on
older, less capable machines, because of their floating-point handling,
as well as because of having to reduce the polyphony to avoid excessive
processing overhead.  

So I guess the older machines get hit by it both ways at once.  I know
of the problem because I actually test my courseware on older, less
capable machines.  

It is actually a promotional point for my offering, that you can take a
machine that is gathering dust in the basement (because it won't run
modern versions of Windows), and turn it into a wonderful music
workstation.  

I can still demonstrate this successfully using a 450 megahertz HP
Vectra machine with only 384 megabytes of RAM.  

As I think more about the problem, from what you said, I wonder if the
problem I noticed, and the problem you reported (that David fixed), are
actually the same problem.  Perhaps it was something else fixed in that
later version that fixed my problem.  

I observed my problem on faster, more capable machines as well.  It
definitely happened on my Dell Dimension 1100 machine, which has an
Intel(R) Celeron(R) CPU of 2.53 gigahertz.  

I also observed that applying the re-packaged (altered
version-designation) PPA fix (originally for Ubuntu 11.10) solved the
problem, in that the very poor quality sound (where random new notes are
dropped altogether, or sound only very briefly) does not occur with the
PPA version of libfluidsynth1.  

The problem also happened on my Acer Aspire laptop (which has two
Celeron (R) processors of 2.0 GHz, but uses 64-bit architecture.  That
was observed on Ubuntu 11.10 (I have not yet converted that machine to
12.04).  Again, the PPA fix (which was just a later version of
libfluidsynth1), made the problem's symptoms no longer appear.  

In fact, none of the machines I own - even the fastest and most capable,
are immune from the problem.  

But that being said, I tend to purchase computer hardware from the
trailing edge of the technology curve, and Linux has prolonged their
usefulness - perhaps indefinitely (though with some of the later
releases, I am beginning to have my doubts).  

- Aere

On Mon, 2012-05-28 at 15:56 +0200, Pedro Lopez-Cabanillas wrote:

> Hi,
> 
> On Wednesday 23 May 2012, David Henningsson wrote:
> > FluidSynth upstream) didn't make a bug fix release either. Perhaps we 
> > should do that some time soon...so that the fixes will go into 12.10 at 
> > least...
> 
> I'm not sure if only fixing that particular bug justifies a release. It 
> doesn't harm to do it, of course. But we may face very similar bugs in the 
> future. Let me explain.
>  
> I've found the bug you are talking about some time ago, while I was working 
> with fluidsynth for a Nokia device having an ARM processor:
> http://sourceforge.net/apps/trac/fluidsynth/ticket/100
> 
> This bug was solved by David with this patch:
> http://sourceforge.net/apps/trac/fluidsynth/changeset/435
> 
> The problem was very specific to lowering the polyphony, but the cause was 
> not 
> uncommon and had plagued FluidSynth for a long time. The root problem is 
> denormals in floating point calculations:
> http://en.wikipedia.org/wiki/Denormal_number
> 
> To show a similar problem, here is a simple test scenario.
> 
> 1.- Sample MIDI file: http://www.miditrax.com/Aug/salsa.mid
> 2.- GeneralUser GS Soundfont: http://www.schristiancollins.com/generaluser.php
> 3.- Build FluidSynth (SVN head, or any previous release) in debug mode with 
> floats instead of doubles and FPE checks:
> 
> $ cmake -DCMAKE_BUILD_TYPE=Debug \
>         -Denable-debug=on \
>         -Denable-floats=on \
>         -Denable-fpe-check=on
> 
> Runtime results on an AMD Athlon(tm) XP processor:
> 
> fluidsynth: warning: FPE exception (before or in voice_write vol env): 
> Underflow 
> fluidsynth: warning: FPE exception (before or in voice_write vol env): 
> Denormal number 
> fluidsynth: warning: FPE exception (before or in voice_filter): Underflow 
> fluidsynth: warning: FPE exception (before or in voice_write vol env): 
> Denormal number Underflow 
> fluidsynth: warning: FPE exception (before or in voice_write vol env): 
> Denormal number 
> fluidsynth: warning: FPE exception (before or in voice_filter): Denormal 
> number Underflow 
> 
> When running FS in some old CPUs, denormals penalize CPU performance and 
> sound 
> quality, while in modern CPUs these denormal numbers are automatically fixed 
> in hardware, eliminating the problem.
> 
> My oldest machine is the only one I can access today, which is (slightly) 
> affected by denormals in FluidSynth:
> 
> $ cat /proc/cpuinfo 
> processor       : 0
> vendor_id       : AuthenticAMD
> cpu family      : 6
> model           : 10
> model name      : AMD Athlon(tm) XP 2800+
> stepping        : 0
> cpu MHz         : 2086.903
> cache size      : 512 KB
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 1
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
> cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
> bogomips        : 4173.80
> clflush size    : 32
> cache_alignment : 32
> address sizes   : 34 bits physical, 32 bits virtual
> power management: ts
> 
> My other machines with Intel processors (Core2Duo, Core-i7) implementing SSE2 
> instructions are immune. However, you can tell the GCC compiler to not use 
> the 
> SSE2 instructions with this flag: -mno-sse2 
> 
> $ cmake ... -DCMAKE_C_FLAGS=-mno-sse2 ...
> 
> The above configuration allows some FPU exceptions to be reported on runtime, 
> even in a modern CPU. I would like to know if somebody is able to reproduce 
> my 
> test results and help fixing them.
> 
> Regards,
> Pedro
> 
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev


-- 

Sincerely,
Aere
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to