Ecasound MIDI Clock Sync with Hardware Sequencers

Ecasound coordinates playback and recording with external hardware sequencers primarily through MIDI Machine Control (MMC), MIDI Time Code (MTC), and the JACK Audio Connection Kit ecosystem. While Ecasound is engineered fundamentally as a multitrack digital audio processor rather than a dedicated MIDI sequencer, it provides specialized input and output interfaces that allow users to align audio playback precisely with external hardware tempo and transport commands.

MIDI Clock vs. Transport Control

To understand synchronization in Ecasound, it is necessary to distinguish between transport control and tempo-based clock synchronization:

Ecasound natively excels at absolute time tracking (MTC/MMC) and external audio clocking rather than generating continuous 24 PPQN MIDI Beat Clock streams directly. Consequently, synchronization with external hardware sequencers is generally achieved using one of two primary approaches: direct ALSA MIDI transport integration or the JACK Audio Connection Kit.

Method 1: Using the JACK Audio Connection Kit

The most robust and timing-accurate way to synchronize Ecasound with external hardware sequencers is through JACK Transport. In this setup, JACK functions as the master or slave clock authority, while an intermediary tool handles the generation of 24 PPQN MIDI clock pulses.

  1. Routing Audio via JACK: Launch Ecasound configured to use the JACK audio subsystem for input and output:
    ecasound -i:jack -o:alsa -c
  2. Synchronizing Transport: Ecasound automatically links its internal engine position to JACK Transport when using JACK inputs or outputs, allowing it to start, stop, and relocate synchronously.
  3. Generating MIDI Clock: Use a specialized bridge utility, such as jack_midi_clock or a lightweight sequencer like seq24, to translate JACK Transport position and tempo into hardware-compliant MIDI Clock pulses sent directly to your external hardware's physical MIDI DIN or USB port.

Method 2: ALSA MIDI Machine Control (MMC)

If your external hardware sequencer supports MMC, Ecasound can listen for incoming transport commands directly through the ALSA sequencer subsystem without third-party translation tools.

Latency and Drift Compensation

Audio buffers and hardware MIDI interfaces introduce processing latency. When locking Ecasound with an external sequencer: