fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Major degradation in sound quality & cpu usage going fro


From: Aere Greenway
Subject: Re: [fluid-dev] Major degradation in sound quality & cpu usage going from Ubuntu 11.04 to 11.10
Date: Thu, 27 Oct 2011 19:09:41 -0600

David:

I downloaded the source for the older level of FluidSynth, but didn't know how to build it. 

But I remembered the file structure in Unix (and Linux), and looked for the executables in /usr/bin. 

I use qsynth (which uses FluidSynth).  On finding it in the Ubuntu 11.04 system, and in the 11.10 system, I substituted the different executables in each system, and what I found was surprising, from the symptoms I had observed. 

First, the old version (from 11.04) of qsynth on Ubuntu 11.10 also failed.  The new version (from 11.10) on 11.04 worked fine. 

I therefore conclude that the cause is in Ubuntu 11.10. 

Perhaps the path-lengths with interrupts locked out are too long.  Perhaps something is causing problems by other means. 

What I notice on 11.10 (also with the old version of qsynth), is that everything seems fine until I try playing one of my sequences with many parts, and many simultaneous notes.  Within about 30 seconds, things 'go bad', and stay bad.  After that point, even simple sequences play poorly.  Even playing notes on the keyboard is bad. 

If I terminate qsynth, and restart it, it is fine again - as long as I don't try playing one of my more complicated sequences (more than one of them will cause the same problem). 

If you would like to experiment with it, I could send you one of them (as a MIDI file). 

Anyway, I was glad to discover it wasn't a problem with FluidSynth, since this is the most important component of my music/MIDI education package I've been working on. 

I'm thinking of trying another distribution of Linux - probably Xubuntu, which I have been using for my minimum systems already. 

I think Ubuntu's new Unity desktop (though it looks good) has some serious problems if you're wanting to run MIDI software, and JACK (qjackctl) in particular. 

Thank you for considering my problem, and in suggesting something to try. 

Sincerely,
Aere


On Sun, 2011-10-23 at 20:35 +0200, David Henningsson wrote:
On 2011-10-22 21:11, Aere Greenway wrote:
> FluidSynth Developers:
>
> In trying out FluidSynth on Ubuntu Linux 11.10 (Oneiric Ocelot), I
> encountered a serious degradation in sound generation (quality), and a
> much higher CPU usage than in the prior releases.
>
> The CPU-usage problem alone causes MIDI sequences that played fine on
> FluidSynth on a 1-gigahertz machine, to have many under-runs in JACK, on
> even a machine twice as fast.
>
> The sound generation problem doesn't appear as obviously, until you play
> sequences with many different tracks, and many notes playing together
> (which played well on Ubuntu 11.04, even on slower machines).
>
> What is happening, is that it sounds fine for the first few seconds,
> then from that point on, in many cases, new notes fail to play. For
> example, the oboe part may occasionally sound a note, but most of them
> are missing. Same thing for the flute part, and others.
>
> I noticed this immediately in trying out Ubuntu 11.10, because as a
> matter of course, I have found it to be a good idea to configure the
> polyphony parameter (Qsynth setup) to a value of 64, rather than the
> default of 256. I have been doing this to avoid JACK under-runs, playing
> the piano sound on FluidSynth with heavy (perhaps sloppy) sustain-pedal
> usage.
>
> When I set the polyphony value up to 256 (the default), the sequence
> that failed to play properly, sounded much better, but it was still bad.
> I had to set the polyphony parameter all the way up to 384 before it
> seemed to play the piece, but still sounded worse than on earlier
> releases. I suspect the reason for this, is that newer notes are being
> discarded instead of older notes (that faded, and are no longer sounding
> anyway).
>
> Of course, with the entire sound-generation 'table' full all the time
> (and with 6 times as many notes to be sounded by the processor), the CPU
> usage has shot up to levels where only my fastest machine can play it at
> all, where before, they played fine on a 1-gigahertz machine, and even
> on an 800 megahertz machine (with occasional under-runs).
>
> I experimented with this by setting the polyphony parameter down to 16
> (the minimum allowed), and then playing notes, going up the keyboard
> from left to right. The notes were each held down for about 2 seconds,
> then I went to the next note. I did not use the sustain pedal.
>
> Several (some) notes past 16 notes, it seemed that most notes (every
> other note?) would play for maybe 1/4 second, then stop playing, even
> though the note was still depressed.
>
> I experimented with the sustain pedal, and things seemed actually to
> work better when using it, though I can't definitively say how.
>
> My suspicion is (and it is only speculation) that complex code for
> dropping the oldest notes from the sound-generation 'table' has been
> removed, hoping to reduce overhead, and some other scheme of removing
> the 'old' notes from being played has been substituted. This new scheme
> ends up with new notes being discarded in favor of notes already in the
> sound generation 'table', even though those old notes have already faded
> to an inaudible level. It also ends up requiring a much larger
> sound-generation 'table', and every note 'sounded' uses processor time.
>
> In the old version (Ubuntu 11.04, and prior), it seemed to remove the
> oldest notes (from the sound-generation 'table') in favor of the new
> notes. So if I set the polyphony level lower (64, or 48), it would sound
> great, and avoid under-runs, even on a slower machine.
>
> Could someone please comment on this?
>
> I have been relying on Qsynth/Fluidsynth (which has been extraordinarily
> reliable) as the basis of a major music education initiative, which I am
> (was) about to unveil.
>
> Everything still works fine using the Soundblaster card emu10k1 hardware
> synthesizer. But that isn't going to help you if you have a laptop.
> Qsynth/Fluidsynth is the component that is now failing, and with it
> failing, I cannot go forward to future Linux releases.
>
> Another work-around would be to use an external synthesizer, but the
> midisport-firmware package is no longer available in Ubuntu 10.10, so
> you can't even hook up your external synthesizer without a Soundblaster
> card (which you can't use on a laptop or half-high machine).

Ubuntu 11.04 ships with FluidSynth 1.1.3 and Ubuntu 11.10 ships with 
FluidSynth 1.1.4, so there are indeed differences in the engine. I can't 
think of any that would cause a lot of difference in CPU usage, so 
chances are the problem are in lower layers. Are you using the same 
latency settings (which?) in both distributions? Would it be possible 
for you to test either FS 1.1.4 on Ubuntu 11.04 or FS 1.1.3 on Ubuntu 
11.10 to ensure that the problem is in FS and not anywhere else?

// David


-- 

Sincerely,
Aere

reply via email to

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