Automation error with JUCE

Some DAWs let you choose “latch” mode (protools/login/etc).

While developing my JUCE plugin, the automated values are saved correctly but after pressing stop and playback (without leaving latch mode), the DAW will start recording values again regardless of param movement, overriding the automated values with a flat line because no param is being moved.

The standard behavior of latch mode is to record automation only when param moves and operate the automation on playback.

Any idea on what could be happening?

Automation recorded OK

Stop and hit playback, values are being overridden, It only stars overriding when encounters automation values, on default flat line keeps playback only.

Stop again and automation is flat.

I can report this works fine in our latest plugins. Are you doing anything funky with gestures or anything?

Top tip: Replace your editor with a generic one in CreateEditor and isolate whether the problem is in your processor/parameters or the editor.

Other fault tracing question (though perhaps not as useful) - do you see the same behaviour in Reaper’s latch mode?

1 Like

Its a plugin exported from Max MSP using RNBO. I am following their start up code for the Custom UI.

rnbo to juce

They do suggest begin and end gesture function on sliderValueChanged

  auto normalizedValue = coreObject.convertToNormalizedParameterValue(index, newVal);
  param->beginChangeGesture();
  param->setValueNotifyingHost(normalizedValue);
  param->endChangeGesture();

Never used it myself but I’d guess sliderValueChanged is getting called when it shouldn’t be. You could stick a breakpoint in and see.

1 Like

Not to criticise the tutorial, but I would recommend trying to use ParameterAttachments with your sliders instead. It’s pretty tried and tested and quite simple.

1 Like