iPlug2 / iPlug2

C++ Audio Plug-in Framework for desktop, mobile and web
https://iplug2.github.io
Other
1.89k stars 283 forks source link

IParam::kFlagCannotAutomate doesn't work #563

Open Bindernews opened 4 years ago

Bindernews commented 4 years ago

Setup:

I can still automate the parameter in REAPER, but only when using VST3. VST2 is fine. Haven't tested anything else.

AlexHarker commented 4 years ago

I've just checked both the code for VST3 and also some compiled code on Mac with Ableton Live 10 and Reaper. If I set the kFlagCannotAutomate flag then the parameter doesn't turn up in automation lists.

Can you provide a project from which you can reproduce this? I am am unable to do so at present, and whilst I could test in windows I don't see why this should be platform-dependent, so ideally you'd confirm that you are able to reproduce at your end.

Bindernews commented 4 years ago

I am currently watching Reaper automate the number of graphs I have available as an LFO, which, if I had the parameter hooked up to anything, would cause a full UI redraw and a bunch of memory allocation/freeing. I'll see if I can get it down to a minimal example soon, but yes it's still an issue.

AlexHarker commented 4 years ago

I've just added the flag to the single parameter in IPlugEffect and built for windows (10) in both 64 and 32 bit. I don't see the parameter in the automation list as a result. The code is very simple to tell the VST3 API that a parameter is automatable (and it is that way round - one must tell the API that it is rather than isn't automatable).

I can look at a bigger project, but from my testing so far, either:

1 - the situation is more complex than simply whether the flag is set 2 - something is weird in the version you have of REAPER (I'm probably a few versions back) and it's able to not respect the flag 3 - something in your build/testing procedure is not as you think it is and the flag is not correctly set in the version you are testing

When automation comes in from the host there is no filter that checks the parameter is automatable in iplug code, although it is possible that the VST3 SDK should be providing that - I don't know - but it's never been necessary in the past.

If you could test the simple case of adding the flag to iPlugEffect that would help point us towards which of the above possibilities are more/less likely.

Bindernews commented 4 years ago

I'll see about getting a minimal example with the bug. I'll also check FL Studio to see if it's there as well.

AlexHarker commented 4 years ago

Thanks

AlexHarker commented 4 years ago

Any update on this?

Bindernews commented 4 years ago

Here's a branch of BigLittleGain where I've set all parameters to have kFlagCannotAutomate, yet I can still automate them in both Reaper and FL Studio. https://github.com/Bindernews/BigLittleGain/tree/no-automation

AlexHarker commented 4 years ago

I still can't reproduce on Mac with Reaper - just compiled from source. Will try on windows also.

This is what I get in reaper in the trim window:

Screen Shot 2020-08-03 at 08 30 44

Can you confirm:

Could you put a build up which exhibits the problem so I can check that?

AlexHarker commented 4 years ago

Also no automatable parameters shown in Ableton Live.

AlexHarker commented 4 years ago

AudioUnit is behaving as automatable in Live and Reaper - I'll investigate that.

AlexHarker commented 4 years ago

OK - this looks like a bug in your code due to re initialising parameters without the automation flag in ReInitKnob().

I don't think there is an issue in iplug2 here - can I close?

Bindernews commented 4 years ago

For reference, @AlexHarker and I did some debugging and it seems that at least REAPER and FL Studio do not respect the relevant flags, meaning we need to file bug reports with REAPER, FL Studio, and potentially any other DAW that exhibits this behavior. I've already submitted a report to Image-Line, and I'm working with them to reproduce the bug. I'll file a report with REAPER soon.

AlexHarker commented 4 years ago

More detail - REAPER respects in the trim menu, but not in the contextual menu/param menus on the plugin GUI.