Hi, so, [file] is great, I have a [dir] object in ELSE that browses through files in a directory and I guess one can now do it all in plain Vanilla, but I was trying things and it's not that easy or straight forward.
In [dir] you can easily browse through files like giving it a file number so it queries and gives you a file name, and you can ask for specific extensions like ".wav". Say you want to load audio files from a directory, just use the 'seek <float>' message and seek for the files, like "seek 4" gives us the 5th audio .wav file. The [dir] object also gives us the number of found files so we can choose them randomly.
I can do this with [file] but it needs lots of stuff. Check out my attached image.
So, one thing I'd like, just get the filename and extension from [file split] as an option, so I wouldn't need [list split]. Also, something weird happened and files with space in its name came out as 'lists', not symbols.
Another thing is just an easier way to 'seek' for files with a specific extension and also get the number of found files.
And yes, getting the patch's directory by default would make things easier and bypass the need of [pdcontrol].
cheers
Em ter., 22 de mar. de 2022 às 22:30, Christof Ressi info@christofressi.com escreveu:
[dir( -> [pdcontrol]. Not very intuitive, I know...
We have been discussing to add such functionality to the [file] object family, where it would make more sense. See https://github.com/pure-data/pure-data/issues/1539.
Christof On 23.03.2022 02:23, Philip Stone via Pd-list wrote:
I’m currently using [ggee/getdir] to determine the path of the current patch, and I was hoping that [file] would give me a vanilla alternative. It doesn’t seem to – am I missing something?
Thanks,
Phil Stone
University of California, Davis
_______________________________________________Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list