I need to define the length of a certain process in some units that are synced to the host. I though quarter notes in a simple fractional notation like 2.5 will mean two and a half quarter note (2 quarters and one eighth).
I was wondering how do i calculate the length of a single quarter note in a processBlock() call, i get the ppqPosition in a double type that is not really 960 * amunt of quarter notes. It’s a bit more complicated then that. Could someone share the math to get the amount of passed quarter notes ?
Also how does that all fit into the beats, bars, numerator, denominator musical notation stuff ?
What i need is to know how long to keep the process running, i thought i could be more precise and to keep track of ppqPosition, but i don’t know how to calculate what position will an event be based on the length in quarter notes. I can see the code that’s in the audio plugin example that show bars/beats/ticks, but i got confused because it looks like there is 120tick per quarter note when i debug in Reaper (maybe those ticks that the audio plugin calculates are not ppq ?)
currentPosition = AudioPlayHead::getPositionInfo();