[PD] [soundfiler] normalizing max amplitude inf to 1 ?

Piotr Majdak piotr at majdak.com
Fri Sep 2 09:41:18 CEST 2005


Hi Enrique,

Enrique Erne wrote:

> I'm building a normalizer for two channel wav-files , which are recorded 
> with [writesf~ 2] -bytes 2 .

I can't help you with your patch, I looks rather compicated at the first 
sight. But, my question is: do you really want to do these calculations 
in pd? I'm sure, there are some more appropriate solutions. E.g. in 
Matlab (you can use Octave, as well), my solution is:

x=wavread('filename');
y=x./max(max(abs(x))); % find the max. peak in any channel
wavwrite(y, FS, 'newfilename'); % FS=sampling rate

br, Peter


-- 
Piotr Majdak
Institut für Schallforschung
Österreichische Akademie der Wissenschaften
Reichsratsstr. 17
A-1010 Wien
Tel.: +43-1-4277-29511
Fax: +43-1-4277-9296
E-Mail: piotr at majdak.com
WWW: http://www.kfs.oeaw.ac.at






More information about the Pd-list mailing list