Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by kvale (Monsignor)
on Jun 01, 2006 at 15:26 UTC ( [id://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!

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://553067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-24 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found