News:

CWP2Song, public beta.
My  DAW is Reaper
YouTube channel

Main Menu

Update to the Cakewalk API

Started by norfolkmastering, May 02, 2025, 05:00:46 PM

Previous topic - Next topic

norfolkmastering

With regard to FX Chains, the API return value of  getMixParamLabel for MIX_PARAM_FX has been changed from "FX Chain" to "{fx chain name}"

Note the {} around the new expression.

Sometime ago Cakewalk introduced the very useful feature to be able to give FX Chains custom names and this new API update reflects this.  I use custom names as it allows me to identify the FX Chain in use for a particular track.

Unfortunately this change caused the FX Chain controls I had programmed in AZ Controller to stop working. I had been using the Logic action e.g.

FX FX Chain shift 0 parameter 4

So the "FX Chain" name was no longer recognised.

I tried changing the "FX Chain" names to the custom name for each track's FX Chain, e.g. to:

TRACK1 FX Compressor1 shift 0 parameter 4
TRACK2 FX Equaliser6 shift 0 parameter 6

However this stops working as soon as you rearrange the order of the tracks in Cakewalk.

One solution for me was to use the Logic action e.g.:

FX <any> shift 0 parameter 4

However I reported the issue to Mark McLeod at Cakewalk and he has kindly added a hook so that all FX Chain names will be reported as "FX Chain" irrespective of how the custom name is set.

This hook is actioned by adding the following configuration lines to the Cakewalk.ini file

ReturnUserFXChainNameToControlSurfaces=0
AlwaysUseShortPluginNamesForControlSurfaces=1

I tested this today and it works.

Regards
Robert

norfolkmastering

Hi Alexey

Now that Cakewalk Sonar has the option to return the custom name of a track FX Chain in the API, is there a way to read and report this name in AZ Controller?

Regards
Robert

azslow3

Hi Robert,

I am not aware about API changes, API definition is not changed since 11 years:
https://github.com/Cakewalk/Cakewalk-Control-Surface-SDK/tree/master/Framework2
(ControlSurface.idl, I am NOT using API C++ wrapper)

What sometimes changes is behavior of API, and this time I guess is the same.
So Cakewalk can return "FX Chain" or "{fx chain name}", but not at the same time (as you write, what is returned is controlled by options). And so if you use "FX chain", I can't get the name. If I get the name, it replaces "FX Chain".

FX Chains are not something special from all perspectives, they are just yet another FXes. The only difference they can host other FXes and so parameter names and the list of parameters can be different in each instance (and I remember I had difficulties with that, in ACT Dynamic mapping, since it doesn't report which type of FX/Synth it currently controls).
 
If Mark knows the way how to get "user name" for FX Chain when API reports "FX Chain", I can add the feature to AZ Controller.

Regards,
Alexey.

norfolkmastering

Hi Alexey

I am sure you are correct that the basic API definition is unchanged.

What Mark told me is that, with the introduction of custom names for FX Chains, the latest Sonar release returns (by default) the actual custom FX name enclosed in {}.

Prior to that recent update, FX Chains with custom names always returned "FX Chain"

Here is his post from the Sonar Beta tester forum:

'The only thing that has been changed with regards to FX Chains is the return value of  getMixParamLabel for MIX_PARAM_FX.

It used to always return "FX Chain".  Now it returns "{fx chain name}".'

With my AZ Controller configuration, this caused my track ident function to fail.

So Mark introduced an optional hook, actioned by adding the following configuration lines to the Cakewalk.ini file

ReturnUserFXChainNameToControlSurfaces=0
AlwaysUseShortPluginNamesForControlSurfaces=1

This causes the return value of  getMixParamLabel for MIX_PARAM_FX to always return "FX Chain"
This fixed my issue.

However, I realised that I could use the custom FX Chain names to simplify the way I do my track idents, so I'm looking at that now.

I have just found out that I can get the custom FX names reported in the AZ feedback actions by using the action:

Text, Param. name, Container

This seems to work correctly.

Best regards
Robert

azslow3

Hi Robert,

the only ideas I have at the moment, I can add "Named FX Chain" ("{*}" pattern) to the list of possible FX name selections (currently "Any" or some particular name) and remove '{}' from names (the result of Text, Param. anme, Container), if that will help you.

Regards,
Alexey.

norfolkmastering

Hi Alexey

In feedback, the action Text, Param. name, Container

seems to be returning the FX Chain custom name correctly, so don't spend any time on this for now.

I'll get back to you when I've finished my updates.

If successful then I can remove the need to use an FX control parameter as the track ident proxy.

Thanks and best regards

Robert

norfolkmastering

Hi Alexey

I finished the update to use the custom FX Chain names as track and bus idents.

There is one major issue which I would ask you advice about please.

I will describe the test sequence:

1. Insert an FX Chain preset to bus slot 1.

Timestamp 427839 outputs the correct MIDI message with the MIDI value representing the custom FX Name.

2. Delete the FX Chain in bus slot 1 and then I get two MIDI messages from AZ:

Timestamp 439639 outputs an INCORRECT message showing the PREVIOUS status, i.e. when the FX Chain is present (even though the FX Chain has been deleted).

Timestamp 439676 outputs the correct message when there is no FX Chain.

This additional INCORRECT message is causing big errors in my system and I cannot find a way to stop it outputting.


This additional INCORRECT message does not happen when I just report the value of an FX Chain control.  It only happens when I report the FX Chain custom name.

I have images to show the AZ preset and MIDI-OX messages but I cannot understand how to load images on this forum now.  It used to be possible.

I would be grateful for any suggestions to fix the issue.

Regards
Robert



azslow3

Please upload your current preset. Can be its logic related.

a)I "slowly scan" for structural changes, doing so every cycle is not practical (some API calls as relatively slow). That can theoretically produce wrong report, when AZ Controller has already spotted the change, but has not upgraded all related information yet.

b)It can also be Cakewalk is reporting outdated information.

In any case, that can be checked and fixed (in case of a) or workaround (in case of b), once I understand from where it comes.

PS since I don't have new Sonar, I can only work in "demo mode". I hope the behavior is the same.

norfolkmastering

Hi Alexey

Thanks for your help with this.

This is the first time I have used this action combination so I will check if the issue exists in Cakewalk by Bandlab.  If it does then I will send you a test AZ Controller preset using CbB.

If the issue only exists in Sonar then I will send you a test AZ preset for use with Sonar.

It will be easier to see the issue in a small test AZ preset, so I will only send you my current very large preset if I cannot demonstrate the issue any other way.

Regards
Robert

norfolkmastering

Hi Alexey

I have attached a test preset which works with CbB and shows the issue.

When the Monitor parameter value priority is set to Ultra then you always get the additional feedback message when the FX Chain is deleted.
When the Monitor parameter value priority is set to Slow then you do not get the additional feedback message when the FX Chain is deleted.

Could you have a look please and see if it is possible to stop the additional feedback message irrespective of the priority setting.

Regards
Robert

azslow3

Sorry for no reply so far, it can take some more days till I can test it...

norfolkmastering

No problem, thanks for keeping in touch.