CV Input Signal Types #3 — Clock
| Property | Value |
|---|---|
| Category | Logical / Time-Based |
| Voltage Range | 0..+5V (tolerant up to +12V) |
| Polarity | Unipolar |
| Bandwidth | <1kHz (periodic) |
| Threshold | ~0.7V–2.0V |
Description
A clock signal is a periodic trigger — a steady stream of pulses serving as a timebase. The firmware typically measures the time between rising edges to calculate BPM or frequency.
PPQN (Pulses Per Quarter Note): Eurorack clocks are often not simple quarter notes but high-resolution. The DIN-Sync standard uses 24 PPQN (often generated by MIDI modules). The firmware frequently needs to perform clock division (e.g., divide by 6 for 16th notes at 24 PPQN).
Use Cases
- Timebase for sequencers
- LFO synchronization (clock-sync)
- Determine delay time (tap-tempo)
- Arpeggiator rate
- Clock division / multiplication
- PPQN-based subdivision
Eurorack Examples (Mutable Instruments)
- Marbles: CLOCK input — PLL measures inter-edge interval, generates synchronized random sequences
- Stages: Clock advances segments in sequencer mode
Hardware Implementation
Recommended: GPIO with Timer Input Capture
Clock is the most time-critical logical signal. Hardware timer input capture is superior to pure EXTI because the timer peripheral captures the timestamp in hardware (μs resolution, independent of ISR latency).
Hardware front-end recommended: A 74HC14 Schmitt trigger before the GPIO is especially important for clock inputs. Dirty edges (e.g., from noisy clocks or slowly rising LFO-as-clock) can cause double input capture events without a Schmitt trigger.
Firmware Requirements
- Timer input capture: Hardware timestamp of each rising edge
- PLL/Averaging: Average over multiple periods for stable BPM detection
- Swing preservation: Use averaging only for tempo detection, not for sequencer steps! If the incoming clock has musical swing (shuffle), it must not be averaged out. Sequencer steps should react directly to the incoming edge.
- Timeout detection: Detect when clock stops (e.g., after 2× last interval → internal clock fallback)
- Jitter tolerance: Musical clocks are not perfect — variations up to ±5% are normal
