Guys, I'm trying to get a good midi clock with 16 to 96 PPQ, but somehow, it doesn't seem that the micros() is returning perfect timing information. Any comments on this?
Here's an example.
ppqtime = 60000000 / (bpm*PPQ); // (60 x 1,000,000) / (BPM*PPQ) - done at SETUP or Time BPM Changed
// In the LOOP //
if (micros() >= prevtime)
{
prevtime += ppqtime;
// send notes now //
}
Best Regards, WilliamK