Benjamin Boyce
Benjamin Boyce

Reputation: 405

Pure Data freezes when trying to record

Working with Pure Data, trying to record audio output from a patch I've made, and am 1) unable to create a file within pure data to write to and 2) attempting to use the writesf~ object causes the program to freeze after about two to three seconds. I suspect the two things are related- perhaps the program is attempting to write data somewhere, somehow, but it's going in the wrong place or some such and causing the program to freeze? I've uninstalled the latest Pure Data release (0.51-1) and installed an earlier stable release (0.5-2) and even tried an alternative called "purr data (latest release)" all with the exact same result on my windows 10 acer laptop: no file created, and program freezes after a few seconds.

I'm testing with this patch: Screenshot of Pd patch

I first click on the message that reads "open rec.wav" then the start then the stop, and if I take longer than three or so seconds to click on "stop" the program freezes, otherwise nothing at all happens. I have performed system wide search for the audio file, including the folder that the patch is in, all to no avail. Any trouble shooting hints will be carefully attempted.

Upvotes: 0

Views: 234

Answers (2)

umläute
umläute

Reputation: 31374

Are you sure you have write-permissions on the target directory?

If your example you use rec.wav which has no explicit target directory (and is just using the "current", so it's hard to tell from outside what this directory would be).

@max-n's answer suggests to use /tmp/foo.wav which is an illegal directory on Windows. Due to a known bug, using an illegal (or otherwise non-writable) path will lock up Pd.

If your "current" directory happens to be your system root (aka C:\), you might well lack the permissions to write there. You could check by starting the Pd from the cmdline and see whether the terminal spits out any weird errors:

  1. ⊞ Win+R
  • type cmd and hit Enter
  1. in the opening terminal type the full path to your Pd-executable, e.g.:
  • C:\Program Files\Pd\bin\pd + Enter
  • (ideally leave out the extension (that is: use .../pd rather than .../pd.exe)

If the problem is indeed a permission problem, you can simply work around it by specifying the full path of the output file (and make sure that it is in a writable directory).

The easiest way to do this is by using a file-selector to choose the output file:

[bang(
|
[savepanel]
|
[open $1(
|
[writesf~]

Upvotes: 1

Max N
Max N

Reputation: 1183

There might be a reason why the helpfile uses a [delay 1000] to schedule a stop message in a predefined time.

writesf~ helpfile

Upvotes: 0

Related Questions