fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Proposal for a new feature: lazy-loading of SoundFonts


From: Marcus Weseloh
Subject: Re: [fluid-dev] Proposal for a new feature: lazy-loading of SoundFonts
Date: Sun, 15 Apr 2018 23:18:33 +0200

Hi all,

I've finished the first draft of the dynamic sample loading. You can see the change in this pull request:
https://github.com/FluidSynth/fluidsynth/pull/366

If you want to try out the changes, please check out the dynamic-sample-loading branch:
https://github.com/FluidSynth/fluidsynth/tree/dynamic-sample-loading

The implementation is actually quite simple and follows the approach that I've outlined earlier. When loading a Soundfont, everything apart from the sample data is loaded. As soon as a preset is selected for a channel, all samples of all instrument zones in that preset are individually loaded into memory. And when a preset is unselected again, all samples of all instrument zones of that preset are unloaded from memory again, unless they are still in use by another selected preset. The loading and unloading is triggered by the fluid_preset_t::notify and fluid_sample_t::notify callbacks.

What I haven't implemented yet is the parsing of a MIID file before playback to pre-load all used presets in the file. I think that can be added later, once the overall idea and implementation of dynamic loading has been finalised.

I've done a fair amount of testing of the code with both SF2 and SF3 files, but I would be very grateful if some of you could also give it a spin. To enable the feature, please use the
new "synth.dynamic-sample-loading" setting.

I'm looking forward to your feedback!

Cheers,

    Marcus

reply via email to

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