UmpTranslator

Functions

Link copied to clipboard
fun translateSingleUmpToMidi1Bytes(dst: MutableList<Byte>, ump: Ump, dstOffset: Int = 0, deltaTime: Int? = null, sysex: MutableList<Byte>? = null): Int
Link copied to clipboard
fun translateUmpToMidi1Bytes(dst: MutableList<Byte>, src: Sequence<Ump>, context: UmpToMidi1BytesTranslatorContext = UmpToMidi1BytesTranslatorContext()): Int

Converts UMP stream (of either MIDI 1.0 or 2.0) to MIDI 1.0 bytestream, as per Default Translation, with SMF delta time extension (otional). JR Timestamps are expressed as SMF delta time field in a MIDI event. As our MidiMusic2 can hold JR Timestamp fields to actually represent SMF-compatible ticks (i.e. they need to be converted to UMP compatible JR Timestamp to conform to UMP specification), the input UMP stream could contain such JR Timestamps (it is indeed intended to convert Midi2Music track contents to SMF compatible events).