Issues with playing midi notes every set number of quarter notes

Hello there!

I am having an issue with an Ableton-related playback(tested this in FL, it works, yes I have licenses for both). I’ve made a plugin that plays notes based on every X/4 note(So every quarter note to every 16 quarter notes, with multiple instances creating polymetric fun). The plugin works consistently with X = [1,10], including startup, changing X, and continued playback. At X = [11,14], I can get there if the system was already playing and I changed the X to that value.

Now this is where the fun begins: after 450 BPM in Ableton, I get the expected playback for all values of X. If the tempo is being automated, during when the note should play, I get the expected result.

Some screenshots:

The top image has an automation of the tempo from 90-450, with notes to be played every 16 quarter notes. Notice how notes aren’t playing during constant 90 at the tail ends of this test.

The bottom image is me ramping X from 1 to 16. Again, at max value, there are no notes playing every 4 bars.

Here’s the github for the code I sent around to my friends for them to test with the readme.

I was on the discord last night and got a few tips with getting values pulled from the process block into the GUI using the timerCallback() method.

If anyone has any suggestions on how to go about sending a few values to the GUI for visual debugging or insight as to how LIVE sends out it’s ppq information, that would be great.

Lemme know if I need to clarify anything.
Thank you!

Update: I guilt-tripped the plugin with a GUI being enabled(nothing in it) and it works by some miracle.

Hope this helps someone!