MidiMessage.toBytes

Write the raw MIDI data in a buffer data of capacity len.

If given < 0 len, return the number of bytes needed to return the whole message. Note: Channel Pressure event, who are 2 bytes, are transmitted as 3 in VST3 (no issue) but also in LV2 (BUG).

struct MidiMessage
pure nothrow @nogc const
int
toBytes
(
ubyte* data
,
int buflen
)

Return Value

Type: int

Number of written bytes. If the MIDI message has an unknown (aka unsupported) length then nothing gets written, zero is returned.

Meta