Implementing Automation

I am finally at the point of being able to implement automation in my DAW.

What are the basics to get it working? A rudimentary example would be most welcome.

I am already using clip fades, of course, which work great. But, full automation is my last big task.

Any help is most welcome!

Thank you!

Probably best to start by looking at AutomatableParameter and the AutomationCurve they contain.
It should be fairly straightforward to add points to the curve then which will be passed to the plugin during processing.

I will look into AutomatableParameter. I envision simple volume automation overlaid on the audio clips. I will see what I can come up with. It sounds like that is simply a matter of “connecting the dots” between automation points. I’ll see what I can come up with.

Thank you!
BTW, I know you are laboring hard to complete tracktion_graph. Please know your effort is much appreciated! The new graph is eagerly awaited!

1 Like

Thanks! It’s going to be good, just a lot more work than I first thought!


For our track we call getAllAutomatableParameters() and we choose the parameter to use. We use parameter->getCurve().addPoint(time, value, curve) to add points to the curve.

What is the purpose of “curve” in the call to parameter->getCurve().addPoint(time, value, curve)? It seems it is almost always zero. And, if so, it seems like the constructor should default to curve = 0.0f.

Or am I not understanding the usage?

It’s always 0.0 if you always pass 0.0 :wink:

Setting a curve adjust the transition between the two points, it makes it curved. If you do use the curve, I suggest keeping it between ±0.5 as it’s much easier to draw like that using bezier curves.

Oh, and in general I don’t really like have default parameters as it avoids the caller having to think about them. It also makes it difficult to maintain if we change the value etc. in the future.

I anticipate most automation to be straight lines connecting points, so, in my use case, I think “curve” will usually “default” to zero.

I understand how you want to maintain the current flexibility (pun intended).

As always,. thank you for your help!