Commit 04946030 authored by Roman Haefeli's avatar Roman Haefeli
Browse files

improve selection logic:

 * make a range selection only when clicking on empty space
 * allow to add multiple ranges
 * toggle selection of single notes when shift-clicking notes
parent 10d602a0
......@@ -3338,15 +3338,15 @@ certain period.;
#X connect 12 2 6 0;
#X connect 12 3 9 1;
#X restore 16 141 pd note.edit.modes;
#N canvas 436 166 420 655 note.select 0;
#N canvas 436 166 414 708 note.select 0;
#X obj 19 64 r \$0.horizgrid.send;
#X obj 19 127 route click;
#X obj 19 150 get \$0.horizgrid y;
#X obj 64 195 route click;
#X obj 64 172 r \$0.vertgrid.send;
#X obj 19 243 pack f f;
#X obj 64 218 get \$0.vertgrid x;
#X msg 19 266 \$2 \$1;
#X obj 64 235 route click;
#X obj 64 212 r \$0.vertgrid.send;
#X obj 19 283 pack f f;
#X obj 64 258 get \$0.vertgrid x;
#X msg 19 306 \$2 \$1;
#N canvas 0 99 405 189 x->step 0;
#X obj 40 63 s \$0.convert.x->step.get;
#X obj 40 85 r \$0.convert.x->step;
......@@ -3359,7 +3359,7 @@ certain period.;
#X connect 3 0 4 0;
#X connect 3 1 0 0;
#X connect 4 0 5 0;
#X restore 19 312 pd x->step;
#X restore 19 352 pd x->step;
#N canvas 0 99 405 189 y->pitch 0;
#X obj 13 14 inlet;
#X obj 13 37 t b a;
......@@ -3372,37 +3372,64 @@ certain period.;
#X connect 1 1 4 0;
#X connect 2 0 3 0;
#X connect 5 0 2 1;
#X restore 94 312 pd y->pitch;
#X obj 19 288 unpack f f, f 13;
#X obj 19 342 pack f f, f 13;
#X restore 94 352 pd y->pitch;
#X obj 19 328 unpack f f, f 13;
#X obj 19 382 pack f f, f 13;
#X obj 19 97 spigot 1;
#X obj 97 88 r \$0.mod.key;
#X obj 161 343 r \$0.mod.key;
#X obj 161 366 == 2;
#X obj 161 389 change -1;
#X obj 19 365 spigot;
#X obj 161 415 sel 0;
#X obj 19 388 t b a;
#X obj 19 424 f;
#X obj 19 447 t a a;
#X obj 66 440 + 1;
#X msg 161 438 0;
#X obj 19 476 list append;
#X obj 19 505 route 1 0;
#X obj 69 537 unpack;
#X obj 19 576 pack f f f f;
#X obj 19 622 s \$0.global.receive;
#X msg 19 599 note select \$3 \$4 \$1 \$2;
#X text 142 624 <- we use the selection only locally;
#X text 182 599 [step \, pitch] \, [step \, pitch];
#X obj 161 383 r \$0.mod.key;
#X obj 161 406 == 2;
#X obj 161 429 change -1;
#X obj 19 405 spigot;
#X obj 161 455 sel 0;
#X obj 19 428 t b a;
#X obj 19 464 f;
#X obj 19 487 t a a;
#X obj 66 480 + 1;
#X msg 161 478 0;
#X obj 19 516 list append;
#X obj 19 545 route 1 0;
#X obj 69 577 unpack;
#X obj 19 616 pack f f f f;
#X obj 19 662 s \$0.global.receive;
#X msg 19 639 note select \$3 \$4 \$1 \$2;
#X text 142 664 <- we use the selection only locally;
#X text 182 639 [step \, pitch] \, [step \, pitch];
#X text 23 9 A selection range is defined by drawing a virtual rectangle
by clicking on two coordinates on the grid with Mod-key pressed.;
#X obj 141 111 r \$0.select.range;
#X obj 97 111 == 1;
#X obj 205 366 r \$0.select.range;
#X obj 205 406 r \$0.select.range;
#N canvas 0 99 397 249 filter.click.on.notes 0;
#X obj 37 37 inlet;
#X obj 37 210 outlet;
#X obj 203 29 r \$0.note.send;
#X obj 203 52 route click;
#X obj 203 75 b;
#X obj 37 60 t b a b, f 16;
#X obj 37 105 del 0;
#X obj 37 128 f;
#X obj 37 151 sel 1;
#X msg 203 98 0;
#X msg 130 92 1;
#X obj 37 174 f, f 8;
#X connect 0 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 9 0;
#X connect 5 0 6 0;
#X connect 5 1 11 1;
#X connect 5 2 10 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 11 0;
#X connect 9 0 7 1;
#X connect 10 0 7 1;
#X connect 11 0 1 0;
#X restore 19 173 pd filter.click.on.notes;
#X connect 0 0 12 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 2 0 36 0;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 5 0 7 0;
......@@ -3438,6 +3465,7 @@ by clicking on two coordinates on the grid with Mod-key pressed.;
#X connect 33 0 34 1;
#X connect 34 0 12 1;
#X connect 35 0 15 1;
#X connect 36 0 5 0;
#X restore 16 166 pd note.select;
#X text 15 17 GENERATE EVENTS;
#N canvas 336 294 403 183 note.unselect 0;
......@@ -4372,7 +4400,7 @@ by clicking on two coordinates on the grid with Mod-key pressed.;
#X connect 19 0 10 1;
#X connect 20 0 13 0;
#X restore 19 110 pd note.change.gid;
#N canvas 0 495 347 307 note.select 0;
#N canvas 144 200 347 307 note.select 0;
#N canvas 73 99 380 620 get.selected.ids 0;
#X obj 39 309 tabread \$0.step;
#X msg 39 90 1000;
......@@ -4488,7 +4516,6 @@ by clicking on two coordinates on the grid with Mod-key pressed.;
#X connect 7 0 8 0;
#X connect 9 0 10 0;
#X connect 9 1 0 0;
#X connect 9 2 7 0;
#X connect 10 0 6 0;
#X restore 19 156 pd note.select;
#N canvas 1 99 452 346 dump 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment