portmidi v3.0.0 PortMidi
The entry module of portmidi. Through this module you can open and close devices, listen on input devices, or write to output devices.
Summary
Functions
Terminates the GenServer held by the device
argument. If the type is an
input, and listen/2
was called on it, it also shuts down the listening
process. Using the given device
after calling this method will raise an
error
Returns a map with input and output devices, in the form of
PortMidi.Device
structs
Starts a listening process on the given input
, and returns :ok
. After
calling this method, the process with the given pid
will receive MIDI
events in its mailbox as soon as they are emitted from the device
Opens a connection to the device with name device_name
of type
device_type
Starts the :portmidi
application. Under the hood, starts the
Portmidi.Listeners
GenServer, that holds all the listeners to
input devices
Writes a MIDI event to the given output
device. message
must be a tuple
{status, note, velocity}
. Returns :ok
on write
Writes a MIDI event to the given output
device, with given timestamp
.
message
must be a tuple {status, note, velocity}
. Returns :ok
on
write
Functions
Terminates the GenServer held by the device
argument. If the type is an
input, and listen/2
was called on it, it also shuts down the listening
process. Using the given device
after calling this method will raise an
error.
Returns a map with input and output devices, in the form of
PortMidi.Device
structs
Starts a listening process on the given input
, and returns :ok
. After
calling this method, the process with the given pid
will receive MIDI
events in its mailbox as soon as they are emitted from the device.
Opens a connection to the device with name device_name
of type
device_type
.
Returns the pid
to the corresponding GenServer. Use this pid
to call
listen/2
, if the device is an input, or write/2
if it is an output.
Starts the :portmidi
application. Under the hood, starts the
Portmidi.Listeners
GenServer, that holds all the listeners to
input devices.
Writes a MIDI event to the given output
device. message
must be a tuple
{status, note, velocity}
. Returns :ok
on write.