ok, here’s some MIDI clock testing. if anyone can verify they’re experiencing the same on their unique hardware, that would be very dope.
test case 1: incoming MIDI clock
load script and run with maiden open: test_case_1-midi.lua (213 Bytes)
setup:
- connect to maiden
- attach a MIDI clock source to norns
- nav to EDIT > CLOCK and choose
midi
- ensure the tempo displayed matches the expected tempo
- run the script
script details:
- script starts by truncating the current clock beat number and assigning it to a variable
count
- a coroutine is established
- the coroutine uses
clock.sync(1) to sync to each beat
- each beat increments the
count variable by 1
- each beat prints the current beat number
- in theory, these two values should remain the same (understanding that the printed clock beat might be
+0.00x ahead)
expected results: in the repl, the integer of the left value (clock beat) matches the right value (count)
control: I ran this script with internal clock and got the following expected output (tested for 500 beats)
2990.0006277402 2990
2991.0005184111 2991
2992.0001214273 2992
2993.0006991944 2993
2994.0003110648 2994
2995.0003726984 2995
2996.0004916714 2996
2997.000117394 2997
2998.000491057 2998
2999.0001529897 2999
3000.0003470107 3000
3001.0005175358 3001
3002.000120727 3002
3003.0002333857 3003
3004.0004611609 3004
3005.0004396816 3005
actual results: clock steps are somehow double-tapping, which double-increments the count value
1181.0002472464 1181
1182.000157767 1182
1183.0018666615 1183
1183.9966417216 1184
1184.0018485279 1185
1185.0002404991 1186
1186.0002296293 1187
1187.0005070127 1188
1188.0003569899 1189
1189.000229808 1190
1190.0024096313 1191
1190.9967660519 1192
1191.0018336364 1193
1192.0001773595 1194
1193.0008779371 1195
1194.0000049084 1196
1195.0005623592 1197
1196.0002397995 1198
impact:
- if a script uses a coroutine to advance a counter to determine a 16-beat bar, then the counter would hit 16 beats at the 14th beat
- if a script is just simply re-triggering a synth voice on a steady pulse, the voice is re-triggered and sounds accented