writeTrackEvent

writeTrackEvent encodes a single track event to binary data and puts it into output.

If you want to encode using running status (meaning it leaves out the status byte if this event's status byte is the same as the previous one), set runningStatus to the previous event's status byte. Otherwise, set it to 0.

void
writeTrackEvent
(
T
)
(
ref T output
,
ref const TrackEvent event
,)
if (
isOutputRange!(T, ubyte)
)

Parameters

output T

the output range to send the bytes to

event TrackEvent

the track event that is encoded to bytes

runningStatus ubyte

the previous event's status byte; set to 0 if you don't care about saving space using running status

Meta