PD question : how to scroll through folders in a folder?

I’m looking for a particular workflow in an app I’m working on (actually, my first).
I have a folder called “SONGS”, populated with song folders called like “BPM Nameoftheartist nameofthesong”. Each folder contains 14 loops named 01 to 14.

I want to be able to scroll through songs (which are actually folders names), display their names on the Organelle screen, and then load the 14 files into 14 different buffers.

Any help on where to start ?

I’ve made some significant work on the patch functionality but I still have to load files manually for now.

Thanks !

You can check out the H Rando patch. It loads samples from 24 different folders…

1 Like

Thanks a lot, I’ll dive into it.

It helped a lot, thanks ! [folder_list] makes it possible.

Now to display the songnames on the screen, I’d need to trim this message :


to :


How would you do that ? Basically what I want is to display only what’s after the last “/”.

Thanks for your help !

(I am also curious to know how to break a message in 2 blocks of 21 characters in order to display long names on 2 lines)

I think the way Overloop handles displaying file name of the current sample might help. Please see how the [pd getNumSounds] object and subsequent [s numSounds] & [r numSounds] objects work to display the filename on OLED with the [screenline5 Playing $.wav] object.
You can also see how DJ Patch Record uses to Knob1 scroll through a list (search for [r return-name] ). DJPR uses ‘gPrintLn’ instead of ‘screenline’ to print name to OLED.

1 Like

Thanks again.
For storing and scrolling file names I’m using [text] and find it very simple. Any drawbacks ?

i still didn’t get how to display only what’s after the last “/”, though.

the other Hcs external, split_path, does the job.
Just wondering if I can avoid another external. Trying to play the “Vanilla game”.