AutomationRecordManager Usage?

What is the recommended usage for the AutomationRecordManager?

It certainly appears to be the missing link in my automation setup, but am not sure how it is supposed to be used?

Basically you just set it to read or write and then perform parameter changes whilst the transport is moving. When the transport stops or write is disabled, the automation will be stored to the parameter’s AutomationCurve, then this will be played back if the manager is in “read” mode.

OK, well, without any deliberate use of AutomationRecordManager I can record and play back automation. What I cannot do is cleanly modify that information with slider changes after automation is initially recorded. And that is why I recognize that I am missing the functionality of AutomationRecordManager.

Of course, I can manually edit the nodes of the curve (I have all that fully functional), but a more natural usage is to ride the fader and record new automation. And as you said, AutomationRecordManger handles that.

So where do I instantiate the AutomationRecordManager? Is it to be a member of my Edit?

A pointer in the right direction is most appreciated!

Yes, see Edit::getAutomationRecordManager().

As a very lose rule, any high level class that takes an Edit& in it’s constructor is likely to live as an Edit member.

Thanks, Dave! You are always a very generous and solid source of information,…much appreciated!

When I began to dive into this I noticed that I was already using the Edit::getAutomationRecordManager() in my transport button class. But I was using it in a very naïve fashion.

For example,

edit::getAutomationRecordManager().toggleWriteAutomationMode()

which was in the onClick lambda for a single automation record button.

With only the single button, I was able to record and playback automation. But, changing that automation required either deleting the curve points and recording again, or direct editing of the points, …which actually may suffice for some use cases.

What works much better is to implement both an automation “record” button, and an automation “play” button. Doing so allows you to have more control over the automation and connected parameter.

automationRecordButton.onClick = [this]
{
	edit.getAutomationRecordManager().setWritingAutomation(automationRecordButton.getToggleState());
};

and

automationPlayButton.onClick = [this]
{
	edit.getAutomationRecordManager().setWritingAutomation(automationPlayButton.getToggleState());
};

This is still somewhat of a work-in-progress but, nevertheless, certainly works better than my first approach.