[PD] trim symbols?

Ingo Stock mail at ingostock.de
Sat Sep 23 15:31:55 CEST 2017


You can use [list fromsymbol] to convert the symbol to a list of ASCII
values and than work on that. See attached patch, it should do what you
want.

Note that the patch assumes that the ending (like .wav) is always 4
characters. Also it uses a simple list-drip mechanism that should be
efficient for small lists, in doubt use list-drip of list-abs instead.

best wishes, ingo


On 23/09/17 14:33, Hrvoje Radnic via Pd-list wrote:
> Hi!
> 
> I would like to display the name of the .wav file loaded from the HDD
> (using [openpanel]), but, without a full path and without the file
> extension. For example, [openpanel] outputs "symbol
> C:/Users/Hrvoje/Desktop/my_patches/SAMP_SEQ/samples/BD.wav" and I just
> want "BD" to be displayed. Is it possible in pd vanilla? Thank you for
> the help!
> Cheers!
>  
> Hrvoje Radnic
> http://soundcloud.com/sumovi-protiv-valova
> 00385(0)915225162
> 
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getfilename.pd
Type: text/x-puredata
Size: 1039 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170923/91da3dc4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170923/91da3dc4/attachment.sig>


More information about the Pd-list mailing list