fluidNote

fluidNote — Plays a note on a channel in a fluidSynth engine.

Syntax

fluidNote ienginenum, ichannelnum, imidikey, imidivel

Description

Plays a note at imidikey pitch and imidivel velocity on ichannelnum channel of number ienginenum fluidEngine.

Initialization

ienginenum -- engine number assigned from fluidEngine

ichannelnum -- which channel number to play a note on in the given fluidEngine

imidikey -- MIDI key for note (0-127)

imidivel -- MIDI velocity for note (0-127)

Examples

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.

See Also

fluidEngine, fluidLoad

Credits

Michael Gogins (gogins at pipeline dot com), Steven Yi. Thanks to Peter Hanappe for Fluidsynth.