[PD] more features for [file] (Get directory of current patch)
IOhannes m zmoelnig
zmoelnig at iem.at
Thu Mar 24 08:16:41 CET 2022
On 3/23/22 20:44, Alexandre Torres Porres wrote:
>
> 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].
i think the best would be if [list split] would accept negative indices
(counting from the end), to simply extraxt the last element of a list.
> Also, something weird
> happened and files with space in its name came out as 'lists', not symbols.
i'm not sure i can follow.
[file split] always outputs a list, regardless of spaces.
ifa filename contains spaces, i here get something like:
[list foo\ bar.pd(
(that's a "list"-message with a single symbol-atom "foo bar.pd")
however, i noticed that my unit-tests (that are automatically run on
linux, windows and macOS) do not cover splitting files with spaces.
so i might have missed some cross-platform thing.
>
> Another thing is just an easier way to 'seek' for files with a specific
> extension and also get the number of found files.
that seems very high-level to me.
(aka: build your abstraction around [file] to get this and a graphical
pull-down menu for chosing files and playing the soundfile)
>
> And yes, getting the patch's directory by default would make things easier
> and bypass the need of [pdcontrol].
there's an open PR that adds [file patchpath] (and more).
gfdmasrf
IOhannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220324/6f005bb1/attachment.sig>
More information about the Pd-list
mailing list