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: Aere Greenway
Subject: Re: [fluid-dev] Instrument names, selection etc. through the API
Date: Sun, 03 Aug 2014 13:50:43 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

Nikhil:

On Linux, there is an easy way to experiment with instrument (patch) changes, as well as the various MIDI controls.

You can install (and run) VMPK (package vmpk).

With FluidSynth running, if you click the Edit menu, and select "Connections", a dialog will appear, and in the "Output MIDI Connection" drop-box, you will see FluidSynth (which you can select), and then click the "OK" button.

Then, when you click on keys of its piano keyboard, you will hear sounds via FluidSynth.

In the controls visible, you will see a "Bank" drop-box, and a "Program" drop-box, and you can use the "Program" drop-box to change instruments.

Initially, it starts out with the General MIDI (GM) set of instruments, but there are more banks than just that in the FluidR3_GM.sf2 soundfont.

From the "File" menu of VMPK, select "Import Soundfont", and specify the soundfont you are using (such as FluidR3_GM.sf2). You can have it output an instrument definitions file (.ins), which you can look at with a text editor, but you probably don't need to output a file.

If you just import the soundfont you are using, the "Bank" drop-box will be filled in with the banks available in the soundfont, and when you select a bank, the instruments available in the selected bank will appear in the "Program" drop-box. You can then select the various available instruments using the "Program" drop-box.

You can also experiment with other MIDI controls using VMPK.

This should give you a good start in exploring the world of MIDI on Linux.

- Aere


On 08/03/2014 05:41 AM, 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



--
Sincerely,
Aere




reply via email to

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