No matching definitions.

rtmidi/core

src/rtmidi/core.tur
defopaque

MidiIn

(MidiIn)

opaque handle to an RtMidi input port (RtMidiInPtr).

defopaque

MidiOut

(MidiOut)

opaque handle to an RtMidi output port (RtMidiOutPtr).

defn

midi-in-new

(midi-in-new [api : cstr] :)

create an RtMidi input handle for the given backend API.

apibackend keyword: ":alsa", ":core-midi", ":winmm", ":jack", ":dummy",
or any other value for RTMIDI_API_UNSPECIFIED (auto-select)

(Result MidiIn int) -- ok carries the live handle; err carries an integer status code (1 = rtmidi_in_create returned NULL; 2 = handle returned but its `ok` flag was false).

(let [r (midi-in-new ":core-midi")]
    (if (ok? r) (let [mi (ok-val r)] ...) (println "midi-in init failed")))

Since: RM0

defn

midi-out-new

(midi-out-new [api : cstr] :)

create an RtMidi output handle for the given backend API.

apibackend keyword: ":alsa", ":core-midi", ":winmm", ":jack", ":dummy",
or any other value for RTMIDI_API_UNSPECIFIED (auto-select)

(Result MidiOut int) -- ok carries the live handle; err carries an integer status code (1 = rtmidi_out_create returned NULL; 2 = handle returned but its `ok` flag was false).

(let [r (midi-out-new ":core-midi")]
    (if (ok? r) (let [mo (ok-val r)] ...) (println "midi-out init failed")))

Since: RM0

defn

midi-in-free

(midi-in-free [mi : MidiIn] :)

destroy an RtMidi input handle created with midi-in-new.

miMIDI input handle (ok-val of the midi-in-new result)

void

(midi-in-free mi)

Since: RM0

defn

midi-out-free

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

destroy an RtMidi output handle created with midi-out-new.

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

void

(midi-out-free mo)

Since: RM0

defn

midi-in-port-count

(midi-in-port-count [mi : MidiIn] :)

return the number of available MIDI input ports.

miMIDI input handle (ok-val of the midi-in-new result)

Port count as :int.

(println (midi-in-port-count mi))

Since: RM0

defn

midi-out-port-count

(midi-out-port-count [mo : MidiOut] :)

return the number of available MIDI output ports.

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

Port count as :int.

(println (midi-out-port-count mo))

Since: RM0

defn

midi-in-port-name

(midi-in-port-name [mi : MidiIn i : int] :)

return the name of MIDI input port at index i.

miMIDI input handle (ok-val of the midi-in-new result)
iport index (0-based, must be < midi-in-port-count)

Port name as :cstr.

(println (midi-in-port-name mi 0))

Since: RM0

defn

midi-out-port-name

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

return the name of MIDI output port at index i.

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

Port name as :cstr.

(println (midi-out-port-name mo 0))

Since: RM0

Internal definitions
_parse-midi-api-- map a keyword string to an `enum RtMidiApi` value.