CurrentPositionInfo.ppqPositionOfLastBarStart


#1

CurrentPositionInfo.ppqPositionOfLastBarStart seems to be returning the number of quarter notes from the start of the edit to the start of the current beat rather than the current bar. Is this a bug in my host, or am I missing something?

Cheers,
Caleb


#2

In a VST, that value is taken directly from the host, so must be a host bug.

In an AU it’s taken from the host’s “current measure down-beat”, which I think should be correct, unless I’m misinterpreting the meaning of that rather ambiguous phrase…

Which host/plugin type are you using?


#3

VST and energyXT

I just tried it in Tracktion and it works correctly there, so it must be an eXT problem.

Here’s the workaround in case anybody else needs it:

double quarterNotesPerBar = info.timeSigNumerator*4.0/info.timeSigDenominator; double lastBarPos = int(info.ppqPosition/quarterNotesPerBar)*quarterNotesPerBar;


#4

That’s annoying, isn’t it.

Your workaround’s ok, but I don’t think it’ll work properly if there are time-sig changes - it’s really only the host that can correctly supply that value.


#5