<div dir="auto"><div>Something as simple as this?<div dir="auto"><br></div><div dir="auto">if new > cur</div><div dir="auto">  cur = new</div><div dir="auto">else</div><div dir="auto">  cur = (cur + new) / 2</div><br>It works in my head, but I may have overlooked something...</div><div dir="auto"><br></div><div dir="auto">Andrew<br><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, 19 Jun 2022, 16:35 Robin Gilks, <<a href="mailto:gb7ipd@gmail.com">gb7ipd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here's another question for you all!!<div><br></div><div>I'm trying to implement "something like" a VU Meter in software (in an embedded system so it has to be small & fast).</div><div>The hardware equivalent to a diode running into an RC filter</div><div><font face="monospace"><br></font></div><div><font face="monospace">          |\ |             R<br>   in ----|  |----------vvvvvv--------- out<br>          |/ |                    |<br>                                 ___ <br>                                 ___  C<br>                                  |<br>                                  |<br> common ----------------------------------------  <br> </font><br><div>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.</div><div><br></div><div>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 ;)</div><div><br></div><div>Cheers - hopefully see you tomorrow.</div><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr">Robin Gilks<div><br></div></div></div></div></div>
_______________________________________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank" rel="noreferrer">Chchrobotics@lists.ourshack.com</a><br>
<a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" rel="noreferrer noreferrer" target="_blank">https://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" rel="noreferrer noreferrer" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" rel="noreferrer noreferrer" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>
When replying, please edit your Subject line to reflect new subjects.</blockquote></div></div></div>