fluidOpcodes

fluidEngine - creates a fluid engine
fluidLoad - loads a soundfont into a fluid engine
fluidProgramSelect - assign a bank and preset of a soundFont to a midi channel as well as select
fluidCC - send midi controller data to fluid
fluidPlay - plays a note on a channel
fluidOut - outputs sound from a fluid engine

Description

This family of opcodes are meant to be used together to load and play SoundFonts using Peter Hannape's Fluidsynth. Use global engines, soundFonts, and outputs.

Based on work by Michael Gogins.

Syntax

iEngineNumber fluidEngine

iInstrumentNumber fluidLoad sfilename, iEngineNumber

fluidProgramSelect iEngineNumber, iChannelNumber, iInstrumentNumber, iBankNumber, iPresetNumber

fluidCC iEngineNumber, iChannelNumber, iControllerNumber, kValue

fluidNote iEngineNumber, iInstrumentNumber, iMidiKeyNumber, iVelocity

aLeft, aRight fluidOut iEngineNum

 

Initialization

iEngineNumber - engine number assigned from fluid_engine

iInstrumentNumber - instrument number assigned from fluid_load

sfilename - String specifying a SoundFont filename

aLeft - left channel audio output.

aRight - right channel audio output.

iMidiKeyNumber - midi key number to play (0-127)

iVelocity - midi velocity to play at (0-127)

iBankNum - bank number on soundfont to play

iPresetNum - preset number on soundfont to play

iprogram - Number of the fluidsynth program to be assigned to a MIDI channel.

Performance

In this implementation, SoundFont effects such as chorus or reverb are used if and only if they are defaults for the preset. There is no means of turning such effects on or off, or of changing their parameters, from Csound.

 

Examples

 

Credits

Opcode library created by Steven Yi, based on fluid opcode plugin by Michael Gogins.