# Implementing Automation

**URL:** <https://forum.juce.com/t/implementing-automation/42486>\
**Category:** Tracktion Engine\
**Created:** [October 29, 2020, 8:50pm UTC](https://forum.juce.com/t/implementing-automation/42486 "2020-10-29T20:50:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwall](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bwall/32/618_2.png) [@bwall](https://forum.juce.com/u/bwall)\
**Post date:** [October 29, 2020, 8:50pm UTC](https://forum.juce.com/t/implementing-automation/42486/1 "2020-10-29T20:50:22Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [October 30, 2020, 10:02am UTC](https://forum.juce.com/t/implementing-automation/42486/2 "2020-10-30T10:02:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bwall](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bwall/32/618_2.png) [@bwall](https://forum.juce.com/u/bwall)\
**Post date:** [October 30, 2020, 3:03pm UTC](https://forum.juce.com/t/implementing-automation/42486/3 "2020-10-30T15:03:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [October 30, 2020, 3:40pm UTC](https://forum.juce.com/t/implementing-automation/42486/4 "2020-10-30T15:40:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bwall](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bwall/32/618_2.png) [@bwall](https://forum.juce.com/u/bwall)\
**Post date:** [November 16, 2020, 5:07pm UTC](https://forum.juce.com/t/implementing-automation/42486/5 "2020-11-16T17:07:34Z")

</div>

OK.

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?

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [November 16, 2020, 5:38pm UTC](https://forum.juce.com/t/implementing-automation/42486/6 "2020-11-16T17:38:06Z")

</div>

It’s always `0.0` if you always pass `0.0` 😉

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.

---

<div class="post-metadata">

**Author:** ![bwall](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/bwall/32/618_2.png) [@bwall](https://forum.juce.com/u/bwall)\
**Post date:** [November 16, 2020, 11:06pm UTC](https://forum.juce.com/t/implementing-automation/42486/7 "2020-11-16T23:06:16Z")

</div>

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!
