Best way to get host position

#1

I would like to write a plugin to read the host time and use it to control another application.
I’m experimenting with getPlayHead()->getCurrentPosition(posInfo); from the processBlock() callback but it doesn’t look like I’m getting any position updates when the playback is not running.

I was thinking that there must be a method to get the timeline position also if playback is not running as plugin UIs are also updated when parameters are automated and I click through the timeline.

Can anyone with more experience in plugin development maybe shed some light on this?

Thanks in advance!

0 Likes

#2

That’s just due to the host sending parameter changes into the plugins. (And those don’t involve the plugin having to know the host timeline position.) Why do you need to know the timeline position even when the audio is not playing?

0 Likes

#3

Unfortunately this stuff is kinda left up to the DAW implementation… You might not get an actual answer from the host on the position unless the transport is running, even if the host is updating other things based on position such as parameter automation.

0 Likes

#4

Some hosts do supply that info… but it may not be in the wrapper which tends to cover only the methods which are common to all formats.

Pro Tools does have a call to get the current transport position – you’d probably have to use a Timer to poll the value and check if the transport is in playback or not.

Rail

0 Likes

#5

My software follows MTC and MMC to playback videos in sync. Pro Tools doesn’t allow MMC to be enabled when using Satellite Link so there’s no way to get the position.

The only way to get it when playback is not running is using HUI which is a pretty nasty workaround.

Regarding parameter changes: is there a callback that pulls the parameters which I might attach to?

Regarding the timer to pull that info: I read that it’s only safe to pull the position from the processBlock() callback

0 Likes