updates for lines release
This commit is contained in:
parent
1bfa2c27aa
commit
997f76b6d2
94
grid-help.pd
94
grid-help.pd
|
@ -1,4 +1,4 @@
|
|||
#N canvas 416 174 912 698 12;
|
||||
#N canvas 476 252 912 698 12;
|
||||
#X obj 18 17 grid;
|
||||
#X text 60 16 - simple I/O for the monome grid;
|
||||
#X text 18 43 The grid object connects to a running instance of serialosc
|
||||
|
@ -10,32 +10,84 @@ grid controller.;
|
|||
#X msg 118 148 set 0 0 0;
|
||||
#X text 76 101 the connect message connects to the grid;
|
||||
#X text 109 123 the disconnect message disconnects from the grid;
|
||||
#X text 192 147 the set message sets a single LED at the position x
|
||||
\, y in the first two arguments to either on (1 in the last argument)
|
||||
or off (0 in the last argument);
|
||||
#X floatatom 19 464 5 0 0 0 - - -;
|
||||
#X floatatom 61 465 5 0 0 0 - - -;
|
||||
#X floatatom 103 466 5 0 0 0 - - -;
|
||||
#X text 19 489 the grid object's outlets are the x \, y \, and state
|
||||
(press or release as 1 or 0) of grid button presses.;
|
||||
#X msg 114 214 all 1;
|
||||
#X msg 159 214 all 0;
|
||||
#X text 203 208 the all message sets all the LEDs on or off;
|
||||
#X msg 45 148 set 0 0 1;
|
||||
#X msg 161 275 lset 0 0 5;
|
||||
#X obj 19 462 unpack f f f;
|
||||
#X floatatom 19 505 5 0 0 0 - - -;
|
||||
#X floatatom 59 505 5 0 0 0 - - -;
|
||||
#X floatatom 100 505 5 0 0 0 - - -;
|
||||
#N canvas 699 297 690 443 all-messages 0;
|
||||
#X text 4 3 the [grid] abstraction supports almost all the messages
|
||||
that the grid supports. Here they all are in pd-form:;
|
||||
#X msg 8 53 connect;
|
||||
#X msg 8 78 disconnect;
|
||||
#X msg 8 103 set x y s;
|
||||
#X msg 8 128 all s;
|
||||
#X msg 8 178 col x y b;
|
||||
#X msg 8 153 row x y b;
|
||||
#X msg 8 203 map x y b1 b2 [...] b8;
|
||||
#X msg 8 238 lset x y l;
|
||||
#X msg 8 263 lall l;
|
||||
#X msg 8 288 lrow x y l1 l2 [...] l8;
|
||||
#X msg 8 313 lcol x y l1 l2 [...] l8;
|
||||
#X msg 8 338 lmap x y l1 l2 [...] l64;
|
||||
#X text 66 52 connects to a grid;
|
||||
#X text 91 77 disconnects from a grid;
|
||||
#X text 80 102 sets the light at x \, y to state s (0=off \, 1=on)
|
||||
;
|
||||
#X text 52 127 sets all lights to state s;
|
||||
#X text 82 152 sets a row with the offset x \, y to the bitmask b;
|
||||
#X text 82 177 sets a column with the offset x \, y to the bitmask
|
||||
b;
|
||||
#X text 174 202 sets a quad with the offset x \, y to the bitmask specified
|
||||
by b1 through b8 (which all must be specified);
|
||||
#X text 89 237 sets the light at x \, y to brightness level l (0-15)
|
||||
;
|
||||
#X text 58 262 sets all lights to brightness level l;
|
||||
#X text 180 287 sets a row at the offset x \, y to the levels l1 to
|
||||
l8;
|
||||
#X text 184 312 sets a column at the offset x \, y to the levels l1
|
||||
to l8;
|
||||
#X text 189 337 sets a quad at the offset x \, y to the levels l1 to
|
||||
l64;
|
||||
#X text 6 361 these mostly directly map to the grid's osc messages
|
||||
\, see https://monome.org/docs/serialosc/osc/ for more docs;
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 2 0 3 0;
|
||||
#X connect 3 0 4 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 7 0;
|
||||
#X connect 6 0 5 0;
|
||||
#X connect 7 0 8 0;
|
||||
#X connect 8 0 9 0;
|
||||
#X connect 9 0 10 0;
|
||||
#X connect 10 0 11 0;
|
||||
#X connect 11 0 12 0;
|
||||
#X restore 588 305 pd all-messages;
|
||||
#X text 191 147 the set message sets a single LED at the position x
|
||||
\, y (the first two arguments) to either on (1 in the last argument)
|
||||
or off (0 in the last argument);
|
||||
#X text 245 252 messages prefixed with "l" act like their non-l counterparts
|
||||
\, but set the brightness level (0-15) rather than just on or off;
|
||||
#X text 163 308 there are more messages than this \, with one for each
|
||||
message "to device" in the monome osc docs: https://monome.org/docs/serialosc/osc/
|
||||
the "l" prefixed versions correspond to those with brightness \, others
|
||||
not;
|
||||
#X connect 3 0 10 0;
|
||||
#X connect 3 1 11 0;
|
||||
#X connect 3 2 12 0;
|
||||
\, but set the brightness level (0-15) rather than just on or off.
|
||||
;
|
||||
#X text 109 462 the grid object's outlet is a list of state \, x \,
|
||||
and y \, every time a button is pressed;
|
||||
#X text 16 530 KNOWN BUGS: unusual behavior with multiple grid objects
|
||||
in a patch. Can only use the first serialosc device. May only work
|
||||
on my machine.;
|
||||
#X text 245 306 there are more messages than this supported \, see
|
||||
;
|
||||
#X connect 3 0 14 0;
|
||||
#X connect 4 0 3 0;
|
||||
#X connect 5 0 3 0;
|
||||
#X connect 6 0 3 0;
|
||||
#X connect 14 0 3 0;
|
||||
#X connect 15 0 3 0;
|
||||
#X connect 17 0 3 0;
|
||||
#X connect 18 0 3 0;
|
||||
#X connect 9 0 3 0;
|
||||
#X connect 10 0 3 0;
|
||||
#X connect 12 0 3 0;
|
||||
#X connect 13 0 3 0;
|
||||
#X connect 14 0 15 0;
|
||||
#X connect 14 1 16 0;
|
||||
#X connect 14 2 17 0;
|
||||
|
|
70
grid.pd
70
grid.pd
|
@ -1,4 +1,4 @@
|
|||
#N canvas 116 89 1518 875 12;
|
||||
#N canvas 330 131 1518 875 12;
|
||||
#X obj 435 446 netsend -b -u;
|
||||
#X msg 743 296 listen 9999;
|
||||
#X obj 743 365 oscparse;
|
||||
|
@ -22,9 +22,6 @@
|
|||
#X msg 197 400 connect localhost \$1;
|
||||
#X obj 655 637 unpack s s s f f f;
|
||||
#X text 798 640 unpack for x \, y \, and state;
|
||||
#X obj 684 698 outlet x;
|
||||
#X obj 753 698 outlet y;
|
||||
#X obj 824 698 outlet state;
|
||||
#X obj 551 37 inlet;
|
||||
#X obj 633 159 send disconnect;
|
||||
#X msg 633 132 disconnect;
|
||||
|
@ -202,6 +199,9 @@ message \, 4 parse contents of message \, 5 disconnect from serialosc.
|
|||
#X restore 804 156 pd create-osc-messages;
|
||||
#X msg 720 129 all 0;
|
||||
#X obj 633 102 t b b;
|
||||
#X obj 720 720 outlet;
|
||||
#X obj 720 670 pack f f f;
|
||||
#X msg 720 696 \$3 \$1 \$2;
|
||||
#X connect 1 0 3 0;
|
||||
#X connect 2 0 7 0;
|
||||
#X connect 3 0 2 0;
|
||||
|
@ -210,7 +210,7 @@ message \, 4 parse contents of message \, 5 disconnect from serialosc.
|
|||
#X connect 6 0 0 0;
|
||||
#X connect 7 1 9 0;
|
||||
#X connect 8 0 0 0;
|
||||
#X connect 9 0 35 0;
|
||||
#X connect 9 0 32 0;
|
||||
#X connect 10 0 11 0;
|
||||
#X connect 11 0 12 0;
|
||||
#X connect 12 0 21 0;
|
||||
|
@ -221,33 +221,35 @@ message \, 4 parse contents of message \, 5 disconnect from serialosc.
|
|||
#X connect 19 3 6 0;
|
||||
#X connect 19 4 1 0;
|
||||
#X connect 20 0 18 0;
|
||||
#X connect 21 3 23 0;
|
||||
#X connect 21 4 24 0;
|
||||
#X connect 21 5 25 0;
|
||||
#X connect 26 0 44 0;
|
||||
#X connect 28 0 27 0;
|
||||
#X connect 29 0 43 0;
|
||||
#X connect 29 1 28 0;
|
||||
#X connect 30 0 0 0;
|
||||
#X connect 31 0 32 0;
|
||||
#X connect 32 0 3 0;
|
||||
#X connect 33 0 34 0;
|
||||
#X connect 34 0 11 0;
|
||||
#X connect 35 0 10 0;
|
||||
#X connect 35 1 40 0;
|
||||
#X connect 36 0 18 0;
|
||||
#X connect 38 0 41 0;
|
||||
#X connect 39 0 48 0;
|
||||
#X connect 40 0 38 0;
|
||||
#X connect 41 1 39 0;
|
||||
#X connect 43 0 19 0;
|
||||
#X connect 44 0 29 0;
|
||||
#X connect 44 1 52 0;
|
||||
#X connect 44 2 50 0;
|
||||
#X connect 46 0 17 0;
|
||||
#X connect 48 0 49 0;
|
||||
#X connect 50 0 47 0;
|
||||
#X connect 51 0 50 0;
|
||||
#X connect 52 0 28 0;
|
||||
#X connect 52 1 51 0;
|
||||
#X connect 21 3 51 0;
|
||||
#X connect 21 4 51 1;
|
||||
#X connect 21 5 51 2;
|
||||
#X connect 23 0 41 0;
|
||||
#X connect 25 0 24 0;
|
||||
#X connect 26 0 40 0;
|
||||
#X connect 26 1 25 0;
|
||||
#X connect 27 0 0 0;
|
||||
#X connect 28 0 29 0;
|
||||
#X connect 29 0 3 0;
|
||||
#X connect 30 0 31 0;
|
||||
#X connect 31 0 11 0;
|
||||
#X connect 32 0 10 0;
|
||||
#X connect 32 1 37 0;
|
||||
#X connect 33 0 18 0;
|
||||
#X connect 35 0 38 0;
|
||||
#X connect 36 0 45 0;
|
||||
#X connect 37 0 35 0;
|
||||
#X connect 38 1 36 0;
|
||||
#X connect 40 0 19 0;
|
||||
#X connect 41 0 26 0;
|
||||
#X connect 41 1 49 0;
|
||||
#X connect 41 2 47 0;
|
||||
#X connect 43 0 17 0;
|
||||
#X connect 45 0 46 0;
|
||||
#X connect 47 0 44 0;
|
||||
#X connect 48 0 47 0;
|
||||
#X connect 49 0 25 0;
|
||||
#X connect 49 1 48 0;
|
||||
#X connect 51 0 52 0;
|
||||
#X connect 52 0 50 0;
|
||||
#X coords 0 875 1 874 85 60 0;
|
||||
|
|
103
gridkbd.pd
103
gridkbd.pd
|
@ -1,16 +1,7 @@
|
|||
#N canvas 313 218 1296 948 12;
|
||||
#N canvas 633 108 1296 948 12;
|
||||
#X obj 547 228 grid;
|
||||
#X obj 209 279 pack f f f;
|
||||
#X msg 209 304 set \$1 \$2 \$3;
|
||||
#X obj 241 368 s grid;
|
||||
#X obj 547 170 r grid;
|
||||
#X obj 209 242 r x;
|
||||
#X obj 242 242 r y;
|
||||
#X obj 276 241 r s;
|
||||
#X obj 520 279 s x;
|
||||
#X obj 559 280 s y;
|
||||
#X obj 220 492 r s;
|
||||
#X obj 587 280 s s;
|
||||
#X text 464 469 when a key is pressed \, get the column \, subtract
|
||||
7 and abs (so that the columns run bottom-top) \, multiply by 5 (to
|
||||
create stacked 4ths) and add 40 (for a root note of E like a bass).
|
||||
|
@ -20,7 +11,7 @@ Then add the x position to that as a semitone.;
|
|||
#X obj 364 304 + 1;
|
||||
#X obj 388 330 div 16;
|
||||
#X obj 364 199 t f b;
|
||||
#X msg 500 171 all 0;
|
||||
#X msg 500 170 all 0;
|
||||
#X msg 408 222 -1;
|
||||
#X obj 330 331 mod 16;
|
||||
#X obj 380 495 mod 12;
|
||||
|
@ -52,9 +43,7 @@ Then add the x position to that as a semitone.;
|
|||
#X connect 5 0 4 0;
|
||||
#X connect 7 0 3 0;
|
||||
#X connect 10 0 5 0;
|
||||
#X restore 210 469 pd get-note;
|
||||
#X obj 210 429 r x;
|
||||
#X obj 284 429 r y;
|
||||
#X restore 210 506 pd get-note;
|
||||
#N canvas 132 141 631 431 get-note 0;
|
||||
#X text 51 26 for an x and y value \, gets the note at that position
|
||||
;
|
||||
|
@ -79,47 +68,51 @@ Then add the x position to that as a semitone.;
|
|||
#X obj 348 377 pack f f;
|
||||
#X obj 348 402 t a a;
|
||||
#X obj 380 433 unpack f f;
|
||||
#X text 638 264 keyboard on the grid using the 4th string layout (like
|
||||
#X text 466 118 keyboard on the grid using the 4th string layout (like
|
||||
a bass guitar).;
|
||||
#X obj 467 208 inlet;
|
||||
#X obj 210 553 outlet pitch;
|
||||
#X obj 220 527 outlet velocity;
|
||||
#X connect 0 0 8 0;
|
||||
#X connect 0 1 9 0;
|
||||
#X connect 0 2 11 0;
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 2 0 28 0;
|
||||
#X connect 4 0 0 0;
|
||||
#X connect 5 0 1 0;
|
||||
#X connect 6 0 1 1;
|
||||
#X connect 7 0 1 2;
|
||||
#X connect 10 0 40 0;
|
||||
#X connect 13 0 14 0;
|
||||
#X connect 14 0 15 0;
|
||||
#X connect 15 0 14 1;
|
||||
#X connect 15 0 16 0;
|
||||
#X connect 15 0 20 0;
|
||||
#X connect 16 0 34 1;
|
||||
#X connect 17 0 13 0;
|
||||
#X connect 17 1 19 0;
|
||||
#X connect 18 0 0 0;
|
||||
#X connect 19 0 14 0;
|
||||
#X connect 20 0 34 0;
|
||||
#X connect 21 0 22 0;
|
||||
#X connect 22 0 23 1;
|
||||
#X connect 23 0 27 0;
|
||||
#X connect 26 0 29 0;
|
||||
#X connect 27 0 24 0;
|
||||
#X connect 28 0 25 0;
|
||||
#X connect 28 1 3 0;
|
||||
#X connect 29 0 17 0;
|
||||
#X connect 30 0 39 0;
|
||||
#X connect 31 0 30 0;
|
||||
#X connect 32 0 30 1;
|
||||
#X connect 33 0 21 0;
|
||||
#X obj 185 594 outlet pitch;
|
||||
#X obj 210 571 outlet velocity;
|
||||
#X obj 547 253 s grid-out;
|
||||
#X obj 209 265 r grid-out;
|
||||
#X msg 209 300 set \$2 \$3 \$1;
|
||||
#X obj 203 443 r grid-out;
|
||||
#X obj 203 468 unpack f f f;
|
||||
#X obj 185 541 swap;
|
||||
#X connect 0 0 30 0;
|
||||
#X connect 2 0 0 0;
|
||||
#X connect 4 0 5 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 5 1;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 6 0 11 0;
|
||||
#X connect 7 0 23 1;
|
||||
#X connect 8 0 4 0;
|
||||
#X connect 8 1 10 0;
|
||||
#X connect 9 0 0 0;
|
||||
#X connect 10 0 5 0;
|
||||
#X connect 11 0 23 0;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 13 0 14 1;
|
||||
#X connect 14 0 18 0;
|
||||
#X connect 17 0 20 0;
|
||||
#X connect 18 0 15 0;
|
||||
#X connect 19 0 16 0;
|
||||
#X connect 19 1 1 0;
|
||||
#X connect 20 0 8 0;
|
||||
#X connect 21 0 35 1;
|
||||
#X connect 22 0 12 0;
|
||||
#X connect 23 0 24 0;
|
||||
#X connect 24 0 14 0;
|
||||
#X connect 24 1 25 0;
|
||||
#X connect 25 0 22 0;
|
||||
#X connect 25 1 22 1;
|
||||
#X connect 27 0 0 0;
|
||||
#X connect 31 0 32 0;
|
||||
#X connect 32 0 19 0;
|
||||
#X connect 33 0 34 0;
|
||||
#X connect 34 0 35 0;
|
||||
#X connect 35 0 23 0;
|
||||
#X connect 35 1 36 0;
|
||||
#X connect 36 0 33 0;
|
||||
#X connect 36 1 33 1;
|
||||
#X connect 38 0 0 0;
|
||||
#X connect 34 1 21 0;
|
||||
#X connect 34 2 21 1;
|
||||
#X connect 35 0 28 0;
|
||||
#X connect 35 1 29 0;
|
||||
|
|
Loading…
Reference in New Issue