[Top][All Lists]

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

Re: [fluid-dev] parallel loading of soundfont samples

From: Hamish Moffatt
Subject: Re: [fluid-dev] parallel loading of soundfont samples
Date: Tue, 27 Oct 2020 20:10:33 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 27/10/20 6:27 pm, Marcus Weseloh wrote:
Thinking about this some more...

If I interpret your question as "What is the fastest way to load a
whole Soundfont on app startup?", then my answer would be: simply load
an SF2 file.

Hi Marcus, thanks for considering my idea. As you guessed, I'm using SF3 to reduce the size of my distribution. I could convert to SF2 on first load, if I had for that. Using a regular compressor like zip on the SF2 is not very effective.

I did look through the sfloader code and I can see it's not easy to restructure it to use multiple threads. I could easily arrange to load my two soundfonts in a thread each but I don't think the API allows for this.

My two SF3s take about 3.5 seconds each to load, spent in fluid_synth_sfload(). This is on a fast CPU (i9-9900k). Anyway, I've actually since implemented Reinhold's suggestion:

On 27/10/20 7:14 pm, Reinhold Hoffmann wrote:
We use SF3 files for some years now due to the reasons Marcus outlined below
and where faced with the same problem of long loading times. As a solution
SF3 soundfonts are loaded in the background where the app is already up and
ready for the user but the sound subsystem is not yet ready.

In most cases my users won't need the synth until it's ready anyway, so I load the soundfonts on a background thread and only block if the user starts to use the synth before the loading completes.

Still, I think parallel loading of the soundfonts would be a good optimization that would benefit every application using Fluidsynth.



reply via email to

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