[PD] Name of current patcher's file and path
oliver
oliver at klingt.org
Wed Oct 2 20:35:09 CEST 2019
Pierre Alexandre Tremblay wrote:
> Hello
>
> I repost this because I could not understand my own title ;-)
>
> I still try to recover programmatically the name of the file (and of the path) of a patcher. Any pointer welcome
hi, pierre !
just out of curiosity: why do you need to get the name of a patch ? if
you are editing your patch, you should also know its name and could
append it easily to [pdcontrol]'s output.
apart from that: i don't think there's a vanilla way to do what you
want, somebody may correct me here.
the only method i know needs IEMGUTS' [canvasname] (get it from deken)
and an example patch is attached (i also added TOF's [path] for
completeness).
=======================================================================
which brings me to another small issue with PD 0.50 on windows:
when i double click this very patch (pathname has a space) and PD starts
up and loads this patch i get an abbreviated name like this:
NAMETE~1.PD
if i first start PD, and THEN load this patch from the menu, the name
appears correct. this only happens with names that have spaces.
i also attached the same patch with an underscore that gets a normal
filename when doubleclicked.
=======================================================================
on a sidenote:
i think that [pdcontrol] has great potential but is still limited at the
moment. something like a "name" or "patch" message to do what pierre is
looking for should be no problem. but i also would highly appreciate
other querying/setting options in vanilla with this opject, like GOP
status, boundaries, margins (to this day there's no way to get a GOP's
margins !)
miller, what about it ? ;-)
best
oliver
-------------- next part --------------
#N canvas 735 288 524 428 12;
#X declare -path tof -path iemguts;
#X obj 50 106 pdcontrol;
#X msg 50 78 dir 0;
#X obj 139 131 print b;
#X obj 50 133 print a;
#X obj 139 106 tof/path current;
#X msg 139 79 bang;
#X obj 152 23 declare -path tof -path iemguts;
#X msg 277 81 bang;
#X obj 277 106 iemguts/canvasname;
#X obj 400 132 print c;
#X obj 52 281 pdcontrol;
#X obj 128 246 iemguts/canvasname, f 19;
#X obj 52 227 t b b;
#X obj 52 205 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 52 255 dir 0;
#X obj 142 222 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 52 307 list, f 11;
#X msg 52 334 symbol \$1/\$2;
#X obj 52 362 print full_path_plus_name;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X connect 7 0 8 0;
#X connect 8 1 9 0;
#X connect 10 0 16 0;
#X connect 11 1 16 1;
#X connect 12 0 14 0;
#X connect 12 1 11 0;
#X connect 13 0 12 0;
#X connect 14 0 10 0;
#X connect 15 0 11 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
-------------- next part --------------
#N canvas 735 288 524 428 12;
#X declare -path tof -path iemguts;
#X obj 50 106 pdcontrol;
#X msg 50 78 dir 0;
#X obj 139 131 print b;
#X obj 50 133 print a;
#X obj 139 106 tof/path current;
#X msg 139 79 bang;
#X obj 152 23 declare -path tof -path iemguts;
#X msg 277 81 bang;
#X obj 277 106 iemguts/canvasname;
#X obj 400 132 print c;
#X obj 52 281 pdcontrol;
#X obj 128 246 iemguts/canvasname, f 19;
#X obj 52 227 t b b;
#X obj 52 205 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 52 255 dir 0;
#X obj 142 222 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 52 307 list, f 11;
#X msg 52 334 symbol \$1/\$2;
#X obj 52 362 print full_path_plus_name;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X connect 7 0 8 0;
#X connect 8 1 9 0;
#X connect 10 0 16 0;
#X connect 11 1 16 1;
#X connect 12 0 14 0;
#X connect 12 1 11 0;
#X connect 13 0 12 0;
#X connect 14 0 10 0;
#X connect 15 0 11 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
More information about the Pd-list
mailing list