fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Instrument names, selection etc. through the API


From: Nikhil Nair
Subject: Re: [fluid-dev] Instrument names, selection etc. through the API
Date: Sun, 3 Aug 2014 20:27:10 +0100 (BST)
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

Hi again,

Apologies, it looks like I didn't read enough of the documentation.  I've
got a solution by selecting the instrument, then using
fluid_synth_get_channel_info(), and looking at the name element of the info
structure.

I thought I'd now cracked it - until I found that, while this works with
fluid-soundfont-gm, all the names are blanbk when I do the same with
fluid-soundfont-gs.  Do I take it that names are simply missing from that
file?  Presumably I can't just assume that the same names apply to teh
corresponding program number in both...

Cheers,

Nikhil.


On Sun, 3 Aug 2014, Nikhil Nair wrote:

Hi,

I'm very new to both FluidSynth and MIDI in general, and I'm working out
how to do the basics (play notes, change instruments etc.).  The playing
notes part is fine, as it's well described in the documentation as well as
in the example program that comes with libfluidsynth-dev.

I've installed (on Ubuntu) fluid-soundfont-gm, and have found the SF2 file
in /usr/share/sounds/sf2/.  I presume I just pass that full pathname to
fluid_synth_sfload() - that's fine.

When it comes to changing instrument, I presume I use
fluid_synth_program_change().  However, there seem to be a few facilities
missing: for instance, is there no way to find out the text name of an
instrument, given its number - and hence no way to search for an instrument
with a given name, without first knowing its number?  Even leaving aside
doing this through the API, there's nothing I can find in the Ubuntu
package in terms of a list of instrument names.

Do I assume all such SF2 files define all instruments in the range 0-127?
There doesn't seem to be a function to get the maximum instrument number in
a bank.  Or do I just assume the call to fluid_synth_program_change() will
return FLUID_FAILED if that particular instrument number isn't defined?

Am I missing something major here - or even a whole number of things?

Thanks,

Nikhil.

_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev




reply via email to

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