[chbot] Software filter. Fast attack, slow decay

Andrew Errington erringtona at gmail.com
Sun Jun 19 05:43:50 BST 2022


Something as simple as this?

if new > cur
  cur = new
else
  cur = (cur + new) / 2

It works in my head, but I may have overlooked something...

Andrew


On Sun, 19 Jun 2022, 16:35 Robin Gilks, <gb7ipd at gmail.com> wrote:

> Here's another question for you all!!
>
> I'm trying to implement "something like" a VU Meter in software (in an
> embedded system so it has to be small & fast).
> The hardware equivalent to a diode running into an RC filter
>
>           |\ |             R
>    in ----|  |----------vvvvvv--------- out
>           |/ |                    |
>                                  ___
>                                  ___  C
>                                   |
>                                   |
>  common ----------------------------------------
>
> My first port of call for filters is an IIR but that does not have the
> fast attack I'm after, especially if I want the long tail.
>
> Does anyone have any magic that doesn't disappear into a morass of DFTs
> and FFTs and 3 page equations summing integrals from 0 to infinity ;)
>
> Cheers - hopefully see you tomorrow.
>
> --
> Robin Gilks
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
> https://lists.ourshack.com/mailman/listinfo/chchrobotics
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> Meetings usually 3rd Monday each month. See http://kiwibots.org for
> venue, directions and dates.
> When replying, please edit your Subject line to reflect new subjects.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20220619/610c186b/attachment.html>


More information about the Chchrobotics mailing list