Bugs item #1821847, was opened at 2007-10-28 19:12 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1821847...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata
Group: v0.43
Status: Open Resolution: None Priority: 9 Private: No Submitted By: Hans-Christoph Steiner (eighthave) Assigned to: Miller Puckette (millerpuckette)
Summary: writesf~ makes junk soundfiles if started with DSP off
Initial Comment:
I have been wrestling with tracking down why my Swirler program won't record audio. Most of the time, when I try to use [writesf~] to record, it does not work at all. It creates the file when I send the open message, and I get a file of 44 bytes, then when I click start, and then stop, the file does not change.
Occasionally, it will record about 1-2 seconds of material, no matter when I hit stop. Very occasionally, it will work fine on its own.
I tried also with the writesf~ help patch, as well as others. It seems that my program Swirler stops writesf~ from working anywhere. writesf~ works fine until I run Swirler and click the "start" button, which turns on the DSP and starts the audio processing part.
This is currently happening on Mac Book Pro/Intel running 10.4.10 with Pd-0.40-2, Pd-0.39.3-extended, and Pd-0.40.3-extended-20071026. This happened previously with Pd-0.39.3-extended-rc? on a PowerMac G5/PowerPC running Mac OS X 10.4.8(ish).
I compiled Pd with DEBUG_SOUNDFILE on to see if I could see what's happening. You can plainly see it's not writing data to the file. I found a strange workaround sequence that makes it record, but then the write cycle is strange, it goes in bursts every few seconds rather than a chunk every second.
I attached the swirler program and some transcripts from teh DEBUG_SOUNDFILE stuff.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2010-03-30 17:24
Message: it seems to me that the issue is triggered by sending [open( and [start( to [writesf~] while DSP is off.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2010-03-29 20:35
Message: here's another patch from Joshua Clayton that also triggers this bug
----------------------------------------------------------------------
Comment By: ClaudiusMaximus (claudiusmaximus) Date: 2008-04-07 06:36
Message: Logged In: YES user_id=769033 Originator: NO
Here's a patch that creates rubbish wav files here in pd-0.40-3 vanilla:
#N canvas 0 0 450 300 10; #X obj 146 203 writesf~; #X obj 66 40 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 146 176 open bug.wav , start; #X obj 66 67 t b b; #X msg 184 125 ; pd dsp 0; #X obj 66 115 delay 1000; #X obj 66 141 t b b; #X msg 66 187 ; pd dsp 1; #X msg 181 78 stop; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 6 1 2 0; #X connect 8 0 0 0;
Before stop is hit, the bug.wav is 44 bytes, when stop is hit the size increases to a small number (up to a few 100kB).
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig) Date: 2008-04-07 06:12
Message: Logged In: YES user_id=564396 Originator: NO
could you provide a patch that triggers the problem without external dependencies?
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-10-28 19:41
Message: Logged In: YES user_id=27104 Originator: YES
File Added: writesf~-bug.pd
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-10-28 19:40
Message: Logged In: YES user_id=27104 Originator: YES
File Added: writesf~-bug_after_swirlrer-1.txt
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-10-28 19:39
Message: Logged In: YES user_id=27104 Originator: YES
File Added: swirler-2007-10-28.tar.bz2
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-10-28 19:37
Message: Logged In: YES user_id=27104 Originator: YES
I forgot to include the strange workaround sequence:
1) turn on DSP 2) turn on record switch (start recording) 3) turn off record switch (stop recording) 4) turn on record switch (start recording again) 5) turn on START switch in swirler 6) make recording 7) turn off record switch (stop recording) 8) turn off START switch in swirler
The turn off order seems important too.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-10-28 19:13
Message: Logged In: YES user_id=27104 Originator: YES
File Added: writesf~-bug_working.txt
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1821847...