I’m trying to diagnose why Cantabile doesn’t sync with Playback across tempo changes, and I wonder whether anyone can offer some insight into what I’m seeing in my log file.
Test scenario: MIDI in & out event logging are enabled as Playback switches from a 64.5bpm song to a 75bpm song. The two songs are “linked” in Playback (Playback auto-starts the second song when it ends the first). Cantabile’s transport is set to external clock sync. Cantabile’s meter is set to 6/8 throughout (although in Playback the first song is actually 4/4 and the second is 6/8). I wanted to see what midi info Playback sends to Cantabile under these circumstances.
Q1: At the point of the song-change, I see the following lines in the log file:
15790581 3 [13004:2]: CoreEngine - TI: flags:0x00602e02 6/8 64.507bpm ppq:1255.406 sample: 51495094
15790592 11 [13004:2]: CoreEngine - TI: flags:0x00602e02 6/8 64.507bpm ppq:1255.420 sample: 51496034
15790595 3 [02972:2]: MidiDeviceIn - Unknown midi message: fa 00 00 00
15790595 0 [02972:2]: MidiInjector - Unknown midi message: fa 00 00 00
I assume this means Playback has sent midi clock-start (0xfa), but I don’t see any clock-stop (0xfc) before that except at the very beginning when the test began and at the very end when the test concludes. Does this mean that Playback sends clock-start with no clock-stop when it switches songs? (Seems like a violation of the midi clock protocol?)
Q2: After that, the bpm gradually rises toward 75bpm, the ppq (project position in quarter notes) continues to increase, but the sample position fluctuates. For example, here the sample position decreases while ppq increases:
15790731 3 [13004:2]: CoreEngine - TI: flags:0x00602e02 6/8 64.963bpm ppq:1255.610 sample: 51141966
15790743 12 [13004:2]: CoreEngine - TI: flags:0x00602e02 6/8 65.116bpm ppq:1255.628 sample: 51022984
I assume this is because Cantabile has “gotten ahead of itself” and is trying to backtrack the sample position, but I don’t understand why position isn’t reset to 0 due to clock-start.
Main question: Upon receiving a clock-start message, shouldn’t Cantabile reset the transport position to 0 and be willing to jump the tempo instead of gradually adjusting it? It’s my understanding that although hosts really should send clock-stop before clock-start if the clock is already running, many hosts don’t and that the expected behavior is for clients to treat it like clock-stop-then-start. That doesn’t seem to be what Cantabile does?
–Kevin