Hi folks!
Anyone able to tell me how I can access sound files in PD that are located on a USB stick? On PD on my computer I can just use readsf~ or soundfiler to look for the files in /Volumes/USBSTICK/filename.wav. This doesn't work on the Bela - is there a different address to use? Or do I need to mount the disk somehow?
Read files from USB stick
- Edited
Sorry about the delay, I had to get my hands on a USB drive to try it out. I made a wiki entry about it, let me know if it helps: https://learn.bela.io/using-bela/bela-techniques/accessing-a-usb-drive/
moving over here from the other thread!
I've got this all working now, many thanks for all your help. The one slight difference from the wiki, in order to get it working easily in PD, was to mount the USB stick into the project folder for my PD project (rather than to a root folder). So that means the path that it's mounting into is /root/Bela/projects/project_name/mnt/usb
For some reason if I tried to mount the files somewhere not in the PD project folder, PD wouldn't find them. I imagine this is a PD issue, or maybe I was just getting the path wrong. either way, it works great now!
yannseznec imagine this is a PD issue, or maybe I was just getting the path wrong
Yes. Pd would look for relative paths from the location of the patch. You should pass an absolute path (starting with /
) if you want it to find them elsewhere.
A minor note: if this simplifies things for you, you can skip the mnt
and just have them in /root/Bela/projects/project_name/usb/
: there is nothing special about a folder called mnt
.
I came back and found this thread because I remembered posting it and I wanted to do the same thing again but couldn't remember how. if anyone else ends up here looking for info, the wiki page that Giulio posted above can now be found here: https://learn.bela.io/using-bela/bela-techniques/accessing-a-usb-drive/