Companion

object Companion

Properties

Link copied to clipboard
const val DEFAULT_TEMPO: Int = 500000
Link copied to clipboard
const val META_EVENT: Int = 255
Link copied to clipboard
const val SYSEX_END: Int = 247
Link copied to clipboard
const val SYSEX_EVENT: Int = 240

Functions

Link copied to clipboard
Link copied to clipboard
fun getPlayTimeMillisecondsAtTick(messages: Iterable<MidiMessage>, ticks: Int, deltaTimeSpec: Int): Int
Link copied to clipboard
fun getSmfBpm(data: ByteArray, offset: Int): Double
Link copied to clipboard
fun getSmfTempo(data: ByteArray, offset: Int): Int
Link copied to clipboard
fun getSmpteDurationInSeconds(smfDeltaTimeSpec: Int, ticks: Int, tempo: Int = DEFAULT_TEMPO, tempoRatio: Double = 1.0): Double
Link copied to clipboard
fun getSmpteTicksForSeconds(smfDeltaTimeSpec: Int, duration: Double, tempo: Int = DEFAULT_TEMPO, tempoRatio: Double = 1.0): Int
Link copied to clipboard
fun getSmpteTicksPerSeconds(smfDeltaTimeSpec: Int): Int

Calculates ticks per seconds for SMPTE for a SMF delta time division specification raw value. frameRate should be one of 24,25,29, and 30. We dare to use UByte as the argument type to indicate that the argument is NOT the raw negative number in deltaTimeSpec.

Link copied to clipboard
fun getTotalPlayTimeMilliseconds(messages: Iterable<MidiMessage>, deltaTimeSpec: Int): Int