Get current playhead / timecode / cursor-position from Host for a Lyrics Plugin

Hi there dear VST developers,

is there any API function, were we can get the current position of the playhead in the host as an timecode or in (milli)seconds? What would be even better is to get all information from the “transport-filed” like start, end makers of the project, cycle makers, time signiture, etc.

We want to develop a simple Lyrics-VST that connects the scrollview of a text-field with the cursor position.

Maybe someone can guide us in the right direction.
Kind regards,
Alex

I think it must be something like:

data.processContext->projectTimeSamples

?

by using this pointer ProcessContext send with each process call you could retrieve some info about position inside the project (if provided by the host!).

if (data.processContext && data.processContext->state & kProjectTimeMusicValid)
// here you could check the projectTimeMusic value

if (data.processContext)
// should be always valid and provide by the host:    data.processContext->projectTimeSamples

Note that since 3.7 as plugin you have to inform the host what you need ( [3.7.0] Process Context Requirements - VST - Steinberg Developer Help)