MIDI bar/beat Sync

KarenColumbo

Active member
Dear PJRCers, I've been breaking my wee head with this:
I want to incorporate a kind of "on -the-fly Arpeggiator" in my MIDI to CV project for Teensy 4.1. I know I can read MIDI ticks and calculate the necessary note lengths (say 16th as a start) and let them play "in sync" with the continous MIDI ticks. But if I, say, phat-finger the one by some ticks, the Arpeggiator will be in time, but also off the beat indefinitely. I'm a reasonably skilled player, but hitting a one exaclty on the correct 24th fration of a 16th note is not granted.

I've seen mention of the message "usbMIDI.TimeCodeQuarterFrame", but, alas, no information about what it acually does, how and what to parse from it. But my suspicion that "Quarter" means "quarter note" makes me somewhat optimistic to contruct something out of this information and a calculation of MIDI tempo from the ticks - IF both are in sync.

Someone out here who has had and solved the same problem?
 
If externally clocked and Start has been received then count ticks to create a beat Pulse.

Then use beat Pulse to trigger Arpeggiator into action when incoming NoteOn == true or something.

Gizmo's Arpeggiator and Sequencer found here:- https://github.com/eclab/gizmo/ do not use MIDI.TimeCodeQuarterFrame to accomplish on beat and sync, useful resource perhaps.
 
If externally clocked and Start has been received then count ticks to create a beat Pulse.

Then use beat Pulse to trigger Arpeggiator into action when incoming NoteOn == true or something.

Gizmo's Arpeggiator and Sequencer found here:- https://github.com/eclab/gizmo/ do not use MIDI.TimeCodeQuarterFrame to accomplish on beat and sync, useful resource perhaps.

Ah, thanks, I'll definitely have a look at this.

Yeah, I'll be "externally sync-ed" to play along to a running MIDI time code. That's why I need definite quarter notes to extrapolate fractions from those to be in sync.
 
I guess what I SHOULD have asked is:

How do VSTi synth plug-ins get the information to "snap-on" to the current quantize setting? What information do they get that I can't get over wired MIDI?
 
Hello, I'm doing the same thing, calculating the time between MIDI clock messages to work out the tempo and no it's not greatly accurate.

I believe VSTs get tempo information directly from their host (like Ableton etc) along with other a load of other information. They're not having to work it out from MIDI messages!
 
Back
Top