InputStream
An input MIDI stream.
Constructors
open(input_device_num : Int32, input_driver_info : Pointer(Void) | Nil = nil, buffer_size : Int32 = 1024, time_proc : Pointer(Void) -> LibPortMIDI::PmTimestamp | Nil = nil, time_info : Pointer(Void) | Nil = nil) : InputStream
Opens and returns a new InputStream. This convenience method provides
default for most of its arguments.
Instance methods
Reads up to length LibPortMIDI::Event structs into buffer. Raises
an exception on error.
Reads LibPortMIDI::Event structs into buffer, up to the length of
the buffer. Raises an exception on error.
set_channel_mask(bitmask : UInt32)
Sets the channel maks for this input stream. Raises an exception on error.
set_filter(filters_bitmask : UInt32)
Sets the filter bitmask for this input stream. Raises an exception on error.
wait_for_data(sleep_secs = 0.001)
Polls for data, waiting sleep_secs between polls. sleep_secs may be sub-second.