I’ve been fighting with CurrentPositionInfo for hours now. Call me simple minded but I don’t understand how to PROPERLY & COMPLETELY fill out this structure! I could sure use a clear and complete description of how to provide a drum machine with what it needs to work properly. At this point, having done my ppq calculations wrong, my drum machine is stuttering at (repeatably) 20 bars, and 33 bars into the song I’m trying to play! Playing with the ppq’s in the structure affects this.
Musically I know the tempo in bpm and the time signature.
I have a ‘start/stop’ button - when started I want to reset to the ‘beginning of time’ and hear the drums kickoff.
I know the sample rate, and my audio callback tells me how many samples its got.
With that I can calculate where I am in time.
I have set the frame rate to 24fps.
So, with the information above - what EXACTLY do I have to do to PROPERLY and COMPLETELY calculate the ppqPosition and ppqPositionOfLastBarStart? - And, if I’m the host (I am) then is it me (gotta be) who calculates the ppq resolution? and how does that factor into the equation. I have been hunting the web all day and am no closer to understanding what I should do. And yes, I’m in frustrated musician AND frustrated programmer mode who’s had too much coffee today…
Oh, and why the !@#$ does anything CARE what the lastBarStart position is anyway???
Thanks for listening!