[PD] more features for [file] (Get directory of current patch)

Alexandre Torres Porres porres at gmail.com
Wed Mar 23 20:44:36 CET 2022


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 at 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 at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220323/fa797dec/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2022-03-23 at 16.41.05.png
Type: image/png
Size: 96032 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220323/fa797dec/attachment-0001.png>


More information about the Pd-list mailing list