fluidProgramSelect — Assigns a preset from a SoundFont to a channel on a fluidEngine.
ienginenum -- engine number assigned from fluidEngine
ichannelnum -- which channel number to use for the preset in the given fluidEngine
isfnum -- number of the SoundFont from which the preset is assigned
ibanknum -- number of the bank in the SoundFont from which the preset is assigned
ipresetnum -- number of the preset to assign
Here is an example of the fluidsynth opcodes. It uses the file fluid.orc.
sr = 44100 ksmps = 100 nchnls = 2 giengine fluidEngine isfnum fluidLoad "07AcousticGuitar.sf2", giengine, 1 fluidProgramSelect giengine, 1, isfnum, 0, 0 instr 1 mididefault 60, p3 midinoteonkey p4, p5 ikey init p4 ivel init p5 fluidNote giengine, 1, ikey, ivel endin instr 99 imvol init 70000 asigl, asigr fluidOut giengine outs asigl * imvol, asigr * imvol endin
See fluidEngine for more examples.