class OutputStream
- OutputStream
- PMStream
- Reference
- Object
Overview
An output MIDI stream.
Defined in:
port_midi/output_stream.crConstructors
-
.open(output_device_num : Int32, output_driver_info : Pointer(Void) | Nil = nil, buffer_size : Int32 = 1024, time_proc : Pointer(Void) -> LibPortMIDI::PmTimestamp | Nil = nil, time_info : Pointer(Void) | Nil = nil, latency : Int32 = 0) : OutputStream
Opens and returns a new
OutputStream.
Instance Method Summary
-
#abort_write
Terminates outgoing messages immediately.
-
#write(buffer : Pointer(LibPortMIDI::Event), length : Int32)
Writes the length
LibPortMIDI::Eventstructs in buffer. -
#write(buffer : Array(LibPortMIDI::Event))
Writes all of the
LibPortMIDI::Eventstructs in buffer. -
#write_short(msg : UInt32, when_tstamp : Int32 = 0)
Writes a single msg at time when_tstamp (now by default).
-
#write_short(status : UInt8, data1 : UInt8 = 0_u8, data2 : UInt8 = 0_u8, when_tstamp : Int32 = 0)
Writes a single MIDI message consisting of status, data1 (default value 0), and data2 (default 0) at time when_tstamp (default now).
-
#write_sysex(msg : Pointer(UInt8), when_tstamp : Int32 = 0)
Writes a sysex msg at time when_tstamp (now by default).
-
#write_sysex(msg : Array(UInt8), when_tstamp : Int32 = 0)
Writes a sysex msg at time when_tstamp (now by default).
Instance methods inherited from class PMStream
close
close,
host_error? : Bool
host_error?,
stream : LibPortMIDI::Stream
stream,
synchronize
synchronize
Constructor methods inherited from class PMStream
new(stream : LibPortMIDI::Stream)
new
Constructor Detail
Opens and returns a new OutputStream. This convenience method provides
default for most of its arguments.
Instance Method Detail
Terminates outgoing messages immediately. This stream should be closed immediately after this call. Raises an exception on error.
Writes the length LibPortMIDI::Event structs in buffer. Raises an
exception on error.
Writes all of the LibPortMIDI::Event structs in buffer. Raises an
exception on error.
Writes a single msg at time when_tstamp (now by default). Raises an exception on error.
Writes a single MIDI message consisting of status, data1 (default value 0), and data2 (default 0) at time when_tstamp (default now). Raises an exception on error.
Writes a sysex msg at time when_tstamp (now by default). Raises an exception on error.
Writes a sysex msg at time when_tstamp (now by default). Raises an exception on error.