Problem with ProTools ppqPosition

Hi,
We are having a problem with ProTools on both Win and Mac. When we call AudioPlayHead::getCurrentPosition from within ProcessBlock(), the ppqPosition is incorrect. It appears to be lower than it should. Eg. If we start playback at position 0, it returns a negative value. It seems to return the incorrect value when playing (ie. not when stopped).

Just wanted to see if any others had seen this issue. We are only experiencing it on ProTools. All other DAW’s return the correct position.

Thanks.

Something quick to check - it isn’t just that pre roll is turned on inside Pro Tools and so playback is starting earlier than you’re asking it to?

Doug,
No, pre-roll is not turned on in this case.

1 Like

Have you checked the return value isn’t offset by your buffer size?

Rail

I don’t think so… My buffer size is 1024. I trace into the getCurrentPosition function in juce_aax_wrapper.cpp when it starts playing at position 0.

transport.GetCurrentNativeSampleLocation() returns -440 for samples, and transport.GetCurrentTickPosition returns -19156.
My sample rate is 44.1k and am at 120bpm in this case.
Any other ideas?

might be helpful to provide a code snippet on your processBlock, sometimes there’s a tiny thing :slight_smile:

What AAX SDK version are you using?

Hi,
I’m using version 2.2.2 of the AAX SDK.
I just created a brand new plugin to make sure it is not an issue in my code. I simply added the following to the pre-generated code in ProcessBlock:

AudioPlayHead *ph = getPlayHead();
AudioPlayHead::CurrentPositionInfo posinfo; 
ph->getCurrentPosition(posinfo);
if (posinfo.isPlaying) {
   dummy=posinfo.ppqPosition;
}

And set a breakpoint on the “dummy” line. If I start at position 0.0.0 in ProTools this ends up as a negative value. If I start on eg 5.0.0 (ie 16 beats in), the value here is less than 16 (15.997732291666667 to be precise).

Thanks.

In Pro Tools… in the Audio prefs… try turning off the option to ignore errors and see if that makes a difference – that option can mess with ADC && timing in PT

Rail

Hi,
I tried this. It was actually off and I turned it on, I also tried combinations of it with and without the “minimize additional i/o latency” as well as dynamic plug-in processing, but doesn’t seem to make a difference.

Another thing I noticed in playing around with it is that if I just keep starting and stopping playback and break on that getCurrentPosition() line, I don’t always get the same value for ppqPosition (even though I’m always starting at 0.0.0. For example, I got these values when doing it a few times: -0.015, -0.045, -0.014, -0.004

Any more ideas?

We are having a similar problem - try changing from "GetCurrentTickPosition” to “GetCustomTickPosition” in the AAX wrapper and see if that fixes it. For us that worked.

I might add that this only worked when delay was introduced by plugins on other channels in pro tools so this might be a completely different thing.

Thanks, I will give it a try

I just tested my plug-in a few days ago with the tip and my Bars/Beats display matches the Pro Tools Bars/Beats counter. I checked both MacOS and Windows with the latest PT build and 2p2p2.

Rail

1 Like