What would be the clean way to have a text label display the DAW's transport position?

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
zmarx
Posts: 4
Joined: Thu Aug 27, 2020 8:55 am

What would be the clean way to have a text label display the DAW's transport position?

Post by zmarx »

Hi there, newbie here. :)

I am trying to get my head around Steinberg's VST3 SDK and its GUI framework - doing little test plugins, reading through code and stuff. I have a very basic question. What would be the clean way to have a text label display e.g., the DAW's transport position (or any other information I pull from the processor's process function) ? I have seen some tutorials that show how to update the processor in response to the controller, but not the other way round.

Do I have to implement a custom view or a subcontroller for this or is there a more direct way - I probably miss something trivial ... ?

Many thanks,
Zsolt

zmarx
Posts: 4
Joined: Thu Aug 27, 2020 8:55 am

Re: What would be the clean way to have a text label display the DAW's transport position?

Post by zmarx »

So this is the proper way I assume:

- the process function updating a member variable holding the current projectTimeMusic value.
- A timer thread sending said projectTimeMusic values to the controller, via a ConnectionPoint.

Now here is my next question:
- How can I get a controller from within say the processor's constructor, so I can set up a connection between the two?

Arne Scheffler
Posts: 414
Joined: Mon Jun 20, 2016 7:53 am

Re: What would be the clean way to have a text label display the DAW's transport position?

Post by Arne Scheffler »

Hi,
the connection is done by the host. You can place a breakpoint in your override of IConnectionPoint::connect() to see when this is happening.
Then you can send IMessage instances between the processor and controller.

zmarx
Posts: 4
Joined: Thu Aug 27, 2020 8:55 am

Re: What would be the clean way to have a text label display the DAW's transport position?

Post by zmarx »

Many thanks for this!!!

I wasn't aware that the connection is established automatically, that makes things so much easier. :)

Arne Scheffler
Posts: 414
Joined: Mon Jun 20, 2016 7:53 am

Re: What would be the clean way to have a text label display the DAW's transport position?

Post by Arne Scheffler »

Maybe you want to read about the basic conception of VST3 for further information: https://developer.steinberg.help/displa ... umentation

zmarx
Posts: 4
Joined: Thu Aug 27, 2020 8:55 am

Re: What would be the clean way to have a text label display the DAW's transport position?

Post by zmarx »

Cool The link you posted is a much nicer version of the documentation I keep finding via Google (https://steinbergmedia.github.io/vst3_d ... tList.html)

Post Reply