# Expression to average a channel non destructively?

**URL:** https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322
**Category:** Flame Questions
**Tags:** expressions
**Created:** [October 13, 2023, 11:26am UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322 "2023-10-13T11:26:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![philobedo](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@philobedo](https://forum.logik.tv/u/philobedo)
#### Post date: [October 13, 2023, 11:26am UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/1 "2023-10-13T11:26:18Z")

</div>

Hi all.

I was wondering if there is a way, with expressions to average a channel.  
I made a track, which is a little shaky and would like to be able to average it non destructively, linking the average value with a dummy slider  
Not sure I m clear…

Any idea?

---

<div class="post-metadata">

### Author: ![Sinan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/sinan/32/155_2.png) [@Sinan](https://forum.logik.tv/u/Sinan)
#### Post date: [October 13, 2023, 12:59pm UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/2 "2023-10-13T12:59:59Z")

</div>

I think an interactive average would need an accumulation buffer to calculate while keeping the original value intact. And that is not possible with expressions.

However, you could keep your original, make a very smoothed-out average channel, and use an expression to transition the values from one to the other.

Let’s say you have shaky.position.x as the original track.  
Copy it and name the axis average. And average the position.x channel with 25?  
Create an axis called slider  
Now make another axis and in its position.x channel write:  
(shaky.position.x \* slider.position.x) + ((1-slider.position.x) \* average.position.x)

---

<div class="post-metadata">

### Author: ![Sinan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/sinan/32/155_2.png) [@Sinan](https://forum.logik.tv/u/Sinan)
#### Post date: [October 13, 2023, 1:27pm UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/3 "2023-10-13T13:27:10Z")

</div>

I think this is not the same as averaging with different values but will give you some interactivity. So keep that in mind…

Best of luck

---

<div class="post-metadata">

### Author: ![philobedo](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@philobedo](https://forum.logik.tv/u/philobedo)
#### Post date: [October 13, 2023, 1:38pm UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/4 "2023-10-13T13:38:56Z")

</div>

I’ll surely try.  
I also tried to take 1 frame out of x from the original track curve. But it smoothes way to much, event with 1 frame out of 2…

---

<div class="post-metadata">

### Author: ![Sinan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/sinan/32/155_2.png) [@Sinan](https://forum.logik.tv/u/Sinan)
#### Post date: [October 13, 2023, 1:40pm UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/5 "2023-10-13T13:40:00Z")

</div>

Is this a camera track or axis track? Smoothing or averaging camera tracks don’t always work as you expect. Things easily go wonky when you average.

---

<div class="post-metadata">

### Author: ![philobedo](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@philobedo](https://forum.logik.tv/u/philobedo)
#### Post date: [October 13, 2023, 1:44pm UTC](https://forum.logik.tv/t/expression-to-average-a-channel-non-destructively/9322/6 "2023-10-13T13:44:00Z")

</div>

Axis smoothing. It’s just that I hate the fact that the average slider is destructive and would like a more elegant solution than copying my original axis…
