使用VST.NET,我如何获取托管它的DAW的当前传输时间?

huangapple go评论104阅读模式
英文:

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.

我正在使用https://github.com/obiwanjacobi/vst.net来创建一个小插件,该插件将根据DAW的当前传输时间(在排列视图中播放)绘制一个可爱的动画。我无法获取这些数据。理想情况下,我想获取VstTimeInfo结构的所有数据。

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

我尝试使用: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?

但返回的VstTimeInfo的所有值都为0。我做错了什么或者我需要做什么?

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

// 编辑:它在FL Studio中有效,但在Bitwig中无效。这是目标DAW...

英文:

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...

答案1

得分: 1

抱歉,Time-info支持的内容取决于宿主/数字音频工作站(DAW) - 正如你所见。你可以检查返回值的Flags属性。宿主 应该 在该字段中指定它支持的内容(以及其他属性中填写了什么)。

你还可以向涉及的宿主/DAW 提出请求,要求支持更多选项...

[VST.NET的作者]

英文:

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]

huangapple
  • 本文由 发表于 2023年4月7日 03:36:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75953177.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定