Ok. I know you didn't want feedback on the mic, but I waited all day patiently until answers were provided, and being someone who records vocals and mixes tracks, I'm going to speak.

I understand what you're trying to do, but as you may know, you'd be better off with a dB sound sensor module along with an ADC (Analog to Digital Converter), you can get this working very reliably with pretty accurate results on a Raspberry Pi. If you use an Arduino board, it has no problem with analog signals, so you don't need the ADC (but then, you wouldn't be able to use Perl...).

Because it would connect to the GPIO (SPI) and not via USB, you'd need a Perl library that can manage that. A search through the CPAN should turn up a few libraries to at least get started.

This info isn't here to chastise. It's here in case anyone in the future that is using Perl wants to do the same thing you want to do.

disclaimer: I've never done this with my Pi (I know others who have though), but I have several ADCs, so I think I'm going to test this out to satisfy my own curiosity.


In reply to Re: Measuring the sound level (dB(A)) with PERL by stevieb
in thread Measuring the sound level (dB(A)) with PERL by John-Robie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.