[Top][All Lists]

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

Re: [fluid-dev] Unloading unused patch between MIDI playbacks + force ba

From: Josh Green
Subject: Re: [fluid-dev] Unloading unused patch between MIDI playbacks + force bank
Date: Tue, 22 Apr 2008 23:57:11 -0700

Hello Christian,

On Sun, 2008-04-20 at 10:13 +0200, Christian Casteyde wrote:
> Hello,
> First of all, thanks for fluidsynth which is... fluid! It's fast and works 
> reliably on any machine I used it, without latency and without CPU hog. Seems 
> too to have less noise in the output sound thand Timidity:-)
> I'm thinking however to small things, that IMHO prevent fluid from being a 
> good candidate for default soft synth on low end machines (at least on 
> linux), till having high sound quality.
> Sound quality is really fine with good SF2, but good SF2 are huge. So I'm 
> wondering if fluidsynth could have an option to tell it to unload instruments 
> when it is not playing any MIDI file (as timidity option "-U"). So fluid 
> would reduce its RAM requirements when it's not used (OK, that could be 
> swapped out by the system, but then it would be prone to latencies). Or maybe 
> mlock RAM only before playing the file?
> Better: I'm also wondering if it would be possible to add an option for 
> loading only instruments used by a MIDI file? (It could be tricky if the MIDI 
> file uses program changes of course: that would imply preparsing it. 
> Moreover, that could not work with generic MIDI clients connected). So, 
> instead of having, say 64MB of sound samples in memory, only having 2-4MB 
> while playing a file...
> Another question: I tried to play a file I played on a yamaha piano, that 
> uses 
> XG. Precisely, it uses a MSB/LSB 128 to select its own bank. fluidsynth does 
> not recognise it, and the file is not played. However, apart from the bank, 
> the instrument number is the same (1 for Grand Piano), so would it be 
> possible to simply ignore bank change if the bank is not present in the SF2, 
> just to be able to still play everything with GM instruments? (timidity 
> indeed seems to do that... at least with is option "--force-bank". Meanwhile 
> I'm compelled to edit the MIDI file with RoseGarden, or select standard piano 
> on my piano before playing).
> Thanks for all
> Regards

The new Swami does its own instrument processing and supports sample
loading on demand (when a preset is assigned).  I'm not sure if in
practice this is fast enough for MIDI file playback though, but I
imagine it usually would be.  Pre-scanning the MIDI file for program
change events would help, as you suggested.

I'm still not certain what to do with the FluidSynth instrument
processing.  I have thought about moving more of the functionality from
libInstPatch and Swami in regards to the synthesis instrument handling
into FluidSynth.  An alternative may be to use Swami directly, but that
kind of removes the freedom of choice that FluidSynth has offered.  It
would definitely be nice to have more flexible sample loading and sample
streaming support as well.

Best regards,

reply via email to

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