Hi Frank Barknecht wrote:
Enrique Erne hat gesagt: // Enrique Erne wrote:
now the point why i write this email: it would be nice to have a little note in sssad-help that says "initializing is strongly recommended" or similar.
Hm, probably [sssad] should get a [route bang] after the [route save] as well to prohibit saving parameters that haven't been initialized - similar to the protection of the outlet. I attached a version which has this with a little demo patch.
That looks great. Still, personally I will initialize all keys, this guarantees to always have complete presets.
[loadbang] | [; SSSAD vol 20, freq 42, other 1.2345(
An other minor issue:
In my post before I wrote to do [SSSAD_ADMIN set( on load, but on a second thought this is not good practice. It would force all SSSAD to output their value, even other already existing patches.
Basically i would like it if there was a possibility to let some SSSAD instances in a new patch output the value. Attached SSSAD has a possible solution.
case 1) ___________________________________
[sssad vol]
|
[*~ 0.5]
Here SSSAD would not be initialized.
case 2) ___________________________________
[loadbang] | [; SSSAD vol 0.5(
[sssad vol]
|
[*~ 0.5]
Here all is good except i don't want to write the value twice.
case 3) ___________________________________
[loadbang] | [; SSSAD vol 0.5(
[sssad vol]
/
[*~]
*~ is missing the init value. It would work with [SSSAD_ADMIN set( but then all SSSAD's will output their value. That seems wrong.
case 4) ___________________________________
[loadbang] | [; SSSAD vol 0.5, vol bang(
[sssad vol]
/
[*~]
How about something like that? [SSSAD vol bang( could be used to specify one key to output it's value. One more [route bang] would be required.
One could argue [SSSAD vol bang( should delete the value, but i can't think of a use of having a key without value.
In attached SSSAD i have 2 minor changes.
A [route bang] to
(i like that change a lot and see no problem)
$1 in [route save $1] to
(this is not a clean solution and doesn't work when with [sssad save] instance, but it would allow to collect specific data)
wow pretty long email for such a minor thing. thanks for having a look at it :)
eni
#N canvas 282 224 783 400 10; #X floatatom 130 69 5 0 0 0 - - -; #X floatatom 138 102 5 0 0 0 - - -; #X obj 594 192 list prepend add; #X obj 594 218 list trim; #X obj 438 267 s SSSAD_ADMIN; #X obj 594 124 r SSSAD_ADMIN; #X obj 594 168 route persist; #X obj 594 146 list trim; #X msg 438 201 save; #X msg 452 240 set; #X obj 438 63 bng 24 250 50 0 empty empty save_all 0 -6 0 8 -262144 -1 -1; #X msg 594 258 other-patch 8 ; freq 12 ; vol 11 ;; #X obj 438 134 t b b; #X msg 470 167 set; #X obj 57 66 sssad vol; #X obj 56 157 loadbang; #X floatatom 192 289 5 0 0 0 - - -; #X msg 57 180 ; SSSAD vol 11 , vol bang ; SSSAD freq 12 , freq bang; #X obj 290 59 bng 24 250 50 0 empty empty save_this_patch 0 -6 0 8 -262144 -1 -1; #X obj 285 104 t b b; #X msg 319 128 set; #X obj 58 101 sssad freq; #X obj 72 288 sssad other-patch; #X msg 281 156 ; SSSAD_ADMIN vol , freq; #X connect 0 0 14 1; #X connect 1 0 21 1; #X connect 2 0 3 0; #X connect 3 0 11 0; #X connect 5 0 7 0; #X connect 6 0 2 0; #X connect 7 0 6 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 10 0 12 0; #X connect 12 0 8 0; #X connect 12 1 13 0; #X connect 13 0 11 0; #X connect 14 0 0 0; #X connect 15 0 17 0; #X connect 16 0 22 1; #X connect 18 0 19 0; #X connect 19 0 23 0; #X connect 19 1 20 0; #X connect 20 0 11 0; #X connect 21 0 1 0; #X connect 22 0 16 0;
#N canvas 58 42 1019 539 10; #X obj 123 24 inlet; #X obj 197 130 r SSSAD; #X obj 197 87 s SSSAD; #X obj 197 53 list prepend $1; #X obj 197 158 list trim; #X obj 197 23 inlet; #X obj 16 258 r SSSAD_ADMIN; #X obj 16 306 b; #X obj 16 284 route set; #X obj 123 51 b; #X obj 197 221 route $1; #X obj 574 442 s SSSAD_ADMIN; #X obj 507 156 r SSSAD_ADMIN; #X obj 507 304 b; #X obj 507 248 spigot; #X obj 633 70 loadbang; #X obj 633 248 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 633 93 value $1.SSSAD.req; #X obj 633 192 select 0; #X obj 665 139 + 1; #X obj 665 162 value $1.SSSAD.req; #X obj 633 118 t a a; #X obj 633 214 f 1; #X obj 190 420 outlet; #X obj 123 394 route bang; #X text 207 393 filter out empty lists; #X obj 574 412 list prepend persist $1; #X obj 123 365 list append; #X text 195 108 on SSSAD we eavesdrop the communication; #X text 656 247 <- only the first instance responds to "save"; #X text 129 498 2007/2008 fbar; #X text 780 93 Enhancement by Enrique Erne; #X obj 507 363 list append; #X obj 507 386 route bang; #X text 591 385 filter out empty lists here , too.; #X obj 196 249 route bang; #X obj 507 275 route save $1; #X text 266 240 to output a specific key; #X text 539 297 dol1 to save a specific key; #X connect 0 0 9 0; #X connect 1 0 4 0; #X connect 3 0 2 0; #X connect 4 0 10 0; #X connect 5 0 3 0; #X connect 6 0 8 0; #X connect 7 0 27 0; #X connect 8 0 7 0; #X connect 9 0 27 0; #X connect 10 0 35 0; #X connect 12 0 14 0; #X connect 13 0 32 0; #X connect 14 0 36 0; #X connect 15 0 17 0; #X connect 17 0 21 0; #X connect 18 0 22 0; #X connect 19 0 20 0; #X connect 21 0 18 0; #X connect 21 1 19 0; #X connect 22 0 14 1; #X connect 22 0 16 0; #X connect 24 1 23 0; #X connect 26 0 11 0; #X connect 27 0 24 0; #X connect 32 0 33 0; #X connect 33 1 26 0; #X connect 35 0 27 0; #X connect 35 1 27 1; #X connect 35 1 32 1; #X connect 36 0 13 0; #X connect 36 1 13 0;