Thanks I will try recording to a table. The purpose of this eventually is to use sigmund~ to batch analyse audio files so I need the standard DSP chain to work<div><br>On Monday, May 12, 2014, Lorenzo Sutton &lt;<a href="mailto:lorenzofsutton@gmail.com">lorenzofsutton@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/05/2014 13:48, Roman Haefeli wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Oli<br>
<br>
The problem is not that [delay] quantizes messages on block boundaries,<br>
but [writesf~] does so ([delay] is totally precise). If you want exactly<br>
1s wav files, you need to replace [writesf~]. You could create a table<br>
with the desired length and use [tabwrite~]  to record to that table.<br>
Then you could send a &#39;write&#39; message to [soundfiler] to export table<br>
content to a wav file. The resulting wav file should have the exact<br>
length of the table (I haven&#39;t tested that, though).<br>
</blockquote>
<br>
Furthermore... Are you really interested in capturing output from e.g. [phasor~] as in the example (ad possibly other dsp objects), or simply creating a 1 second ramp? I the latter case you don&#39;t necessarily need that phasor~ and could just use a table and soundfiler as Roman suggested.<br>

<br>
Lorenzo.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Roman<br>
<br>
<br>
On Mon, 2014-05-12 at 12:22 +0100, Oli Larkin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I&#39;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.<br>
<br>
Here is a test patch which writes a ramp which should last 44100 samples. I am launching it like this:<br>
<br>
/Applications/Pd-0.45-4.app/<u></u>Contents/Resources/bin/pd -batch -nomidi -send &quot;file test&quot; /Users/oli/batchtest.pd<br>
<br>
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)<br>
<br>
Is there any way i can stop the recording after exactly 44100 samples have elapsed?<br>
<br>
thanks<br>
<br>
oli<br>
<br>
//batchtest.pd<br>
<br>
#N canvas 696 426 450 300 10;<br>
#X obj 194 157 writesf~;<br>
#X msg 189 107 start;<br>
#X obj 218 30 loadbang;<br>
#X msg 114 198 stop;<br>
#X obj 293 34 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1<br>
-1;<br>
#X msg 250 111 open /Users/oli/test.wav;<br>
#X msg 292 66 \; pd dsp 1;<br>
#X obj 215 60 t b b b b;<br>
#X obj 74 159 t b b;<br>
#X msg 50 218 \; pd xquit;<br>
#X obj 86 51 phasor~ 1;<br>
#X obj 74 128 delay 1000;<br>
#X obj 285 191 receive file;<br>
#X obj 285 230 print file;<br>
#X connect 1 0 0 0;<br>
#X connect 2 0 7 0;<br>
#X connect 3 0 0 0;<br>
#X connect 4 0 7 0;<br>
#X connect 5 0 0 0;<br>
#X connect 7 0 11 0;<br>
#X connect 7 1 1 0;<br>
#X connect 7 2 5 0;<br>
#X connect 7 3 6 0;<br>
#X connect 8 0 9 0;<br>
#X connect 8 1 3 0;<br>
#X connect 10 0 0 0;<br>
#X connect 11 0 8 0;<br>
#X connect 12 0 13 0;<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a>Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a>Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
<a>Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote></div>