[PD] RRADicaled drum abstractions...

Frank Barknecht fbar at footils.org
Thu Oct 14 08:14:29 CEST 2004


Hallo,
chun lee hat gesagt: // chun lee wrote:

> >I think, the elegant solution was to read out the OSC-outlet's output,
> >and then use the output of [OSCroute /*/preset] for setting the
> >radiobutton or whatever is used to display substates. This however
> >would require that the "substate"-messages to [originator] will
> >generate OSC messages as well, which they currently do not.
>
> While I was reading your suggestion and looking at the rrad.tpl patch to see
> how it would work, I came up with this and it seems to work ok.
> 
> Basically, add a [s $2-radiobutton-update] in the [originator] after the
> [OSCroute /preset]. And then add a [r $0-radiobutton-update] in the [pd
> save] or connect that straight to the radiobuttons. What do you think?

I don't like that in this case you would have to remember names of
send/receive pairs. Paraphrasing something Miller said in Graz: This
is too intelligent, we need a stupid solution. 

I think, the solution should be to just route all substate changes to
the OSC-outlet, then a user of originator can decide on his/her own,
how to connect that information. I attached a very simple
implementation of this: originator just got onee mor object: [/preset
$1( connected to the final [OSCprepend $1], and rrad.tpl as an example
then routes this info to set the radio button.

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 500 433 255 162 10;
#X obj 3 21 cnv 15 247 138 empty \$0-background-cnv background-cnv
20 12 1 14 -225271 -66577 0;
#X obj 255 3 inlet;
#X obj 434 3 inlet OSC;
#N canvas 183 51 981 424 saves 0;
#X obj 45 160 originator \$1 \$0;
#X obj 152 132 inlet OSC;
#X obj 507 86 r \$0-s1;
#X obj 507 110 commun /s1 \$0;
#X obj 606 86 r \$0-s2;
#X obj 606 110 commun /s2 \$0;
#X obj 507 135 s \$0-s1-r;
#X obj 606 135 s \$0-s2-r;
#X obj 47 55 r \$0-substate;
#X obj 15 13 inlet substate;
#X obj 15 35 route substate;
#X obj 159 55 r \$0-copy;
#X msg 159 76 copy;
#X obj 243 50 r \$0-paste;
#X msg 241 71 paste;
#X text 154 15 This is the originator \, including some ready to use
standard functionality.;
#X text 507 56 Put your commun sends here \, if you like.;
#X msg 15 91 setsub \$1;
#X msg 17 281 svdir \$1;
#X obj 18 236 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 18 260 savepanel;
#X obj 152 189 outlet OSC;
#X msg 108 214 svxdir /tmp/svdir.xml;
#X msg 78 241 ldxdir /tmp/svdir.xml;
#X obj 281 204 s \$0-substate-r;
#X obj 281 151 OSCroute \$1;
#X obj 281 177 OSCroute /preset;
#X connect 0 2 21 0;
#X connect 0 2 25 0;
#X connect 1 0 0 1;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 8 0 17 0;
#X connect 9 0 10 0;
#X connect 10 0 17 0;
#X connect 10 1 0 0;
#X connect 11 0 12 0;
#X connect 12 0 0 0;
#X connect 13 0 14 0;
#X connect 14 0 0 0;
#X connect 17 0 0 0;
#X connect 18 0 0 0;
#X connect 19 0 20 0;
#X connect 20 0 18 0;
#X connect 22 0 0 0;
#X connect 23 0 0 0;
#X connect 25 0 26 0;
#X connect 26 0 24 0;
#X restore 372 2 pd saves;
#N canvas 569 61 450 300 cnv.ctl 0;
#X obj 90 188 s \$0-background-cnv;
#X floatatom 108 59 5 100 1000 0 width - -;
#X floatatom 112 83 4 50 500 0 height - -;
#X obj 92 132 pack 0 0;
#X msg 92 159 vis_size \$1 \$2;
#X obj 110 106 t b f;
#X connect 1 0 3 0;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 5 0 3 0;
#X connect 5 1 3 1;
#X restore 297 2 pd cnv.ctl;
#X obj 36 59 hsl 128 15 0 127 0 0 \$0-s1 \$0-s1-r s1 -2 -6 0 8 -262144
-1 -1 700 1;
#X obj 36 89 hsl 128 15 0 127 0 0 \$0-s2 \$0-s2-r s2 -2 -6 0 8 -262144
-1 -1 500 1;
#X obj 193 60 vradio 15 1 0 3 \$0-substate \$0-substate-r empty 0 -6
0 8 -262144 -1 -1 0;
#X obj 34 121 bng 15 250 50 0 \$0-copy empty copy 0 -6 0 8 -262144
-1 -1;
#X obj 141 123 bng 15 250 50 0 \$0-paste empty paste 0 -6 0 8 -262144
-1 -1;
#X obj 254 142 outlet;
#X text 185 2 look! ==>;
#X obj 372 23 outlet OSC;
#X obj 330 31 inlet;
#X connect 2 0 3 1;
#X connect 3 0 12 0;
#X connect 13 0 3 0;
#X coords 0 0 1 1 250 160 1;
-------------- next part --------------
#N canvas 260 166 978 591 10;
#X text 425 22 responsibilities:;
#X text 98 10 ORIGINATOR (the mixing engineer);
#X text 447 59 * set memento (restore settings from photo);
#X text 448 40 * create memento (take photo);
#N canvas 76 23 720 450 createMemento 0;
#X obj 48 84 inlet;
#X obj 97 117 symbol \$1;
#X obj 97 90 loadbang;
#X obj 97 150 s \$0-memento;
#X text 75 49 \$1 is the default name of the memento \, that this originator
creates \, but it can be changed later.;
#X obj 74 179 outlet;
#X text 292 108 What is a memento?;
#X text 275 121 a memento is a directory in a global (data)pool;
#X obj 305 139 r \$0-memento;
#X msg 309 180 state \$1;
#X obj 319 213 s \$0-pool;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X restore 122 321 pd createMemento;
#X obj 122 104 inlet;
#N canvas 600 185 664 406 setMemento 0;
#X text 238 12 setMemento is responsible for restoring all registered
variables.;
#X obj 64 26 inlet;
#X obj 109 286 outlet;
#X obj 109 249 r \$0-restore;
#X msg 64 126 getall;
#X obj 64 183 s \$0-pool;
#N canvas 468 415 450 300 change2substate 0;
#X obj 92 39 inlet;
#X obj 113 198 outlet;
#X obj 185 93 r \$0-memento;
#X obj 280 93 r \$0-substate;
#X obj 113 144 pack s s 0;
#X obj 92 93 symbol chdir;
#X obj 92 67 t b;
#X obj 113 167 route list;
#X text 218 163 un-list again;
#X connect 0 0 6 0;
#X connect 2 0 4 1;
#X connect 3 0 4 2;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X restore 131 127 pd change2substate;
#X text 186 104 change to dir memento substate;
#X obj 64 52 t b b b;
#X obj 130 75 s \$0-set-ON;
#X connect 1 0 8 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 6 0 5 0;
#X connect 8 0 4 0;
#X connect 8 1 6 0;
#X connect 8 2 9 0;
#X restore 256 446 pd setMemento;
#X text 431 90 What is a memento?;
#X text 463 111 a memento is a directory in a global (data)pool;
#X text 432 135 What is a state?;
#X obj 563 328 r \$0-pool;
#X symbolatom 691 374 10 0 0 3 memento - -;
#X msg 170 103 create help;
#X msg 261 103 set memento;
#X obj 777 348 inlet;
#X obj 178 297 s \$0-substate;
#X obj 828 482 r \$0-substate;
#X msg 828 511 substate \$1;
#X msg 99 471 copy;
#X msg 210 472 paste;
#X obj 134 514 s \$0-pool;
#X obj 309 341 symbol;
#X obj 156 440 t b b;
#X msg 620 389 set \$1;
#X obj 563 460 s \$2-in;
#X obj 197 418 r \$0-set;
#X obj 148 472 s \$0-set;
#X obj 828 540 s \$0-pool;
#X obj 225 274 s \$0-pool;
#X text 462 154 a state is the content of a memento subdirectory named
by a number.;
#X text 819 348 OSC inlet;
#X obj 777 377 OSCroute \$1;
#X text 462 154 a state is the content of a memento subdirectory named
by a number.;
#X obj 535 273 r \$2-RRADICAL-MEMENTO;
#X text 443 248 \$2-RRADICAL-MEMENTO is sent by commun objects;
#X obj 777 413 s \$2-RRADICAL-OSC;
#X obj 563 419 prepend RRADICAL.dummy;
#X obj 385 520 outlet;
#X obj 235 196 prepend get;
#N canvas 468 415 450 300 ch2subs 0;
#X obj 92 39 inlet;
#X obj 113 198 outlet;
#X obj 185 93 r \$0-memento;
#X obj 280 93 r \$0-substate;
#X obj 113 144 pack s s 0;
#X obj 92 67 t b;
#X obj 113 167 route list;
#X text 218 163 un-list again;
#X obj 92 94 symbol chdir;
#X connect 0 0 5 0;
#X connect 2 0 4 1;
#X connect 3 0 4 2;
#X connect 4 0 6 0;
#X connect 5 0 8 0;
#X connect 6 0 1 0;
#X connect 8 0 4 0;
#X restore 255 252 pd ch2subs;
#X obj 225 230 t a b;
#X obj 563 382 spigot;
#X obj 448 520 spigot;
#N canvas 548 386 450 300 tgl 0;
#X obj 155 198 outlet;
#X obj 240 198 outlet;
#X msg 151 120 0;
#X msg 184 120 1;
#X msg 233 120 0;
#X msg 266 120 1;
#X obj 295 55 r \$0-set-ON;
#X obj 292 85 loadbang;
#X obj 185 65 r \$0-get-ON;
#X text 20 7 This tgl is to prevent some loops when using get and set.
;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 2 0;
#X connect 6 0 5 0;
#X connect 7 0 5 0;
#X connect 7 0 2 0;
#X connect 8 0 3 0;
#X connect 8 0 4 0;
#X restore 486 348 pd tgl;
#X obj 235 177 t a b;
#X obj 287 175 s \$0-get-ON;
#X msg 505 463 set \$1;
#X obj 448 493 prepend RRADICAL.dummy;
#X obj 385 493 spigot;
#X obj 448 544 outlet;
#X text 353 541 Value outlet;
#X text 494 545 Value/Key outlet;
#X obj 370 228 s \$0-substate;
#X obj 340 203 t b f;
#X obj 563 351 rradical.state \$1;
#X obj 22 197 route ldxdir svxdir;
#X msg 23 285 ldxdir \$1;
#X msg 102 289 svxdir \$1;
#X obj 23 316 s \$0-pool;
#X obj 646 494 outlet;
#X text 641 515 OSC outlet;
#X obj 637 461 OSCprepend \$1;
#X msg 720 487 setsub \$1;
#X obj 720 547 s \$0-setsub;
#X obj 173 77 r \$0-setsub;
#X obj 161 378 select copy paste set;
#X obj 122 132 route create substate get setsub;
#X obj 340 251 s \$0-set;
#X obj 25 261 symbol;
#X obj 101 267 symbol;
#X obj 12 220 t b a;
#X msg 12 360 set;
#X text 12 382 after loadx \, set;
#X obj 12 77 r SET_ALL_RRADICALS;
#X text 14 47 global send to do something crazy with!;
#X obj 818 245 r \$0-substate;
#X text 795 218 \$2 == \$0 parent;
#X msg 818 270 set \$1;
#X obj 818 298 s \$2-parentstate;
#X obj 535 300 prepend set;
#X obj 764 437 OSCroute /preset /substate;
#X msg 745 513 /preset \$1;
#X connect 5 0 66 0;
#X connect 10 0 54 0;
#X connect 11 0 61 1;
#X connect 12 0 66 0;
#X connect 13 0 66 0;
#X connect 14 0 31 0;
#X connect 16 0 17 0;
#X connect 16 0 81 0;
#X connect 17 0 27 0;
#X connect 18 0 20 0;
#X connect 19 0 20 0;
#X connect 21 0 65 0;
#X connect 22 0 26 0;
#X connect 22 1 19 0;
#X connect 23 0 36 0;
#X connect 25 0 6 0;
#X connect 31 0 35 0;
#X connect 31 0 80 0;
#X connect 33 0 61 0;
#X connect 33 0 79 0;
#X connect 36 0 24 0;
#X connect 38 0 40 0;
#X connect 39 0 28 0;
#X connect 40 0 28 0;
#X connect 40 1 39 0;
#X connect 41 0 36 0;
#X connect 42 0 49 0;
#X connect 43 0 42 1;
#X connect 43 0 48 1;
#X connect 43 1 41 1;
#X connect 44 0 38 0;
#X connect 44 1 45 0;
#X connect 46 0 47 0;
#X connect 47 0 42 0;
#X connect 48 0 37 0;
#X connect 53 0 67 0;
#X connect 53 1 52 0;
#X connect 54 0 41 0;
#X connect 54 0 47 0;
#X connect 54 0 48 0;
#X connect 54 1 23 0;
#X connect 54 1 46 0;
#X connect 54 2 11 0;
#X connect 55 0 70 0;
#X connect 55 1 69 0;
#X connect 56 0 58 0;
#X connect 57 0 58 0;
#X connect 61 0 59 0;
#X connect 62 0 63 0;
#X connect 64 0 66 0;
#X connect 65 0 18 0;
#X connect 65 1 22 0;
#X connect 65 2 6 0;
#X connect 66 0 4 0;
#X connect 66 1 15 0;
#X connect 66 2 44 0;
#X connect 66 3 53 0;
#X connect 66 4 21 0;
#X connect 66 4 55 0;
#X connect 68 0 56 0;
#X connect 69 0 57 0;
#X connect 70 0 71 0;
#X connect 70 1 68 0;
#X connect 71 0 21 0;
#X connect 73 0 66 0;
#X connect 75 0 77 0;
#X connect 77 0 78 0;
#X connect 79 0 54 0;
#X connect 80 0 62 0;
#X connect 80 1 62 0;
#X connect 81 0 61 0;


More information about the Pd-list mailing list