#[non_exhaustive]pub enum ClockMode {
Master {
tempo_bpm: f64,
send_transport: bool,
},
Slave {
clock_input_port: String,
timeout_ns: u64,
},
Passthrough {
clock_input_port: String,
timeout_ns: u64,
multiply: u8,
divide: u8,
},
}Expand description
Selects how the RT thread generates or tracks MIDI clock.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Master
This system is the clock master: it generates clock ticks at the specified tempo and optionally sends MIDI transport messages.
Fields
Slave
This system tracks an external MIDI clock source on the given input port, using a PLL to smooth jitter.
Fields
timeout_ns: u64Timeout in nanoseconds: if no clock tick is received within
this window, the slave reports RtErrorCode::ClockDropout.
Passthrough
This system receives an external MIDI clock and re-emits it on all output ports, optionally multiplied or divided.
Unlike Slave, passthrough mode does not
apply PLL smoothing or oscillator interpolation. It forwards
clock ticks directly, making it suitable for deterministic clock
distribution chains where jitter smoothing is undesirable.
Fields
timeout_ns: u64Timeout in nanoseconds: if no clock tick is received within
this window, a RtErrorCode::ClockDropout event is emitted.