Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

MIDI clock

:ID: 24E1468A-279A-4B44-8AB8-A8A1C5D8D42D

See also MIDI messages

# Clock Message

  • 24 messages = 1 quarter note.
  • When 24 clock messages are received, the receiving MIDI device knows that 1 quarter note has passed.
  • To generate a MIDI clock signal, calculate the pulse rate based on the BPM and send a simple message at that rate.

# Formula

# Pulse per ms rate

1 minute = 60 seconds = 60,000 ms

60,000 ms / ppq * bpm

Example using 120 BPM:

ppq = 24.0
bpm = 120.0

ppms = 60_000 / (ppq * bpm)
"One pulse every #{ppms} ms"
One pulse every 20.833333333333332 ms

# Message Contents

# Status

0xF8

There is no channel number.

# Data

No data is required for this message, just the status byte

# Sequencing

# MIDI Start

# MIDI Stop

# MIDI Continue

# Sending MIDI Clock from Mixxx

# Existing Limitation

Mixxx only supports a 20ms resolution timer. This will work for BPMs under 100 so it’s not practical. See ControllerScriptInterfaceLegacy::beginTimer. It uses QObject startTimer which only supports using MS. This need microsecond precision.

# Possible solution

See https://stackoverflow.com/a/21856299.

This would require adding a high resolution timer. Maybe an API like engine.beginHighResTimer.

# Resources

Search Results