MidiSync clock generator

Operation

The primary purpose of MidiSync firmware is to generate a stable MIDI Clock using the less stable MIDI Clock usually received from a DAW. To do this MidiSync averages incoming MIDI Clock over the period of one quarter note (24 MIDI Clock ticks) and uses the average period to calculate incoming clock BPM.

If the incoming clock appears to be stable enough (that’s when subsequent quarter notes’ measured duration does not differ too much) MidiSync locks on to the incoming clock and replaces it with the super stable clock that has the same phase and frequency but is generated by the internal hardware timer.

In addition, MidiSync can start and stop synchronized devices in a quantized manner: on the next beat or bar, perfectly in sync with the incoming clock.

Tempo Control

Normally MidiSync uses incoming MIDI Clock events to generate its output clock, however, MidiSync can be used as a master clock source as well. In this mode you set the tempo using the Clock page or Control Change messages sent from the external MIDI device on the MIDI channel selected on the MIDI Channel page.

The following CC messages are supported:

  • #10 – increment tempo by 0.1 if value > 63, otherwise decrement by 0.1
  • #11 – increment tempo by 1 if value > 63, otherwise decrement by 1 
  • #12 – increment tempo by 10 if value > 63, otherwise decrement by 10
  • #13 – set tempo selected at the MinTempo page
  • #14 – set tempo selected at the MaxTempo page
  • #15 – set tempo that was initially loaded for the current program

User interface

MidiSync user interface consists of pages which are selected by encoder rotation. Each page displays a single parameter value.

Click the encoder to activate parameter change mode in which parameter value is surrounded in square brackets and encoder rotation changes it. Click the encoder again to leave parameter change mode.

Double clicking the encoder saves all parameter values to the currently selected memory slot on all but the Main pages. The Main page allows you to save settings into a different memory slot which is selected by the encoder rotation.

The switch starts and stops the devices connected to MidiSync’s MIDI OUT. MIDI Start and Stop events that are sent when the switch is pressed can be optionally delayed until the next beat or bar. You can use this to temporarily stop and later restart downstream devices in sync with the system clock.

Pressing the switch while holding down the encoder knob will send MIDI Stop and MIDI Start events in quick succession effectively re-starting the downstream devices. Use this to restart manually stopped downstream devices.

Main page

Click the encoder to enter persistent memory slot selection mode. Brackets appear around the slot name. Rotate the encoder to select another slot. Click the encoder to load the selected slot into memory.

Pressing the switch while the slot name is surrounded by brackets activates slot name editing mode. Rotate the encoder to change the character under the blinking cursor. Press the switch to move the blinking cursor to the next character. Click the encoder again to exit name editing mode.

Saving the slot on the Main Page is slightly different from that on all other pages because it allows you to save into a different location: double click the encoder, turn it to select target location, then click it again to save. Press the switch to cancel the save operation.

Clock page

Click the encoder to set tempo. This tempo will override the tempo estimated by averaging incoming MIDI Clock events until the encoder is clicked again to exit the tempo change mode.

The arrow on the left side of the tempo is present when MidiSync is receiving MIDI Clock. This arrow is hollow while MidiSync is trying to lock onto the incoming clock and black when it is locked.

The arrow on the right side of the tempo is present when MIDI Clock is being sent to MIDI OUT. It’s black when synchronized devices are running (after MIDI Start message was sent) and hollow when they are stopped.

BeatLength page

Specifies duration of a beat. Default value is a quarter note.

BeatNumber page

Specifies number of beats in a bar. Default value is 4, so by default the device’s time signature is 4/4.

HoldStart page

Specifies how the outgoing MIDI Clock Start events are quantized:

  • off – not quantized
  • bar – quantized to the next bar
  • beat – quantized to the next beat 

HoldStop page

Specifies how the outgoing MIDI Clock Stop events are quantized:

  • off – not quantized
  • bar – quantized to the next bar
  • beat – quantized to the next beat 
  • beat1 – quantized to the first beat of the next bar 

RoundBpm page

If set to ‘on’ , the incoming clock is assumed to be a whole integer and the BPM estimator will round off any fractional part.

Threshold page

Specifies a numeric factor that defines when the incoming clock is considered stable and MidiSync locks on at it.

Higher values increase tolerance, lower values result in the tight tolerance. Increase threshold if the incoming clock is not stable enough for MidiSync to lock onto the incoming clock. Set it to a minimal value which allows MidiSync to stay locked.

ConstClock page

If set to ‘on’ the output clock is sent even if the device is stopped. This is a preferred setting that allows slave devices to measure incoming clock before they start playback.

Min/MaxTempo pages

These specify variable tempo range, see Control Change 10…15. Used when one needs to vary tempo using a CC during live performance.

PassThru page

If set to ‘on’ all the incoming non MIDI Clock related messages are passed to MIDI OUT. You may want to set this to ‘off’ if the output MIDI stream becomes too clogged.

ProgChange page

If set to ‘on’ incoming Program Change messages will load the memory slot corresponding to the program number.

MidiChannel page

Specifies MIDI channel the incoming Control and Program Change messages are recognized on. 

Resources

MidiSync runs on MidiGAL hardware, however you can also run it on MidiBUD and, with some limitations due to the lack of the switch, on any Mutable Instruments MIDIpal compatible hardware.

Firmware (.syx and .hex): midisync_112 (use midiclock_pal.syx if your device has MIDIpal bootloader)