[PD] Analysis on a wav file?

Jared linux at fridaythang.com
Sun Apr 22 23:32:53 CEST 2007


First, thanks for everyone who has helped me out so far - my project 
(rather general voting based on xylophone notes) is going very well and 
I have it processing in real-time which note has been hit.

I'd like, however, to have PD record something like 5 seconds of audio 
and then analyze *that* for the max frequency. I envision the operator 
initiating a bang, PD automatically recording about 5 seconds of audio, 
(either to a file or to it's own array; I don't need to keep the 
recorded audio after it's analyzed), and filtering out a couple 
frequencies I'm interested in (using [bp~]?), and letting me know which 
frequency was louder. That is, the initial inlet would be a bang, and 
the final outlet would be a number (giving 1 or 2, for example) which 
I'm doing right now using [expr].

So I guess I have two separate questions. First, how can I get PD to 
record a set amount of audio, either to a file or to an array (if anyone 
can let me know which would be preferable and why I'd love to hear your 
advice).

Second, how to perform analysis on a wav file or a stored array.

I'm unsure how to do this and would appreciate any help. I've figure 
out, using [del] how to send delayed bangs but have been confused trying 
to work my way through [readsf~] [writesf~] and [soundfiller], which 
seemed like my best bets.

Any help would be appreciated.
Thanks!
-Jared




More information about the Pd-list mailing list