Search code examples
c#vst

Using VST.NET how do I get the current transport time of the DAW that hosts it?


I'm using https://github.com/obiwanjacobi/vst.net to create a small plugin that will draw a cute animation relative to the current transport time of the DAW (playback in arrangement view). I'm not able to get that data. Ideally, to get all data from VstTimeInfo struct.

I have tried to use: Host.GetInstance<IVstHostCommands20>().GetTimeInfo(VstTimeInfoFlags.TransportPlaying);

But all values of the returned VstTimeInfo are 0. What I'm doing wrong or what do I need to do?

//. Edit. It works in FL Studio, but not Bitwig. Which is the target DAW...


Solution

  • Unfortunately what Time-info is supported is dependent on the Host/DAW - as you have seen. You can check the Flags property of the return value. The host should specify what it supports (and what is filled in the other properties) in that field.

    You can also put in a request at the Host/DAW in question for it to support more options...

    [Author of VST.NET]