Randomise all parameters without destroying undo queue
I’m trying to add a button to randomise all parameters in a M4L device. Got the randomisation part working but my problem is now the undo queue is getting flooded.
I've been trying to experiment with dynamically changing the parameter visibility before the random values are sent then changing back right after with a delayed message which seems to block most of the undo events being sent to live but some still seep through. It feels a bit jank overall.
Am I on the right track to solve this?
Does anyone have any examples of devices / patches which have implemented this successfully?
If anyone could help point me in the right direction would be greatly appreciated!
I don't know M4L, but in Max I would use presets.
Randomize as often you want, then recall a preset.
Hi Peter
Thanks for your response, the issue is M4L specific in the way that it handles undo. I need the parameters available to Ableton in normal use but to temporarily suspend sending updates to Ableton's undo queue to avoid it being flooded with 30 or so (1 for every parameter of the device changing) new steps each time the random button is pressed.
I haven’t tried this but if the delayed message is almost working could it be you just need to use a trigger object? That way you could be sure whatever you’re doing is totally finished before changing the visibility . I used to delay messages in M4L and my life got way easier when I started using more trigger objects.