fluidAllOut

fluidAllOut — Collects all audio from all Fluidsynth engines in a performance

Syntax

aleft, aright fluidAllOut

Description

Plugin opcode in fluidOpcodes. This opcode is part of the plugin repository and has to be installed separately. The plugin repository can be found here: https://github.com/csound/plugins

Collects all audio from all Fluidsynth engines in a performance

Performance

aleft -- Left channel audio output.

aright -- Right channel audio output.

Invoke fluidAllOut in an instrument definition numbered higher than any fluidcontrol instrument definitions. All SoundFonts send their audio output to this one opcode. Send a note with an indefinite duration to this instrument to turn the SoundFonts on for as long as required.

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

Here is an example of the fluidAllOut opcodes. It uses the file fluidAllOut.csd.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac  -+rtmidi=virtual -M0    ;;;realtime audio out and realtime midi in
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
;-o fluidAllOut.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

giengine1 fluidEngine
isfnum1	  fluidLoad "sf_GMbank.sf2", giengine1, 1
	  fluidProgramSelect giengine1, 1, isfnum1, 0, 0

giengine2 fluidEngine
; soundfont path to manual/examples
isfnum2	  fluidLoad "22Bassoon.sf2", giengine2, 1
	  fluidProgramSelect giengine2, 1, isfnum2, 0, 70

instr 1

     mididefault   60, p3
     midinoteonkey p4, p5
ikey init p4
ivel init p5
     fluidNote giengine1, 1, ikey, ivel

endin

instr 2

     mididefault   60, p3
     midinoteonkey p4, p5
ikey init p4
ivel init p5
     fluidNote giengine2, 1, ikey, ivel

endin

instr 100

imvol init 7 ;amplify a bit
asigl, asigr fluidAllOut
      outs asigl*imvol, asigr*imvol

endin
</CsInstruments>
<CsScore>

i 1 0 2 60 127 ;play one note on instr 1
i 2 2 2 60 127 ;play another note on instr 2 and...
i 100 0 60     ;play virtual midi keyboard
e
</CsScore>
</CsoundSynthesizer> 

See Also

fluidEngine, fluidNote, fluidLoad

More information on soundfonts is in the Floss Manuals: https://flossmanual.csound.com/midi/reading-midi-files

For other information on soundfonts look in the Wikipedia: http://en.wikipedia.org/wiki/Soundfont

Credits

Opcode by Michael Gogins (gogins at pipeline dot com). Thanks to Peter Hanappe for Fluidsynth, and to Steven Yi for seeing that it is necessary to break up the Fluidsynth into several different Csound opcodes.