# Ff\_meters decay ballistics

**URL:** https://forum.foleysfinest.com/t/ff-meters-decay-ballistics/127
**Category:** ff\_meters
**Created:** [19 September 2022 22:55 UTC](https://forum.foleysfinest.com/t/ff-meters-decay-ballistics/127 "2022-09-19T22:55:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TGDrakaRG](https://forum.foleysfinest.com/user_avatar/forum.foleysfinest.com/tgdrakarg/32/189_2.png) [@TGDrakaRG](https://forum.foleysfinest.com/u/TGDrakaRG)
#### Post date: [19 September 2022 22:55 UTC](https://forum.foleysfinest.com/t/ff-meters-decay-ballistics/127/1 "2022-09-19T22:55:11Z")

</div>

Hi Daniel, I’m using your excellent ff\_meters in one of my plugin projects, and all is working fine! My question is this: How difficult is it to add a meter decay, so that when I stop a track in Logic, the meters decay gradually down to -inf in a graceful fashion (this is the default mode for the meters in Logic itself). It may well be that this is already ‘built in’, but I just haven’t found it! Any help would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![TGDrakaRG](https://forum.foleysfinest.com/user_avatar/forum.foleysfinest.com/tgdrakarg/32/189_2.png) [@TGDrakaRG](https://forum.foleysfinest.com/u/TGDrakaRG)
#### Post date: [20 September 2022 23:16 UTC](https://forum.foleysfinest.com/t/ff-meters-decay-ballistics/127/2 "2022-09-20T23:16:08Z")

</div>

Daniel - I’ve managed to sort it out myself… If anyone’s interested, I can post a code snippet here.

---

<div class="post-metadata">

### Author: ![daniel](https://forum.foleysfinest.com/user_avatar/forum.foleysfinest.com/daniel/32/5_2.png) [@daniel](https://forum.foleysfinest.com/u/daniel)
#### Post date: [21 September 2022 19:20 UTC](https://forum.foleysfinest.com/t/ff-meters-decay-ballistics/127/3 "2022-09-21T19:20:33Z")

</div>

Sorry, just see this now.  
It should actually happen automatically. If you look at paint() it will call `decayIfNeeded()`, which will check if there was a measurement in the last 100 msecs. If not it should pump zeroes which should result in the decay you are after.

I haven’t tested this in a while, but looking at the code 5 years later, the decayIfNeeded() call should probably be in the timerCallback() and not the paint() 😊
