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
> 
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
> 
#N canvas 3 51 670 527 10;
#X msg 49 46 C:/Users/Hrvoje/Desktop/my_patches/SAMP_SEQ/samples/BD.wav
;
#X obj 49 90 list fromsymbol;
#X obj 49 68 symbol;
#X obj 49 112 t b l;
#X obj 49 134 until;
#X obj 49 156 list;
#X obj 49 178 list split 1;
#X obj 49 200 t f f;
#X obj 81 266 list prepend;
#X obj 81 288 t l;
#X obj 49 222 sel 47;
#X obj 49 310 list;
#X obj 49 420 list tosymbol;
#X symbolatom 49 442 10 0 0 0 - - -, f 10;
#X obj 49 332 t l l;
#X obj 49 398 list split;
#X obj 116 354 list length;
#X obj 116 376 - 4;
#X connect 0 0 2 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 1 5 1;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 6 1 5 1;
#X connect 6 2 4 1;
#X connect 6 2 11 0;
#X connect 7 0 10 0;
#X connect 7 1 8 0;
#X connect 8 0 9 0;
#X connect 9 0 8 1;
#X connect 9 0 11 1;
#X connect 10 0 8 1;
#X connect 10 0 11 1;
#X connect 11 0 14 0;
#X connect 12 0 13 0;
#X connect 14 0 15 0;
#X connect 14 1 16 0;
#X connect 15 0 12 0;
#X connect 16 0 17 0;
#X connect 17 0 15 1;

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to