By HouseWithoutMouse
Sun Aug 14, 2022 8:49 pm
I wanted to find out how stable the Force's MIDI clock really is, compared to other devices. I set the contestants to output MIDI clock, set the tempo to 60 BPM and recorded the MIDI output signals as audio, and wrote a Python script to calculate an instantaneous BPM figure from the distance between clicks in the audio. For Ableton and Arturia Keystep 37, I used a 5-pin-to-TRS adapter cable, and for the Force I simply used a TRS cable to get the signal. I don't want to comment on the results, everyone can decide what's good enough for something and what isn't.
Akai Force
Here's Force playing MIDI clock at 60 bpm. Empty project with the default 2 tracks, but no clips, nothing going on, just playing to get MIDI clock out. The big peak at the end was caused by stopping playback on the Force, which sends other MIDI events in addition to just MIDI clock.
Zoomed in:
Ableton Live Mac
Ableton Live 9.2.3 on an old Macbook Pro, Focusrite 18i20 USB audio/MIDI interface. I also recorded the audio back to Ableton itself, and it was set to 64 samples audio buffer length and 44100 Hz sampling rate. (I might try again with other buffer lengths)
Zoomed in:
Arturia Keystep 37
Finally, Arturia Keystep 37 set to use its internal clock as master, powered from USB. The peaks at the beginning and the end are caused by there being some other MIDI events besides just MIDI clock pulse, like start/stop. I didn't investigate what messages they were exactly.
And zoomed:
Python code for creating the images, if you want to test your own devices:
Akai Force
Here's Force playing MIDI clock at 60 bpm. Empty project with the default 2 tracks, but no clips, nothing going on, just playing to get MIDI clock out. The big peak at the end was caused by stopping playback on the Force, which sends other MIDI events in addition to just MIDI clock.
Zoomed in:
Ableton Live Mac
Ableton Live 9.2.3 on an old Macbook Pro, Focusrite 18i20 USB audio/MIDI interface. I also recorded the audio back to Ableton itself, and it was set to 64 samples audio buffer length and 44100 Hz sampling rate. (I might try again with other buffer lengths)
Zoomed in:
Arturia Keystep 37
Finally, Arturia Keystep 37 set to use its internal clock as master, powered from USB. The peaks at the beginning and the end are caused by there being some other MIDI events besides just MIDI clock pulse, like start/stop. I didn't investigate what messages they were exactly.
And zoomed:
Python code for creating the images, if you want to test your own devices:
Code: Select all
# Calculate and plot MIDI clock stability from MIDI signal recorded as audio
def plot_stability(wav_file_path, accept_between, plot_between):
import soundfile as sf
signal_n_channel, fs = sf.read(wav_file_path)
if len(signal_n_channel.shape) > 1:
signal = signal_n_channel.T[0] # take first channel if there are more
else:
signal = signal_n_channel
import matplotlib.pyplot as plt
import numpy as np
tick_bpms = []
times = []
prev_tick = 0
in_tick = False
for x in range(len(signal)):
if (not in_tick) and (signal[x] < -.5):
in_tick = True
time_between_ticks = x - prev_tick
if time_between_ticks > 0:
tempo_bpm = 60 / ((time_between_ticks / fs) * 24)
if (tempo_bpm >= accept_between[0]) and (tempo_bpm <= accept_between[1]):
tick_bpms.append(tempo_bpm)
times.append(x / fs)
prev_tick = x
else:
if (in_tick) and (signal[x] > -.2):
in_tick = False
fig, ax = plt.subplots()
ax.plot(times, tick_bpms, linewidth=2.0)
import os
(dummy, filename) = os.path.split(wav_file_path)
ax.set(title=filename, ylim=plot_between, xlabel='time (sec)', ylabel='tempo (bpm)')
plt.show()
plot_stability('data/MIDI_clock_Ableton_Mac_Focusrite_18i20_60bpm.wav', accept_between=(20,100), plot_between=(55,65))
plot_stability('data/MIDI_clock_Akai_Force_60bpm.wav', accept_between=(20,100), plot_between=(55,65))
plot_stability('data/MIDI_clock_Arturia_Keystep_37_60bpm.wav', accept_between=(20,100), plot_between=(55,65))