Slider creates multiple undo steps in Logic Pro X only (AU)

Hi everyone :slight_smile:

The undo function for my AU works great in other daws like reaper and davinci, but in Logic Pro X (10.6.3 on catalina) it creates multiple undo steps for slider movements. For example if i move my slider from 0 to 100 i get 100 undo steps.

what part of my code would you need to see in order to help me out?

many thanks!

begin and end gesture/mousedown and mouseup, I would think…

Also maybe the interval of the parameters’ ranges:

here is the original code where the AU undo works in reaper and davinci but causes problems in LPX


                void valueChanged() override
                        const float newVal = (float) getValue();
                        const auto param = owner.getParameters()[index];

                        if (param->getValue() != newVal)

// Here is the code i have to use to bypass undo for LPX.

void valueChanged() override
{ const float newVal = (float) getValue();

thanks :slight_smile:

Tell me, if you click on the up & down buttons on the ‘controls’ view, does it take many clicks for the value to change?

(The ^ and v here)

The problem might be in parameter construction too…


yes it is taking about 50 clicks for the value to increase by 1, and the undo history is counting each click.

however if i click and drag the number from 5 to 75, the undo works properly and creates only 1 undo step.

if i Manually enter numbers, no undo step is created.

if i enter 1 or greater the parameter jumps to 100. (no undo step created)
if i enter 0.4 the parameter jumps to 40. (no undo step created)


if i rotate the knobs slowly it creates 100’s of undo’s.
if i rotate the knob as fast as i can it creates around 10 undo’s

thank you for helping, it seems like i have parameter issues related to either integers/floatingpoint or some scaling i don’t see. i will dig deeper and try some testing. it is strange that all the steps work in other daws except for logic.