Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Insight needed: Perl, C, Gtk2, Audio, Threads, IPC & Performance - Oh My!

by kvale (Monsignor)
on Jun 01, 2006 at 15:26 UTC ( #553067=note: print w/ replies, xml ) Need Help??


in reply to Insight needed: Perl, C, Gtk2, Audio, Threads, IPC & Performance - Oh My!

Processing audio in straight perl can be pretty slow; traversing the parse tree takes a good deal of time, to the point that operations like regex matching have their own hand-optimized C engines.

One alternative to generic perl that is great for processing vector data (like audio streams) is the Perl Data Language, or PDL. The vector and matrix operations are implemented in highly optimized C code and are programmed in a Matlab-like dialect that makes it easy to express DSP algorithms.

-Mark


Comment on Re: Insight needed: Perl, C, Gtk2, Audio, Threads, IPC & Performance - Oh My!
Re^2: Insight needed: Perl, C, Gtk2, Audio, Threads, IPC & Performance - Oh My!
by Joost (Canon) on Jun 01, 2006 at 16:09 UTC
    I am aware of PDL :-) I don't actually do any audio processing in perl itself (though the API allows it) - the plugins written in C take care of all the audio data (except for a few conversions to Audio::Play, but even that is mostly C code).

    The perl based plugins only do "control channels", that is - they generate only 1 float per channel each "tick" (with ticks once every 40 .. 200 samples). PDL can't really help with the control data, I think, since you're not acting on arrays of numbers, only single values.

    I do see there's now a PDL::Audio module on CPAN. That wasn't there when I started this (2 years ago). I'll have to check it out.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://553067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-07-11 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (218 votes), past polls