diff --git a/float_argument.pd b/float_argument.pd deleted file mode 100644 index ad74be5..0000000 --- a/float_argument.pd +++ /dev/null @@ -1,19 +0,0 @@ -#N canvas 591 211 450 300 10; -#X obj 119 28 inlet; -#X obj 119 92 float \$1; -#X obj 119 114 select 0; -#X obj 119 156 float \$2; -#X obj 119 178 select 0; -#X obj 225 241 outlet; -#X text 238 100 from purepd/float_argument; -#X obj 119 50 route bang float symbol; -#X obj 311 243 outlet symbol; -#X connect 0 0 7 0; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 1 5 0; -#X connect 3 0 4 0; -#X connect 4 1 5 0; -#X connect 7 0 1 0; -#X connect 7 1 5 0; -#X connect 7 2 8 0; diff --git a/main.pd b/main.pd index 2d9fe97..6105eae 100644 --- a/main.pd +++ b/main.pd @@ -1,4 +1,6 @@ -#N canvas 404 128 1174 825 10; +#N canvas 0 84 1920 996 10; +#X declare -path ../../o-knob; +#X declare -path o-knob; #X obj 744 163 cnv 15 400 450 empty empty page_2 20 12 0 14 -154742 -66577 0; #X obj 188 163 cnv 15 400 450 empty empty page_1 20 12 0 14 -154742 @@ -49,7 +51,7 @@ #X floatatom 1058 205 5 0 0 0 display_only - -, f 5; #X obj 958 706 cnv 15 100 60 empty empty page_3 20 12 0 14 -154742 -66577 0; -#N canvas 349 52 1495 992 presets 0; +#N canvas 366 52 1495 992 presets 0; #X obj 452 99 int; #X obj 704 103 int; #X obj 704 81 * 2; @@ -92,23 +94,19 @@ #X msg 207 796 \; o2-lfo-amp 0.898438 \; o2-lfo-freq 0.310547 \; o2-amp 0.72168 \; o2-freq 0.544922 \; o1-amp 0.589844 \; o1-lfo-freq 0.352539 \; o1-lfo-amp 0.855469 \; o1-freq 0.496094 \;; -#X msg 477 796; #X msg 618 796; -#X msg 757 796; +#X msg 757 796 \; o2-lfo-freq 0.996094 \; o2-amp 0 \; o1-lfo-amp 0.996094 +\; o1-lfo-freq 0 \; o1-amp 0.99707 \; o1-freq 0 \; o2-lfo-amp 0 \; +o2-freq 0.99707 \;; #X msg 888 796; #X msg 1028 796; #X msg 1165 796; #X msg 1307 796; -#X floatatom 755 60 5 0 0 0 - - -, f 5; #X text 25 736 Your presets are here. You can have as much presets as you want. Note that you can only save floats !; #X obj 197 422 s o-get-params; #X obj 341 461 r o-params; #X obj 229 303 r o-save; -#X text 294 303 << RESERVED; -#X text 305 423 << RESERVED; -#X text 415 462 << RESERVED; -#X text 684 299 << RESERVED; #X obj 617 299 r o-load; #X text 710 315 you can load a preset or save current parameters to a preset by sending a integer to o-load or o-save; @@ -127,26 +125,21 @@ a preset by sending a integer to o-load or o-save; #X obj 1307 772 r o-preset-9; #X obj 974 49 cnv 15 450 80 empty empty empty 20 12 0 14 -154742 -66577 0; -#X text 978 54 This is the third page. As the knobs are only useful -on this page and not a part of the synth \, we can use the second outlet -only (no hidden update of the ouput value). Also \, note that these -knobs do not have a unique name \, because it's not useful to save -their state in a preset.; #X text 632 12 do it ! (turn from left to right); -#X msg 347 796 \; o2-lfo-amp 0 \; o2-lfo-freq 0.804688 \; o2-amp 0 -\; o1-amp 0.99707 \; o1-lfo-freq 0.805664 \; o1-lfo-amp 0 \; o2-freq -0.395508 \; o1-freq 0.635742 \;; -#X obj 260 525 print; #X obj 768 119 loadbang; -#X msg 27 796 \; o2-lfo-amp 0.99707 \; o2-lfo-freq 0.182617 \; o2-amp -0.301758 \; o1-amp 0.818359 \; o1-lfo-freq 0.0556641 \; o1-lfo-amp -0.782227 \; o2-freq 0.848633 \; o1-freq 0.253906 \;; -#X msg 766 145 -1; -#X obj 766 218 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 350 55 o-knob 3 2 0.02; -#X obj 28 61 o-knob 3 1 0.2; -#X obj 639 36 o-knob 3 3 0.02; +#X msg 768 145 -1; +#X text 982 54 As the knobs are only useful on this page and not a +part of the synth \, we can use the second outlet only (no hidden update +of the ouput value). Also \, note that these knobs do not have a unique +name \, because it's not useful to save their state in a preset.; +#X msg 477 796; +#X msg 347 796; +#X msg 27 796 \; o2-lfo-freq 0.410156 \; o2-amp 0.413086 \; o1-lfo-amp +0.84375 \; o1-lfo-freq 0.138672 \; o1-amp 0.612305 \; o1-freq 0.0869141 +\; o2-lfo-amp 0.712891 \; o2-freq 0.634766 \;; +#X obj 29 61 o-knob 3 1; +#X obj 350 56 o-knob 3 2; +#X obj 639 36 o-knob 3 3; #X connect 0 0 37 0; #X connect 0 0 16 1; #X connect 0 0 21 0; @@ -157,7 +150,6 @@ their state in a preset.; #X connect 4 1 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; -#X connect 6 0 79 0; #X connect 7 0 8 0; #X connect 8 0 15 0; #X connect 11 0 14 0; @@ -171,11 +163,11 @@ their state in a preset.; #X connect 16 0 17 0; #X connect 17 0 22 0; #X connect 17 0 35 0; -#X connect 17 1 60 0; +#X connect 17 1 54 0; #X connect 17 1 36 0; -#X connect 22 0 49 0; -#X connect 22 1 59 0; -#X connect 22 2 58 0; +#X connect 22 0 47 0; +#X connect 22 1 53 0; +#X connect 22 2 52 0; #X connect 23 0 25 0; #X connect 25 0 30 0; #X connect 25 1 29 1; @@ -185,40 +177,30 @@ their state in a preset.; #X connect 29 0 28 0; #X connect 30 0 29 0; #X connect 30 1 24 1; -#X connect 50 0 75 0; -#X connect 50 0 23 0; -#X connect 51 0 22 0; -#X connect 56 0 60 0; -#X connect 59 0 23 1; -#X connect 61 0 77 0; -#X connect 62 0 39 0; -#X connect 63 0 74 0; -#X connect 64 0 40 0; -#X connect 65 0 41 0; -#X connect 66 0 42 0; -#X connect 67 0 43 0; -#X connect 68 0 44 0; -#X connect 69 0 45 0; -#X connect 70 0 46 0; -#X connect 76 0 78 0; -#X connect 78 0 5 0; -#X connect 80 1 12 0; -#X connect 81 1 13 0; -#X connect 82 1 31 0; -#X connect 82 1 2 0; -#X connect 82 1 47 0; +#X connect 48 0 23 0; +#X connect 49 0 22 0; +#X connect 50 0 54 0; +#X connect 53 0 23 1; +#X connect 55 0 72 0; +#X connect 56 0 39 0; +#X connect 57 0 71 0; +#X connect 58 0 70 0; +#X connect 59 0 40 0; +#X connect 60 0 41 0; +#X connect 61 0 42 0; +#X connect 62 0 43 0; +#X connect 63 0 44 0; +#X connect 64 0 45 0; +#X connect 67 0 68 0; +#X connect 68 0 5 0; +#X connect 73 1 13 0; +#X connect 74 1 12 0; +#X connect 75 1 31 0; +#X connect 75 1 2 0; #X restore 971 737 pd presets; -#X obj 201 190 o-knob 1 1 0.02 o1-freq; -#X obj 757 190 o-knob 2 1 0.02 o2-freq; -#X obj 201 511 o-knob 1 4 0.02 o1-lfo-amp; -#X obj 201 381 o-knob 1 3 0.02 o1-lfo-freq; -#X obj 201 291 o-knob 1 2 0.02 o1-amp; -#X obj 757 300 o-knob 2 2 0.02 o2-amp; -#X obj 757 390 o-knob 2 3 0.02 o2-lfo-freq; -#X obj 757 510 o-knob 2 4 0.02 o2-lfo-amp; #X obj 768 706 cnv 15 100 60 empty empty empty 20 12 0 14 -154742 -66577 0; -#N canvas 14 50 430 439 browsing 0; +#N canvas 23 50 503 439 browsing 0; #X obj 49 50 r aux; #X obj 49 72 sel 1; #X msg 49 94 1; @@ -239,9 +221,8 @@ screenLine4 : \;; #X msg 89 283 symbol OSC2; #X obj 89 221 s o-page-selected; #X obj 179 117 s o-load; -#X text 216 222 << RESERVED; -#X text 243 117 << RESERVED; -#X obj 178 54 delay 500; +#X obj 178 54 delay 1000; +#X text 328 164 *clear the screen*; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; @@ -250,7 +231,7 @@ screenLine4 : \;; #X connect 4 0 7 0; #X connect 5 0 10 0; #X connect 6 0 2 0; -#X connect 6 0 21 0; +#X connect 6 0 19 0; #X connect 7 0 3 1; #X connect 9 0 18 0; #X connect 10 0 12 0; @@ -263,16 +244,12 @@ screenLine4 : \;; #X connect 13 0 14 0; #X connect 15 0 14 0; #X connect 16 0 14 0; -#X connect 21 0 9 0; +#X connect 19 0 9 0; #X restore 778 728 pd browsing; #X obj 188 12 cnv 15 956 150 empty empty no_im_not_hiding 20 20 0 12 -154742 -262144 0; -#X obj 191 15 cnv 15 950 144 empty empty O-knob!_(for_Organelle) 20 -20 0 24 -245564 -154742 0; -#X text 690 48 This simple example is a duophonic synth with 2 LFOs. -Use the AUX button to browse through the pages. Click the [pd browsing] -\, [pd presets] and [o-knob] abstractions to understand how they work. -; +#X obj 191 15 cnv 15 950 144 empty empty O-knob!_v2_"Smoking_Pots"_(for_Organelle) +20 20 0 24 -245564 -154742 0; #X text 690 121 Contact : patchstorage.com/author/baptiste or baptiste.chatel@gmail.com ; #X text 224 48 It is a very simple knob/parameter page system and preset @@ -281,7 +258,61 @@ is tied to a knob. When you browse through pages \, the knob may not be in sync with the new corresponding parameter. There are several ways to get it in sync. Instead of making the parameter jump to the knob value \, you need to pick it up by dialing the knob to the location -you left it last time. Don't dial too fast \, though !; +you left it last time.; +#X text 1196 58 argument 1 : PAGE NUMBER - integer: The page number +on which is this parameter.; +#X text 1196 87 argument 2 : KNOB NUMBER - integer: which knob is it +?; +#X text 690 48 This simple example is a duophonic synth with 2 LFOs. +Use the AUX button to browse through the pages.; +#X text 1178 264 Open [pd presets] to see how to handle presets.; +#X text 1177 162 You can send floats to [s UNIQUE NAME] to override +the pot value. Sending a bang to [s o-get-params] will send a name-value +pair to [r o-params] if it exists.; +#X text 1177 226 See [pd browsing] to get a grasp about how to browse +through pages.; +#N canvas 6 50 440 271 RESERVED 0; +#X obj 241 123 s o-get-params; +#X obj 241 104 r o-params; +#X obj 241 66 r o-save; +#X obj 241 85 r o-load; +#X obj 241 142 s o-page-selected; +#X text 19 25 These names are reserved ! Don't use them unless you +know what you're doing !; +#X text 17 73 GOOD USE EXAMPLES \; -save values to preset \; -load +preset \; -receive parameters \; -get parameters \; -select a page +\;; +#X text 16 178 WRONG USE EXAMPLES \; -using one of these for anything +but one of the good examples above \; -naming your child; +#X restore 849 790 pd RESERVED NAMES; +#X text 1176 31 Usage : [o-knob [page number] [knob number] [receive-name]] +, f 92; +#X obj 758 190 o-knob 2 1 o2-freq; +#X text 1178 599 KNOWN ISSUES \; -Due to the [threshold] \, it's sometimes +hard to pick extreme values as 0.99707 in [0:0.99707], f 49; +#X obj 757 510 o-knob 2 4 o2-lfo-amp; +#X obj 201 191 o-knob 1 1 o1-freq; +#X obj 201 291 o-knob 1 2 o1-amp; +#X obj 201 381 o-knob 1 3 o1-lfo-freq; +#X obj 201 511 o-knob 1 4 o1-lfo-amp; +#X obj 758 300 o-knob 2 2 o2-amp; +#X obj 757 390 o-knob 2 3 o2-lfo-freq; +#X obj 1248 387 declare -path ../../o-knob; +#X obj 838 666 declare -path o-knob; +#X text 1175 318 TIP : the o-knob library folder can be placed in /usbdrive +\, at the same level as the Patches folder. If you do so \, you need +to [declare] the o-knob library folder in your patch as follows :; +#X text 1195 111 argument 3 : UNIQUE NAME - symbol. The name of the +parameter you want to save. optional; +#X text 1179 658 TO DO \; -make it a state machine -remove all user +doc from browsing and presets \; -make real help files \; -make browsing +and presets abstractions instead of subpatches \; -install guide; +#X text 1177 431 CHANGELOG for v2 \; -Added [threshold 0.001] to prevent +pot noise \; -Changed pick-up method from "we're close enough" to "we're +past the old value" \, fast dialing is now possible \; -Removed need +for tolerance argument - WHEN UPDATING PLEASE REMOVE ALL TOLERANCE +ARGUMENTS (0.02 typically) OTHERWISE IT WON'T WORK -Moved existing +documentation to example patch, f 49; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 2 0; @@ -313,23 +344,23 @@ you left it last time. Don't dial too fast \, though !; #X connect 31 0 39 0; #X connect 32 0 27 0; #X connect 33 0 41 0; -#X connect 48 0 4 0; -#X connect 48 0 42 0; -#X connect 48 1 24 0; -#X connect 48 1 43 0; -#X connect 49 0 11 0; -#X connect 49 0 44 0; -#X connect 49 1 25 0; -#X connect 49 1 45 0; -#X connect 50 0 7 1; -#X connect 50 1 30 0; -#X connect 51 0 5 0; -#X connect 51 1 29 0; -#X connect 52 0 3 1; -#X connect 52 1 28 0; -#X connect 53 0 10 1; -#X connect 53 1 31 0; -#X connect 54 0 12 0; -#X connect 54 1 32 0; -#X connect 55 0 22 1; -#X connect 55 1 33 0; +#X connect 62 0 11 0; +#X connect 62 0 44 0; +#X connect 62 1 25 0; +#X connect 62 1 45 0; +#X connect 64 0 22 1; +#X connect 64 1 33 0; +#X connect 65 0 4 0; +#X connect 65 0 42 0; +#X connect 65 1 24 0; +#X connect 65 1 43 0; +#X connect 66 0 3 1; +#X connect 66 1 28 0; +#X connect 67 0 5 0; +#X connect 67 1 29 0; +#X connect 68 0 7 1; +#X connect 68 1 30 0; +#X connect 69 0 10 1; +#X connect 69 1 31 0; +#X connect 70 0 12 0; +#X connect 70 1 32 0; diff --git a/o-knob.pd b/o-knob.pd deleted file mode 100644 index c389d96..0000000 --- a/o-knob.pd +++ /dev/null @@ -1,109 +0,0 @@ -#N canvas 388 73 1109 791 10; -#X obj 185 439 spigot; -#X obj 272 417 sel 0 1; -#X obj 249 375 == \$1; -#X obj 185 700 outlet value; -#X text 296 375 is it my page ?; -#X obj 185 339 r knob\$2; -#X obj 395 699 outlet value_for_display; -#X obj 249 397 t f f f; -#X obj 185 636 t f f; -#X obj 185 525 f; -#X obj 185 551 pack f f; -#X msg 185 573 \$2 \$1; -#X obj 185 598 route 1 0; -#X obj 122 445 t f f; -#X text 371 524 if it's my page \, spit actual value first; -#X text 375 601 route [on my page AND value] and [NOT my page AND value] -; -#X text 42 250 baptiste.chatel@gmail.com 2017; -#X obj 122 287 inlet not from a knob; -#X text 290 289 input a value from a preset system; -#X text 366 475 override the stored value if we've moved the knob close -to the stored value; -#X obj 33 612 f; -#X obj 20 298 r \$4; -#X obj 33 634 t b f; -#X obj 33 691 pack s f; -#X text 183 721 hidden value update \, suitable for audio parameters -, f 21; -#X msg 33 720 \; o-params add \$1 \$2; -#X obj 249 340 r o-page-selected; -#X text 61 46 argument 1 : PAGE NUMBER - integer: The page number on -which is this parameter.; -#X text 61 75 argument 2 : KNOB NUMBER - integer: which knob is it -?; -#X text 61 92 argument 3 : TOLERANCE - float: used to determine if -the knob is almost exactly reached its old value. Tolerance of 2-5% -is usually ok for fine pot fiddling \, but to little for power pot -rotation... Turn slowly.; -#X text 61 148 argument 4 : UNIQUE NAME - symbol. Only used to save -and recall presets. Not mandatory.; -#X obj 33 535 r o-get-params; -#X text 41 198 You can send floats to [s UNIQUE NAME] to override the -pot value. Sending a bang to [s o-get-params] will send a name-value -pair to [r o-params] if it exists.; -#X text 41 19 Usage : [o-knob [page number] [knob number] [tolerance -for takeover] [receive-name]], f 92; -#X text 389 721 visible value update \, only for display or for page-only -parameters, f 26; -#N canvas 5 50 450 300 init 0; -#X obj 184 136 spigot; -#X obj 197 81 loadbang; -#X msg 197 103 1; -#X obj 184 158 t f b; -#X msg 238 150 0; -#X obj 184 37 inlet; -#X obj 184 190 outlet; -#X text 184 236 [once]; -#X connect 0 0 3 0; -#X connect 1 0 2 0; -#X connect 2 0 0 1; -#X connect 3 0 6 0; -#X connect 3 1 4 0; -#X connect 4 0 0 1; -#X connect 5 0 0 0; -#X restore 290 451 pd init; -#X text 365 416 if it's my page \, unlock and refresh display if it's -not \, lock; -#X obj 185 476 takeover, f 23; -#X obj 20 347 route float; -#X obj 33 661 symbol_argument \$4; -#X obj 432 339 loadbang; -#X obj 432 361 \$3; -#X text 591 699 Tip : scale and trim precision of this output according -to screen estate and common sense. Who can dial to a precision of 10^-6 -? Full precision output is for the left one !; -#X connect 0 0 37 0; -#X connect 1 0 37 1; -#X connect 1 1 9 0; -#X connect 2 0 7 0; -#X connect 5 0 0 0; -#X connect 5 0 35 0; -#X connect 7 0 0 1; -#X connect 7 1 1 0; -#X connect 7 2 10 1; -#X connect 8 0 3 0; -#X connect 8 1 6 0; -#X connect 9 0 10 0; -#X connect 9 0 20 1; -#X connect 10 0 11 0; -#X connect 11 0 12 0; -#X connect 12 0 8 0; -#X connect 12 1 3 0; -#X connect 13 0 9 0; -#X connect 13 1 37 2; -#X connect 17 0 13 0; -#X connect 20 0 22 0; -#X connect 21 0 38 0; -#X connect 22 0 39 0; -#X connect 22 1 23 1; -#X connect 23 0 25 0; -#X connect 26 0 2 0; -#X connect 31 0 20 0; -#X connect 35 0 37 2; -#X connect 37 0 9 0; -#X connect 38 0 13 0; -#X connect 39 0 23 0; -#X connect 40 0 41 0; -#X connect 41 0 37 3; diff --git a/o-knob/o-knob.pd b/o-knob/o-knob.pd new file mode 100644 index 0000000..d6e2db8 --- /dev/null +++ b/o-knob/o-knob.pd @@ -0,0 +1,104 @@ +#N canvas 557 102 1095 702 10; +#X obj 453 178 spigot; +#X obj 537 177 sel 0 1; +#X obj 517 114 == \$1; +#X obj 453 509 outlet value; +#X text 564 114 is it my page ?; +#X obj 453 49 r knob\$2; +#X obj 663 508 outlet value_for_display; +#X obj 453 445 t f f; +#X obj 453 334 f; +#X obj 453 360 pack f f; +#X msg 453 382 \$2 \$1; +#X obj 453 407 route 1 0; +#X obj 390 184 t f f; +#X text 639 333 if it's my page \, spit actual value first; +#X text 643 410 route [on my page AND value] and [NOT my page AND value] +; +#X obj 390 30 inlet not from a knob; +#X text 558 28 input a value from a preset system; +#X obj 301 421 f; +#X obj 301 443 t b f; +#X obj 301 500 pack s f; +#X text 451 530 hidden value update \, suitable for audio parameters +, f 21; +#X msg 301 529 \; o-params add \$1 \$2; +#X obj 517 87 r o-page-selected; +#X obj 301 344 r o-get-params; +#X text 657 530 visible value update \, only for display or for page-only +parameters, f 26; +#X text 598 137 if it's my page \, unlock and refresh display if it's +not \, lock; +#X obj 288 65 route float; +#X obj 39 89 loadbang; +#X obj 288 37 r \$3; +#X obj 301 470 symbol_argument \$3; +#X obj 39 111 symbol_argument \$3 \$0-o; +#X obj 39 134 sel \$0-o; +#X obj 404 129 once; +#X obj 405 106 spigot; +#X msg 38 186 1; +#X text 23 154 if no \$3 is given \, then init to knob value to a known +unique one, f 32; +#X obj 453 285 takeover, f 23; +#X text 634 284 override the stored value if we've moved the knob past +to the stored value; +#X text 6 579 [o-knob] v2 - o-knob library - baptiste.chatel@gmail.com +; +#X obj 453 68 threshold 0.001; +#X obj 517 136 t f f f b; +#X obj 145 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 537 197 0, f 2; +#X obj 37 359 \$1; +#X obj 69 359 \$2; +#X msg 37 425 o-knob \$1 \$2 won't be saved; +#X obj 37 447 print; +#X obj 37 326 t b b; +#X obj 37 390 pack f f; +#X connect 0 0 36 0; +#X connect 1 0 42 0; +#X connect 1 1 8 0; +#X connect 2 0 40 0; +#X connect 5 0 33 0; +#X connect 5 0 39 0; +#X connect 7 0 3 0; +#X connect 7 1 6 0; +#X connect 8 0 9 0; +#X connect 8 0 17 1; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 7 0; +#X connect 11 1 3 0; +#X connect 12 0 8 0; +#X connect 12 1 36 2; +#X connect 15 0 12 0; +#X connect 17 0 18 0; +#X connect 18 0 29 0; +#X connect 18 1 19 1; +#X connect 19 0 21 0; +#X connect 22 0 2 0; +#X connect 23 0 17 0; +#X connect 26 0 12 0; +#X connect 27 0 30 0; +#X connect 28 0 26 0; +#X connect 29 0 19 0; +#X connect 30 0 31 0; +#X connect 31 0 34 0; +#X connect 32 0 12 0; +#X connect 33 0 32 0; +#X connect 34 0 33 1; +#X connect 34 0 47 0; +#X connect 36 0 8 0; +#X connect 39 0 0 0; +#X connect 40 0 0 1; +#X connect 40 1 1 0; +#X connect 40 2 9 1; +#X connect 41 0 30 0; +#X connect 42 0 36 1; +#X connect 43 0 48 0; +#X connect 44 0 48 1; +#X connect 45 0 46 0; +#X connect 47 0 43 0; +#X connect 47 1 44 0; +#X connect 48 0 45 0; diff --git a/o-knob/once.pd b/o-knob/once.pd new file mode 100644 index 0000000..a10b814 --- /dev/null +++ b/o-knob/once.pd @@ -0,0 +1,17 @@ +#N canvas 4 50 450 300 10; +#X obj 116 49 inlet input; +#X obj 257 48 inlet reset; +#X obj 116 190 outlet; +#X obj 116 91 spigot; +#X obj 116 116 t a b; +#X msg 174 106 0; +#X msg 257 74 1; +#X obj 321 82 loadbang; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 5 0; +#X connect 5 0 3 1; +#X connect 6 0 3 1; +#X connect 7 0 6 0; diff --git a/symbol_argument.pd b/o-knob/symbol_argument.pd similarity index 100% rename from symbol_argument.pd rename to o-knob/symbol_argument.pd diff --git a/o-knob/takeover.pd b/o-knob/takeover.pd new file mode 100644 index 0000000..5449e3a --- /dev/null +++ b/o-knob/takeover.pd @@ -0,0 +1,99 @@ +#N canvas 862 50 1020 956 10; +#X obj 99 236 r \$0-lock; +#X obj 85 77 loadbang; +#X obj 497 865 s \$0-lock; +#X obj 60 440 outlet; +#X obj 60 46 inlet from knob; +#X obj 179 46 inlet lock; +#X obj 311 44 inlet from elsewhere; +#X obj 60 347 spigot; +#X msg 497 837 1; +#X obj 99 282 t f f; +#X obj 179 127 s \$0-lock; +#X msg 85 99 0; +#X obj 445 472 once; +#X obj 413 370 spigot; +#X obj 413 392 t f f; +#X floatatom 177 440 8 0 0 1 backup_the_last_received_value_when_we're_locked +- -, f 8; +#X floatatom 413 596 5 0 0 1 then_update_it - -, f 5; +#X floatatom 445 494 5 0 0 1 initialize_the_comparator - -, f 5; +#X obj 497 706 >=; +#X obj 497 759 spigot; +#X obj 497 731 change; +#X msg 603 725 0; +#X msg 446 694 1; +#X obj 497 799 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 610 694 loadbang; +#X obj 131 301 == 0; +#X obj 131 320 t f b f; +#X obj 445 565 t b f b b, f 23; +#X text 418 232 Just before we lock \, backup the target value \, init +the once and open the spigot for next pickup. then the first next value +from the pot inits the comparator. next values are compared against +target value \, and we watch for a change from the comparator. When +a change happens \, we unlock.; +#X obj 550 616 f; +#X obj 177 406 f; +#X obj 60 141 t f f f f; +#X obj 177 378 sel 1; +#X obj 366 152 s \$0-lock; +#X msg 366 124 0; +#X obj 311 188 once; +#X text 346 190 init non-saved knobs; +#X text 573 848 baptiste.chatel@gmail.com; +#X text 578 616 target value; +#X obj 99 258 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X floatatom 550 640 8 0 0 0 - - -, f 8; +#X text 670 642 be sure we can always be inferior to lowest value and +superior to highest value, f 36; +#X obj 550 665 clip 0.001 0.997; +#X obj 311 92 t f f b; +#X connect 0 0 39 0; +#X connect 1 0 11 0; +#X connect 4 0 31 0; +#X connect 5 0 10 0; +#X connect 6 0 43 0; +#X connect 7 0 3 0; +#X connect 8 0 2 0; +#X connect 9 0 7 1; +#X connect 9 1 25 0; +#X connect 11 0 10 0; +#X connect 12 0 17 0; +#X connect 13 0 14 0; +#X connect 14 0 16 0; +#X connect 14 1 12 0; +#X connect 15 0 29 0; +#X connect 16 0 18 0; +#X connect 17 0 27 0; +#X connect 18 0 20 0; +#X connect 19 0 23 0; +#X connect 20 0 19 0; +#X connect 21 0 19 1; +#X connect 22 0 19 1; +#X connect 23 0 8 0; +#X connect 24 0 21 0; +#X connect 25 0 26 0; +#X connect 26 0 13 1; +#X connect 26 1 12 1; +#X connect 26 2 32 0; +#X connect 27 0 22 0; +#X connect 27 1 18 0; +#X connect 27 2 29 0; +#X connect 27 3 21 0; +#X connect 29 0 40 0; +#X connect 30 0 15 0; +#X connect 31 0 7 0; +#X connect 31 2 13 0; +#X connect 31 3 30 1; +#X connect 32 0 30 0; +#X connect 34 0 33 0; +#X connect 35 0 30 1; +#X connect 39 0 9 0; +#X connect 40 0 42 0; +#X connect 42 0 18 1; +#X connect 43 0 35 0; +#X connect 43 1 29 0; +#X connect 43 2 34 0; diff --git a/o-knob/threshold.pd b/o-knob/threshold.pd new file mode 100644 index 0000000..ff9be00 --- /dev/null +++ b/o-knob/threshold.pd @@ -0,0 +1,23 @@ +#N canvas 5 50 450 300 10; +#X obj 55 21 inlet; +#X obj 162 104 inlet; +#X text 204 105 valeur seuil; +#X obj 184 291 outlet; +#X text 96 22 data stream; +#X obj 87 203 -; +#X obj 103 174 f; +#X obj 87 255 >= \$1; +#X obj 55 84 t f f; +#X obj 55 290 spigot; +#X obj 87 229 abs; +#X text 234 180 puremapping/threshold; +#X connect 0 0 8 0; +#X connect 1 0 7 1; +#X connect 5 0 10 0; +#X connect 6 0 3 0; +#X connect 6 0 5 1; +#X connect 7 0 9 1; +#X connect 8 0 9 0; +#X connect 8 1 5 0; +#X connect 9 0 6 0; +#X connect 10 0 7 0; diff --git a/takeover.pd b/takeover.pd deleted file mode 100644 index ed3fe93..0000000 --- a/takeover.pd +++ /dev/null @@ -1,66 +0,0 @@ -#N canvas 848 163 980 668 10; -#X obj 60 263 spigot; -#X obj 188 265 spigot; -#X obj 195 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; -#X obj 195 192 - 1; -#X obj 195 216 abs; -#X obj 60 158 t f f; -#X text 269 199 if the knob is locked \, route to check for unlock -; -#X obj 188 290 t f b; -#X obj 195 119 r \$0-lock; -#X msg 179 94 1; -#X obj 278 109 loadbang; -#X msg 258 141 0; -#X obj 188 361 -; -#X obj 188 388 abs; -#X obj 188 442 sel 1; -#X msg 188 469 0; -#X obj 188 496 s \$0-lock; -#X obj 179 67 bang; -#X obj 220 330 f; -#X obj 60 285 t f f; -#X obj 195 168 t f f; -#X obj 60 541 outlet; -#X obj 60 46 inlet from knob; -#X obj 179 46 inlet lock; -#X text 253 329 snapshot of knob before it was locked or value from -preset; -#X obj 307 70 t f b; -#X obj 307 44 inlet from elsewhere; -#X text 193 556 based on Critter & Guittari's [override]; -#X text 195 587 modified by Baptiste Chatel : baptiste.chatel@gmail.com -; -#X obj 188 415 <; -#X obj 479 43 inlet tolerance; -#X connect 0 0 19 0; -#X connect 1 0 7 0; -#X connect 2 0 20 0; -#X connect 3 0 4 0; -#X connect 4 0 0 1; -#X connect 5 0 0 0; -#X connect 5 1 1 0; -#X connect 7 0 12 0; -#X connect 7 1 18 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 10 0 11 0; -#X connect 11 0 2 0; -#X connect 12 0 13 0; -#X connect 13 0 29 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 17 0 9 0; -#X connect 18 0 12 1; -#X connect 19 0 21 0; -#X connect 19 1 18 1; -#X connect 20 0 3 0; -#X connect 20 1 1 1; -#X connect 22 0 5 0; -#X connect 23 0 17 0; -#X connect 25 0 18 1; -#X connect 25 1 9 0; -#X connect 26 0 25 0; -#X connect 29 0 14 0; -#X connect 30 0 29 1;