outic

outic — Sends MIDI controller output at i-rate.

Description

Sends MIDI controller output at i-rate.

Syntax

outic ichn, inum, ivalue, imin, imax

Initialization

ichn -- MIDI channel number (1-16)

inum -- controller number (0-127 for example 1 = ModWheel; 2 = BreathControl etc.)

ivalue -- floating point value

imin -- minimum floating point value (converted in MIDI integer value 0)

imax -- maximum floating point value (converted in MIDI integer value 127 (7 bit))

Performance

outic (i-rate MIDI controller output) sends controller messages to the MIDI OUT device. It works only with MIDI instruments which recognize them. It can drive a different value of a parameter for each note currently active.

It can scale an i-value floating-point argument according to the imin and imax values. For example, set imin = 1.0 and imax = 2.0. When the ivalue argument receives a 2.0 value, the opcode will send a 127 value to the MIDI OUT device. When the ivalue argument receives a 1.0 value, it will send a 0 value. i-rate opcodes send their message once during instrument initialization.

Examples

Here is an example of the outic opcode. It uses the file outic.csd.

Example 577. Example of the outic opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

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

sr = 44100
ksmps = 32
nchnls = 2

instr 1

ikey notnum 
ivel veloc
kbrt = 40			;set controller 74 (=brightness)			
outic 1, 74, kbrt, 0, 127	;so filter closes a bit
midion 1, ikey, ivel		;play external synth

endin
</CsInstruments>
<CsScore>
f0 30	;runs 30 seconds

e
</CsScore>
</CsoundSynthesizer>


See Also

outiat, outic14, outipat, outipb, outipc, outkat, outkc14, outkc, outkpat, outkpb, outkpc

Credits

Author: Gabriel Maldonado
Italy

New in Csound version 3.47

Thanks goes to Rasmus Ekman for pointing out the correct MIDI channel and controller number ranges.