[PD] -batch option

Oli Larkin olilarkin at googlemail.com
Mon May 12 13:22:43 CEST 2014


Hi,

I'm experimenting with the -batch option. I would like to be able to process wave files and they should end up exactly the same length in terms of samples as the original file.

Here is a test patch which writes a ramp which should last 44100 samples. I am launching it like this:

/Applications/Pd-0.45-4.app/Contents/Resources/bin/pd -batch -nomidi -send "file test" /Users/oli/batchtest.pd

The resulting file is 44096 samples long. I realise this is because the message rate delay which stops the recording is quantized to block boundaries (64*689 = 44096)

Is there any way i can stop the recording after exactly 44100 samples have elapsed?

thanks

oli

//batchtest.pd

#N canvas 696 426 450 300 10;
#X obj 194 157 writesf~;
#X msg 189 107 start;
#X obj 218 30 loadbang;
#X msg 114 198 stop;
#X obj 293 34 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 250 111 open /Users/oli/test.wav;
#X msg 292 66 \; pd dsp 1;
#X obj 215 60 t b b b b;
#X obj 74 159 t b b;
#X msg 50 218 \; pd xquit;
#X obj 86 51 phasor~ 1;
#X obj 74 128 delay 1000;
#X obj 285 191 receive file;
#X obj 285 230 print file;
#X connect 1 0 0 0;
#X connect 2 0 7 0;
#X connect 3 0 0 0;
#X connect 4 0 7 0;
#X connect 5 0 0 0;
#X connect 7 0 11 0;
#X connect 7 1 1 0;
#X connect 7 2 5 0;
#X connect 7 3 6 0;
#X connect 8 0 9 0;
#X connect 8 1 3 0;
#X connect 10 0 0 0;
#X connect 11 0 8 0;
#X connect 12 0 13 0;




More information about the Pd-list mailing list