0

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.

Max N
  • 1,134
  • 11
  • 23
Benjamin Boyce
  • 305
  • 1
  • 4
  • 11
  • It may be a good idea to flag an issue on PD’s GitHub repo. https://github.com/pure-data/pure-data/issues – fdcpp Oct 24 '20 at 09:18
  • You’re also probably better copy pasting the plain text of the pd file rather than a screen grab. Remember to include pd version and OS – fdcpp Oct 24 '20 at 09:19
  • this seems to be a problem with the actual medium (aka: the harddisk) – umläute Oct 29 '20 at 07:57
  • a similar issue has just opened on [Github](https://github.com/pure-data/pure-data/issues/1211) – umläute Nov 06 '20 at 08:01

2 Answers2

1

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~]
umläute
  • 28,885
  • 9
  • 68
  • 122
  • btw I'm not suggesting a path, this is the screenshot of the helpfile. If anything the help file is suggesting that path. – Max N Nov 25 '20 at 09:16
0

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

writesf~ helpfile

Max N
  • 1,134
  • 11
  • 23