Author Topic: Communicating with an FX VST within Cakewalk  (Read 1637 times)

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Communicating with an FX VST within Cakewalk
« on: October 26, 2023, 03:11:37 PM »
Hi Alexey

Could I please ask you for some advice!

Having completed my Cakewalk/AZ controlled mixing console, I want to take a next step ...

I am going to design some analogue FX units which will be controlled from FX VST based control panels which I will design.
I am fairly confident to design the VSTs and there are a number of software tools available to help.
The VST based control panels would be allocated to Cakewalk tracks or buses in the normal way.

Although I can use AZ Controller to read the status of VST controls using the AZ FX and Monitor actions, is it also possible to control the VST buttons and pots from my PIC via AZ Controller?

The biggest issue is that I need to send meter level information from my PIC to the VST, e.g. for a compressor gain reduction meter.  Is this theoretically possible via AZ if I design the VST correctly?

Regards

Robert


Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #1 on: October 26, 2023, 09:55:26 PM »
FX Parameters are controllable the same way as strip parameters (f.e. track volume), so in both directions (you can try this with any VST).

But level information is a tricky one. While you can define it as "parameter", I am not sure how good that will work in practice. The only other method I can imagine is implementing OSC stack in your VST, so AZ Controller retransmit the info it receives throw MIDI. But that is still an easy way to saturate MIDI communications, till carefully selecting reasonable update rate.

For that reason OSC based Behringer DMs send all levels in "one go" instead of one message per channel. I mean if you plan to have many FXes, it can make sense to foreseen something like one SysEx for levels from all of them.
BTW old Yamaha DMs was composing one SysEx to update several channels.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #2 on: October 27, 2023, 12:49:24 PM »
Hi Alexey
Thanks for the information and advice.

I have tried controlling FX Parameters in both directions using a test AZ preset and it works just fine.  So I know I will be able to control my FX audio units in this way.
My FX audio rack will have two dedicated PICs, one PIC for general control (100% driven from AZ feedback outputs) and the other PIC dedicated to collecting audio level information for the FX audio units to send back to AZ/Cakewalk/VST panels.

I can see no problem to send audio level information from a PIC on a dedicated MIDI channel, to a dedicated instance of AZ running with Cakewalk.  I can send either as CC values or as SysEx.

Can you let me know about the following please:

1. Does AZ pass control data to VSTs via the Cakewalk API? or by some other direct method?

2. If AZ passes control data via the Cakewalk API, would there be any problem so send audio level data, apart from the issues of data quantity and potential response time?

3. Have you seen any VST based FX control panels which make audio level information level available to AZ (either directly or via Cakewalk API)?

I think that most VST control panels generate data for their level meters as a by-product of DSP audio processing, so what I am going to try to achieve is probably quite unusual!  I am in contact with two companies which sell VST design software, so I will focus on understanding whether driving a VST control panel meter from an 'external' data source is possible within the VST framework.

Regards

Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #3 on: October 27, 2023, 09:39:55 PM »
Hi Robert,

VST is a VST. There can be host specific extensions (f.e. ARA, ProChannel modules, REAPER API) but I am not aware of anything in Cakewalk which can be used for levels.
So the only "direct" way is define a "parameter" with level and make it controllable, so AZ Controller can set it. I don't know any ready to use VSTs which use that, but
you can try DIY with https://ctrlr.org/ (BTW you can then send to it directly throw difference MIDI port, bypassing AZ Controller).

Regards,
Alexey.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #4 on: October 28, 2023, 06:00:00 PM »
Hi Alexey
I had a look at https://ctrlr.org/ but also at https://www.bluecataudio.com/Products/Product_RemoteControl/ which is well documented and seems to do most of what I need.

Blue Cat Remote Control provides customisable VST control panels which can output MIDI CCs from controls AND allows level meters to be driven from CC inputs.

The biggest issue I am facing is how to get the External MIDI port connected to the VST control panels.  The 'Remote Control' plugin is VST3 so MIDI I/O is available but Cakewalk seems to be very poor at routing VST MIDI.

Even though the VST Panels are added as FX to Cakewalk Audio Tracks, it seems I have to create one Cakewalk 'dummy' MIDI track for each VST panel just to get external MIDI port to the VST panel.

Can you tell me:

1. Is there a better way to get external MIDI routed to a VST in Cakewalk?

2. Is AZ Controller able to interface MIDI directly with a VST Panel?

Regards
Robert

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #5 on: October 28, 2023, 09:41:43 PM »
Hi Alexey
Sorry!  The questions in my last post were badly constructed.  Let me try again please:

I have been able to test the Blue Cat Audio 'Remote Control' VST Plugin (have a look to https://www.bluecataudio.com/Products/Product_RemoteControl/)
This VST plugin allows custom FX control panels to be designed.
Very importantly, it allows level meter inputs to be directly addressed via AZ Controller.
So I have a solution!

My question is:

If I dedicate one MIDI port and one instance of AZ Controller exclusively for feeding multiple VST control panels, will AZ Controller be able to handle a continuous stream of incoming CC messages to send to multiple VST panels?

So I mean one stream of CCs which will feed:
T1 VST
then
T2 VST
then T3 VST
etc., in rotation.

If continuous stream of CC handling is not possible, then what throughput rate do you think that AZ can handle?

Best regards
Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #6 on: October 30, 2023, 01:40:33 PM »
At least Ctrlr allows direct MIDI input/output, bypassing the DAW (I don't know if Blue Cat has that). Will several panels successfully work with the same device? I don't know.

AZ Controller can set parameters, it can't send MIDI to plug-ins. How "Continuous" it is, is a good question. AZ Controller can set parameters of multiple plug-ins (better they have
well defined position in FX chain, but "by name" will also work).

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #7 on: October 30, 2023, 04:21:08 PM »
Hi Alexey

With Blue Cat you cannot send/receive direct MIDI input/output.  So the only alternative (to having lots of Cakewalk MIDI tracks) is to send/receive MIDI input/output to Blue Cat via AZ Controller.
Blue Cat allows their meters to be driven by CCs, so I have been able to send meter values from a PIC to AZ and on to multiple Blue Cat VST instances.

So to summarise:
Blue Cat is an easy solution for Custom VST panels to control (via AZ Controller) external audio hardware for most functions, e.g. knobs, buttons.
I can drive Blue Cat level meters via AZ but using MIDI CCs may not provide fast enough throughput rate.
Blue Cat VST panels can be named, which means I can find and map FX parameter names for each Blue Cat VST panel in AZ but Cakewalk slot number, FX name and FX parameter.

Can you tell me if AZ Controller could receive meter level data via OSC? and so use AZ as an OSC/MIDI bridge?

Of course, I will have another look to Ctrlr.  Yes it would be a very big advantage to be able to do direct MIDI communication from my PIC to VST.

Thanks for helping my with this.  I want to choose the best solution before I start spending lots of time designing VST panels and of course the audio hardware!

Best regards
Robert


Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #8 on: October 30, 2023, 11:21:35 PM »
Note that AZ Controller can NOT send MIDI to VST (only throw MIDI loops and all corresponding MIDI routing in the DAW), so I can just update "parameters".

The maximum rate is the same as "loop" for surfaces (75ms default, but from what I remember you set it lower). AZ Controller can receive/send OSC.

For levels rate is not important. Sending momentary level make not much sense, all levels in DAWs and devices follow some "rules" (max/min with fixed auto-decay),  to make changes reasonably visible. The same is true for all other visualizations (f.e. frequency graphs in EQs).

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #9 on: October 31, 2023, 01:04:56 PM »
Hi Alexey
Thanks for clarifying what AZ can and can't do.

Please tell me if I understand correctly?

1/
Yes I have set my Cakewalk rate to 25ms (which is the fastest possible)
So if we relate that to level meter updates in a VST, which I am controlling via MIDI messages from PIC to AZ FX parameters.
Does that mean that:
Every 25ms, AZ/Cakewalk will send a batch of new FX parameter values to the VST plugins?

2/
Taking your advice about level (refresh) rates not being important;
I can do work in the PIC at higher 'scan' rates to determine what new values to send via MIDI to AZ and also how often it is necessary to send a new value.
Does that seem like a sensible approach?

Regards
Robert


Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #10 on: October 31, 2023, 05:25:41 PM »
1) yes
2) yes, so you decide in PIC when it make sense to update the level, following approach "as slow as possible" (imagine your level is "jumping" 40 times per second and you see that... is that informative? I don't think so...)

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #11 on: November 01, 2023, 10:40:58 AM »
Hi Alexey

Thanks for your continued support for my new project.
I will try to optimise meter level data using the PIC.

Can I ask two more questions for now please:

1. If AZ receives multiple value updates for a control (from my PIC) during the window between the Cakewalk surface refresh (every 25ms in my case), does AZ output these multiple values in the same order as they are received (like a FIFO) or are some of the values lost?

2. Can I send CC type messages via OSC or must it work to a different data format?  So how could I send control data from my PIC via OSC to AZ Controller? (I am going to buy an Ethernet interface for my development PIC which allows SPI to OSC using C language).  So I would like to get PIC to AZ comms working for the future.

Regards
Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #12 on: November 01, 2023, 08:08:45 PM »
1. from what I remember, AZ will not "skip" OSC (not 100% sure), but since plug-in will get parameter update not from "real-time" stream, you can't assume there will be no skips on plug-in side (for the same parameter)

2. OSC is a separate protocol, AZ Controller understand messages with one float argument 0. to 1. There is "MIDI over OSC" specification, but it is not supported by AZ Controller.

I will suggest start with just sending throw the same MIDI channel to AZ Controller. At least for test purpose.

Offline norfolkmastering

  • Full Member
  • ***
  • Posts: 191
Re: Communicating with an FX VST within Cakewalk
« Reply #13 on: November 06, 2023, 04:05:39 PM »
Hi Alexey

I did some tests to send Compressor Gain Reduction 'level' data to drive VST based 'moving needle' type meters.

I have been able to send MIDI CC values to drive 20 VST meters simultaneously (via AZ) and Cakewalk is still playing audio and its controls are responsive, no problems so far.

I send a packet of 20 CCs at a time (Meter1 then Meter2 etc), so that takes about 20ms which is close to the Cakewalk refresh rate of 25ms.

I compared the 'animation smoothness' of the VST meter needle animation, of the meters I am driving from my PIC/AZ, compared to a VST meter driven from internal dsp data.  They look very similar.

I guess this means I can work on a meter refresh rate of 20-25ms with no animation issues.

It would all be so much easier if I had some way to detect when a VST panel is actually open to view on the PC screen.  Then I would only drive level meters when they are being viewed.  Is there any kind of flag in Cakewalk API to do this?

Best regards
Robert

Offline azslow3

  • Administrator
  • Hero Member
  • *****
  • Posts: 1692
Re: Communicating with an FX VST within Cakewalk
« Reply #14 on: November 06, 2023, 05:24:13 PM »
Unfortunately not. But if plug-in itself can report it's GUI is open/closed (setting some dedicated parameter), you can monitor that in AZ Controller and inform your device.