[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] Getting all instrument names from a loaded soundfont fil
From: |
Tom M. |
Subject: |
Re: [fluid-dev] Getting all instrument names from a loaded soundfont file |
Date: |
Thu, 11 Jul 2019 15:01:52 +0200 |
ATM, you can only get the names of the soundfont presets, see preset iteration
here:
https://github.com/FluidSynth/fluidsynth/blob/b8cc5197953f74700feda84b6ade3dc56419978f/src/bindings/fluid_cmd.c#L843-L860
Everything below that level, i.e. which samples belong to which instruments and
which instruments to which presets, is currently internal to fluidsynth.
What could be implemented pretty straight forward is iterating over all the
samples that a soundfont has. This might also include lonesome samples, that
are not linked to any instrument. Also, you would not know which samples belong
to which preset and the soundfont instrument layer would be invisible as well.
Implementing an iteration over all instruments of a preset as well as all
samples of an instrument would need some discussion, but it would make sure
that you only see instruments and samples that are actually used. In this case
it would be good to know what's the benefit you're intending by displaying
sample names to the user and what else you're planning to do when you have the
sample. Thinking of e.g. changing the sample's wave form and manually spawning
voices from it.
Tom
Re: [fluid-dev] Getting all instrument names from a loaded soundfont file,
Tom M. <=