No matching definitions.

rtmidi/out

src/rtmidi/out.tur
defn

midi-out-open

(midi-out-open [mo : MidiOut i : int name : cstr] :)

open a physical MIDI output port by index.

moMIDI output handle (ok-val of the midi-out-new result)
iport index (0-based, must be < midi-out-port-count)
nameclient name to register with the system

(Result int int) -- ok carries 0; err carries an integer status code (1 when the underlying RtMidi handle's `ok` flag is false after the open call).

(let [r (midi-out-open mo 0 "Turmeric Out")]
    (if (ok? r) ... (println "open failed")))

Since: RM0

defn

midi-out-open-virtual

(midi-out-open-virtual [mo : MidiOut name : cstr] :)

open a virtual MIDI output port.

moMIDI output handle (ok-val of the midi-out-new result)
namename for the virtual port

(Result int int) -- ok carries 0; err carries an integer status code (1 when the open call left the handle's `ok` flag false).

(let [r (midi-out-open-virtual mo "My Virtual Out")]
    (if (ok? r) ... (println "virtual open failed")))

Since: RM0

defn

midi-out-close

(midi-out-close [mo : MidiOut] :)

close the currently open MIDI output port.

moMIDI output handle (ok-val of the midi-out-new result)

void

(midi-out-close mo)

Since: RM0

defn

midi-out-send

(midi-out-send [mo : MidiOut bytes : cstr len : int] :)

send a raw MIDI message buffer on the output port.

moMIDI output handle (ok-val of the midi-out-new result)
bytespointer to raw MIDI bytes as :cstr (e.g. msg-bytes from rtmidi/msg)
lennumber of bytes to send (e.g. msg-len from rtmidi/msg)

(Result int int) -- ok carries 0; err carries the non-zero return code from rtmidi_out_send_message.

(let [m (msg-note-on 0 60 127)]
    (midi-out-send mo (msg-bytes m) (msg-len m))
    (msg-free m))

Since: RM0