简体   繁体   English

从JUCE音频VST插件控制主机播放

[英]Control Host playback from JUCE audio VST plugin

I am trying to find a way to control the playback position / tempo of a VST Host from a VST plugin build with JUCE. 我试图找到一种方法,可以通过使用JUCE的VST插件控制VST主机的播放位置/速度。

I am not sure if this is possible. 我不确定这是否可能。

I found a setPlayHead function on the AudioProcessor , and i think this might be what i am looking for. 我在AudioProcessor上找到了setPlayHead函数,我认为这可能是我想要的。

https://www.juce.com/doc/classAudioProcessor#a9015f8476c07b173e3c9919b3036339d https://www.juce.com/doc/classAudioProcessor#a9015f8476c07b173e3c9919b3036339d

But on the doc of the setPlayHead i am reading this: 但是在setPlayHead的文档中,我正在阅读以下内容:

Tells the processor to use this playhead object.

So can anybody tell me if this is supposed to mean that the new AudioPlayHead that is set on the AudioProcessor will be used for the Hosts playback (zb Cubase), or does it mean that only the AudioProcessor of my VST plugin will use this AudioPlayHead, and the AudioPlayHead of the Host remains unaffected) 因此,有人可以告诉我,这是否意味着在AudioProcessor上设置的新AudioPlayHead将用于主机播放(zb Cubase),还是意味着只有我的VST插件的AudioProcessor会使用此AudioPlayHead,并且主机的AudioPlayHead保持不受影响)

Thanks for any help / input on this. 感谢您的帮助/投入。

A sequencer cannot be controlled by a VST plugin in this way. VST插件无法以这种方式控制音序器。 The VST API doesn't allow for anything like this. VST API不允许这样的事情。 The method you've found is actually part of the Juce API which allows a sequencer to pass a playhead structure to a plugin. 您找到的方法实际上是Juce API的一部分,它允许音序器将播放头结构传递给插件。

To be fair, there is no technical reason that a plugin couldn't do this. 公平地说,没有技术原因不能使插件执行此操作。 The host would have to supply an unofficial custom opcode and an associated canDo for the feature. 主机必须为该功能提供一个非正式的自定义操作码和一个关联的canDo However, it would not be part of the VST standard, and would only work for that specific host. 但是,它不是VST标准的一部分,仅适用于该特定主机。

As far as I know, no major VST host (including Ableton Live, Cubase, etc) has a mechanism to allow this. 据我所知,没有主要的VST主机(包括Ableton Live,Cubase等)具有允许此功能的机制。 Thinking from the host's standpoint, it would be a bit crazy to provide such a mechanism. 从主持人的角度考虑,提供这样一种机制会有些疯狂。 Just imagine multiple plugins trying to stop/play the host's playback at the same time! 试想一下,有多个插件试图同时停止/播放主机的播放!

So yeah, sorry, but this is not really possible in the way that you are thinking. 是的,很抱歉,但是按照您的想法,这实际上是不可能的。 However, it would be possible for a VST plugin to control the host's tempo (but not playback state) via Ableton Link . 但是,VST插件可以通过Ableton Link控制主机的速度(但不能控制播放状态)。 Since Link works over a local network socket, and doesn't have any concept of master/slave, a VST plugin could theoretically send tempo changes to the host in this manner. 由于Link通过本地网络套接字工作,并且没有主/从概念,因此VST插件理论上可以通过这种方式将速度更改发送给主机。

Right now (where "now" == September 2016), Ableton Live is the only sequencer which supports Link, but Ableton has said that they are working with other companies to help them add support for Link, so I wouldn't be surprised if more sequencers start to add Link support in the near future. 现在(“ now” == 2016年9月),Ableton Live是唯一支持Link的音序器,但是Ableton表示他们正在与其他公司合作以帮助他们增加对Link的支持,因此如果我对它感到惊讶,在不久的将来,更多音序器将开始添加Link支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM