JackoNoteOut

JackoNoteOut — Sends a MIDI channel message to a Jack port.

Description

Plugin opcode in jacko. 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

Sends a MIDI channel message to a Jack MIDI output port inside this instance of Csound, and in turn to its connected external Jack MIDI input port.

Syntax

JackoNoteOut  ScsoundPortName, kchannel, kdata1[, kdata2]

Initialization

ScsoundPortName -- The short name ("portname") of the internal Jack MIDI output port.

Performance

kchannel -- MIDI channel (from 0 through 15).

kdata1 -- First data byte of a MIDI channel message.

kdata2 -- Optional second data byte of a MIDI channel message.

This opcode can be called any number of times in the same kperiod. Messages from multiple instances of the opcode sending to the same port are collected before sending.

Running status, system exclusive messages, and real-time messages are not supported.

The granularity of timing is Csound's kperiod.

[Note] Note
works with an already running Jack daemon. Do not use -+rtaudio=jack in CsOptions

Examples

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

Example 500. Example of the JackoNoteOut opcode.

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

<CsoundSynthesizer>
<CsOptions>
-n ; no sound
</CsOptions>
<CsInstruments>

sr      = 48000 ; one possible Jack setting
ksmps   = 128
nchnls  = 2

; by Menno Knevel - 2023

JackoInit   "default", "csound6"						; Csound as a Jack client
JackoMidiOutConnect "midioutMAUDIO", "M-Audio-Delta-1010:midi/capture_1"	; create 1 Midi port
JackoMidiOutConnect "midioutEDIROL", "UM-3:midi/capture_1"			; create 2nd Midi port

	instr 1	; send notes to the M-Audio Midi port	

irandom     random      30, 80
JackoNoteOut "midioutMAUDIO", 1-1, irandom, 100		    ; channel range 0-15
	endin

      instr 2 ; send notes to Edirol Midi port	

irandom     random      30, 80
JackoNoteOut "midioutEDIROL", 1-1, irandom, 100
	endin

</CsInstruments>
<CsScore>
s
i1 1 .1
i1 2 1
i1 4 2
s
i2 1 .1
i2 2 1
i2 4 2
e 
</CsScore>
</CsoundSynthesizer>


See also

Jacko Opcodes

Credits

By: Michael Gogins 2010