Wrapper for Jack (Jack Audio Connection Kit) midi
Allows creating in/out ports, and registering callbacks of various types.
Callback name + argument list of callback function
See [[register]]/[[unregister]], which work analogous to [[add-watch!]] (idempotent, REPL safe, etc).
Wrapper for Jack (Jack Audio Connection Kit) midi Allows creating in/out ports, and registering callbacks of various types. Callback name + argument list of callback function - :process [client frames] - :buffer-size-changed [client buffersize] - :client-registered [client name] - :client-unregistered [client name] - :ports-connected [client port-name-1 port-name-2] - :ports-disconnected [client port-name-1 port-name-2] - :port-registered [client port-name] - :port-unregistered [client port-name] - :sample-rate-changed [client rate] - :client-shutdown [client] - :update-position [client state frame pos new-pos] See [[register]]/[[unregister]], which work analogous to [[add-watch!]] (idempotent, REPL safe, etc).
(audio-in-port name)
(audio-in-port client name)
Get a virtual audio input port with a given name. Idempotent.
Get a virtual audio input port with a given name. Idempotent.
(audio-out-port name)
(audio-out-port client name)
Get a audio output name for a given client with a given name. Idempotent.
Get a audio output name for a given client with a given name. Idempotent.
Some pairs of callbacks types are bundled in a single Java callback interface, in these cases we need to know that if one of them is already initialized, the other is too.
Some pairs of callbacks types are bundled in a single Java callback interface, in these cases we need to know that if one of them is already initialized, the other is too.
(client client-name)
Get a client for a given name, creating it if it doesn't exist.
Get a client for a given name, creating it if it doesn't exist.
Registry of JackClientWrapper instances (keyword->JackClientWrapper).
Used to make calls to client
idempotent
Registry of JackClientWrapper instances (keyword->JackClientWrapper). Used to make calls to [[client]] idempotent
(connect conns)
(connect from to)
(connect client from to)
Connect two jack ports, from
and two
are strings.
Connect two jack ports, `from` and `two` are strings.
(connect! conns)
(connect! client conns)
Sets jack connections to exactly the given connections, given as a list of pairs (port names, String). Will sever any existing connection that is not in the list. Ports that don't currently exist are ignored.
Together with connections
this gives you a way to capture the current
state of a patch as EDN, and restore it later.
Sets jack connections to exactly the given connections, given as a list of pairs (port names, String). Will sever any existing connection that is not in the list. Ports that don't currently exist are ignored. Together with [[connections]] this gives you a way to capture the current state of a patch as EDN, and restore it later.
(connections)
(connections client)
(connections client port)
Get all jack connections as a sequence of from
/to
pairs (both String).
Get all jack connections as a sequence of `from`/`to` pairs (both String).
(disconnect from to)
(disconnect client from to)
Connect two jack ports, from
and two
are strings.
Connect two jack ports, `from` and `two` are strings.
(filter-pipe in out pred)
Utility for creating midi filters, forward all messages from in
to out
if
they satisfy pred
.
Utility for creating midi filters, forward all messages from `in` to `out` if they satisfy `pred`.
When a callback of a given type is registered for the first time, register an actual Java callback object for that type, which dispatches to all of our registered callbacks.
When a callback of a given type is registered for the first time, register an actual Java callback object for that type, which dispatches to all of our registered callbacks.
(make-client name)
Construct a new Jack client. Prefer client
which is idempotent.
Construct a new Jack client. Prefer [[client]] which is idempotent.
(make-transport-leader)
(make-transport-leader client-or-force?)
(make-transport-leader client force?)
Attempt at becoming the Jack Transport leader, this requires you provide a
:update-position
callback, which takes the current transport state and
frames, and based on that determines the other position fields, e.g
beat/bar/tick.
Will fail if another process is already leader, unless force?
is set to
true.
Attempt at becoming the Jack Transport leader, this requires you provide a `:update-position` callback, which takes the current transport state and frames, and based on that determines the other position fields, e.g beat/bar/tick. Will fail if another process is already leader, unless `force?` is set to true.
(midi-in-port name)
(midi-in-port client name)
Get a virtual midi input port with a given name. Idempotent.
Get a virtual midi input port with a given name. Idempotent.
(midi-out-port name)
(midi-out-port client name)
Get a midi output name for a given client with a given name. Idempotent.
Get a midi output name for a given client with a given name. Idempotent.
(port name type flags)
(port client name type flags)
Get a virtual audio or midi port.
Get a virtual audio or midi port.
(ports)
(ports client)
(ports client type-and-flags)
Get a vector of Jack ports (strings). Optionally takes a set of keywords to
filter by type and port flags, e.g. #{:midi :out}, #{:audio :physical}.
See port-flags
for options.
Get a vector of Jack ports (strings). Optionally takes a set of keywords to filter by type and port flags, e.g. #{:midi :out}, #{:audio :physical}. See [[port-flags]] for options.
(read-midi-event port idx)
Read one of the midi events that are available in this processing cycle for the
given port. Unless you're doing something very specific you probably want to
use read-midi-events
instead.
Read one of the midi events that are available in this processing cycle for the given port. Unless you're doing something very specific you probably want to use [[read-midi-events]] instead.
(read-midi-events port)
Read midi events that happened in this processing cycle for a given input port. Call within a processing callback.
Read midi events that happened in this processing cycle for a given input port. Call within a processing callback.
(lookup this type key)
Find a given callback
Find a given callback
(register this type key val)
Register a callback
Register a callback
(unregister this type key)
Remove a callback
Remove a callback
(seek-transport! frame)
(seek-transport! client frame)
Move the Jack Transport position to a specific frame.
Move the Jack Transport position to a specific frame.
(start-transport!)
(start-transport! client)
Start (play) Jack Transport control
Start (play) Jack Transport control
(stop-transport!)
(stop-transport! client)
Stop Jack Transport control
Stop Jack Transport control
(transport-pos)
(transport-pos client)
Get the current transport position as a map.
Get the current transport position as a map.
(write-midi-event port time msg)
Write a midi event to a given port at a given time (frame offset).
Write a midi event to a given port at a given time (frame offset).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close