Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

SPECTRUM ANALYZER in Perl

by robcatow (Initiate)
on Mar 23, 2015 at 08:49 UTC ( #1120947=perlquestion: print w/replies, xml ) Need Help??

robcatow has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!

I'm new to this forum and I need your help.

I've been in to perl for quite a while now but I'm especially interested in sound. Now to combine these two things, I want to start a little project, which I would like to introduce to you. And this is what it's about:

A FULL SPECTRUM ANALYZER for recorded sound and existing audio files (but mainly first). If you have no idea what I'm talking about http://en.m.wikipedia.org/wiki/Spectrum_analyzer .. just to get an idea. It's pretty impressive actually. And here is how I'd like to do it:

1 First get a sound input from our microphone. 2 Then analys the recorded data. We are supposedly going to have an array of numbers. A byte array. 3 Now we want this sound in a 'frequency domain' (not a time domain! ) So we need to transform our byte array to a frequency domain 4 and then in the end visualise it.

So this is just a brief overview of what the script is going to be doing. Hopefully! :)

If anyone has got an idea to any of these 4 points I'd be very glad to hear! Sadly perl is very poor concerning sound in general. So all help is very welcome. I'll probably be working on this for quite some time and if you guys are interested I'll be posting my process on the forum!

Cheers Rob C

PG8b5W4ebGA51

Replies are listed 'Best First'.
Re: SPECTRUM ANALYZER in Perl
by karlgoethebier (Abbot) on Mar 23, 2015 at 09:03 UTC

    Audio::Analyzer?

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: SPECTRUM ANALYZER in Perl
by graff (Chancellor) on Mar 24, 2015 at 02:36 UTC
    Because this sort of analysis involves doing a lot of number crunching on arrays and matrices of binary integers and floats, most people opt for compiled code rather than scripting languages to do the heavy lifting.

    Pick a decent compiled signal analysis library (there are at least a few open source projects with good support); it'll probably have command-line tools so that you can easily write perl wrappers for managing processing pipelines, keeping files organized, reporting results, etc.

    You could also try writing perl XS code to link your scripts directly to library functions, but you might find it difficult to do better this way than you would if you were just using compiled command-line tools.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1120947]
Approved by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-06-30 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (97 votes). Check out past polls.

    Notices?