Pd patch: how to select .wav files?

Hi,
I’m working on a Pd patch that loads .wav files to process.
On my laptop I use [openpanel], but on Nebulae I need to read the content of /home/alarm/audio without it.

AFAIK to read the content of a folder in Pd 0.48 (the factory install), I know only of externals, like [folder_list] in hcs.
I believe that the factory firmware does not support externals.

Would it be possible for me to update Pd to 0.52, which I believe has a new object [file] that can read a folder’s content?

I saw the solution in the ReconetC!.pd example, but hardcoding the pathnames seems to be very reductive, even though it seems to be the only way with Pd 0.48

Any suggestion is greatly appreciated.

I believe makefilename object could be of help in your case, you could probably find a way of using it to iterate though your files

1 Like

With [makefilename] I could build pathnames, assuming that I rename all the files to be read to a name I already know, like “sample_1.wav, sample_2.wav”, and a quantity already known. But if I want to manage samples like, say, the granular looper, I need to be able to read the directory, for both file names and files’ count.

Ah, ok, now I understand what you want to achieve. Unfortunately I don’t see a way in which this could achieved using Pd vanilla :pensive:

We really need an updated firmware to include the latest Pd. Objects like [file], which would solve your problem, are really important to my workflow now. I just built a file slicer and it wouldn’t load. That’s when I remembered that I’m using [file], [text], and [array]. Guess I have to shelve my idea for now.

The method that I described earlier works like a charm. Yes, there is the limitation imposed on the file names, but in the end it works.

There is another “potential” limitation, that is the use of abstractions. All PD patches loaded on the unit are considered to be a “main” patch. If for instance I want to use the [clone] object, I’ll need to manually install the abstraction , through SSH, in the “system” pd/extra, so that it can be found and loaded