class

OutputStream

Inherits PMStream < Reference < Object

An output MIDI stream.

Constructors

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. This convenience method provides default for most of its arguments.

Source

Instance methods

abort_write

Terminates outgoing messages immediately. This stream should be closed immediately after this call. Raises an exception on error.

Source
write(buffer : Pointer(LibPortMIDI::Event), length : Int32)

Writes the length LibPortMIDI::Event structs in buffer. Raises an exception on error.

Source
write(buffer : Array(LibPortMIDI::Event))

Writes all of the LibPortMIDI::Event structs in buffer. Raises an exception on error.

Source
write_short(msg : UInt32, when_tstamp : Int32 = 0)

Writes a single msg at time when_tstamp (now by default). Raises an exception on error.

Source
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). Raises an exception on error.

Source
write_sysex(msg : Pointer(UInt8), when_tstamp : Int32 = 0)

Writes a sysex msg at time when_tstamp (now by default). Raises an exception on error.

Source
write_sysex(msg : Array(UInt8), when_tstamp : Int32 = 0)

Writes a sysex msg at time when_tstamp (now by default). Raises an exception on error.

Source