ba.peakhold #126
Replies: 2 comments
-
Code written by @lij (Jonatan Liljedahl on Discord) hopefully he can help here? |
Beta Was this translation helpful? Give feedback.
-
My own version of this code is a tiny bit different, but not sure if it makes a difference in your case. Looking at the block diagram I see that the intention is that the timer should only run while the held value is larger than the input value. When the input is greater than the held value, the timer (sweep) should reset. This is the behaviour you're asking for if I understand correctly? I haven't tested (recently at least) if it actually behaves as intended.. |
Beta Was this translation helpful? Give feedback.
-
Hello, people.
I was testing Faust's
ba.peakholder
and I have a few doubts about how it works.The description says "tracks abs peak and holds peak for 'n' samples" but it appears that the timer is not reset when a new peak is detected; is that the expected behaviour?
The mechanism that I'd expect from a peak holder is that when a new peak is detected the timer is reset, otherwise the timer is started. Hence, the impulse response of an N-sample hold period is an N + 1 step.
It could be up for debate whether an input that is equal to the output is considered a new peak or not, and I personally think that it should be.
See the test code below.
Ciao,
Dario
Beta Was this translation helpful? Give feedback.
All reactions