[sdiy] Digital VU
Tim Ressel
timr at circuitabbey.com
Fri Aug 4 18:45:55 CEST 2017
Wow, lots of good stuff. Thanks!
Processor: STM32
I was thinking of a lookup table with if-then statements in a
successive-approximation style. I think that comes out to 5 if-thens max?
As for going analog on the front end processing, two issues: lots of
components, and difficult to switch responses from DIN to VU, if I
decide that is a needed feature.
I'm not making a console-quality meter, so 2dB steps is just fine. With
a 12-bit converter you only get 72 dB of range, and that's on a good
day. 56 dB range sounds perfect for this. Now if I go to the 51-led
display then things will be different.
Surprising no on mentioned the AD8307 .. its perfect for meters like
this, except for cost of course.
Thanks again!
--timbo
On 8/4/2017 3:15 AM, Steve wrote:
>
> I've done something similar in the past. The max over a greater number
> of samples helped to see quick peaks which would be gone in less than
> the blink of an eye otherwise, the purpose of that meter was to see
> such peaks.
>
> *Von:* ezion <ezion67 at gmail.com>
> Here is a somewhat different approach, its very lean on CPU cycles,
> but is only useful for generating visual feedback.
> - For a period of around 1/10th of a second, (about 4000 samples) find
> the maximum value.
> - Map the max value you found to the display.
> - Zero the max value and start over for the next 4000 samples.
> This works for both signed and unsigned samples.
> For visual feedback the 1/10 second latency is not a problem.
> The large number of samples is needed because one or more periods of
> the lowest expected frequency should "fit inside" to prevent jitter on
> the display.
> Next the mapping, this might be a open door but anyways...
> To map the values to the display (LEDs) it may be useful to use
> multiple short lookup tables instead of a single big one.
> So if your value us 16 bit long, instead of using one table with a 16
> bit index, use two tables with a 8 bit index.
> First look at the high byte:
> - IF the high byte is non zero: use the high byte as index for
> table1 to control the LEDs.
> - ELSE: use the low byte and table2.
>
> With 24bit values, use 3 tables in the same way.
> Shifting out the lower bits first may help to further reduce the
> lookup table size you need.
>
> Hope this helps,
> Theo
> On Thu, Aug 3, 2017 at 7:57 PM, Tim Ressel <timr at circuitabbey.com
> <mailto:timr at circuitabbey.com>> wrote:
>
> Hi,
>
> I'm looking at doing a VU meter in digital land. Sample the audio
> and do all the work in code. I am wondering what is the best way
> to approach the filtering. There needs to be a lowpass filter
> thingie with a very low cutoff, which makes the ratio of cutoff to
> sample rate very small. The obvious solution is to decimate the
> signal and get the sample rate down to a reasonable number. My
> concern here is the lp filter is low order and tails way out in
> frequency. Is decimation going to affect its ability to display
> transients? Another approach is to have a huge FIR filter, but we
> are talking lots of calculations per sample.\
>
> Any thoughts?
>
> --
> --Tim Ressel
> Circuit Abbey
> timr at circuitabbey.com <mailto:timr at circuitabbey.com>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org <mailto:Synth-diy at synth-diy.org>
> http://synth-diy.org/mailman/listinfo/synth-diy
>
> _______________________________________________ Synth-diy mailing list
> Synth-diy at synth-diy.org http://synth-diy.org/mailman/listinfo/synth-diy
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
--
--Tim Ressel
Circuit Abbey
timr at circuitabbey.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20170804/84d14576/attachment.htm>
More information about the Synth-diy
mailing list