No matching definitions.

rtmidi/core

src/rtmidi/core.tur
defn

midi-in-new

(midi-in-new [api :cstr] :ptr<void>)

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)

(ok handle) on success; (err 0) on failure. Pass handle as :int to rtmidi/in and rtmidi/core functions. Free with midi-in-free when done.

(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] :ptr<void>)

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)

(ok handle) on success; (err 0) on failure. Pass handle as :int to rtmidi/out and rtmidi/core functions. Free with midi-out-free when done.

(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 :int] :void)

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

miMIDI input handle (ok-val from midi-in-new)

void

(midi-in-free mi)

Since: RM0

defn

midi-out-free

(midi-out-free [mo :int] :void)

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

moMIDI output handle (ok-val from midi-out-new)

void

(midi-out-free mo)

Since: RM0

defn

midi-in-port-count

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

return the number of available MIDI input ports.

miMIDI input handle (ok-val from midi-in-new)

Port count as :int.

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

Since: RM0

defn

midi-out-port-count

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

return the number of available MIDI output ports.

moMIDI output handle (ok-val from midi-out-new)

Port count as :int.

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

Since: RM0

defn

midi-in-port-name

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

return the name of MIDI input port at index i.

miMIDI input handle (ok-val from midi-in-new)
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 :int i :int] :cstr)

return the name of MIDI output port at index i.

moMIDI output handle (ok-val from midi-out-new)
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
__ok-- create an ok result wrapping integer value v.
__err-- create an err result wrapping integer error value e.
__parse-midi-api-- map a keyword string to an rtmidi_api_t value.