Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Roman Haefeli
unpunch
Commits
d4c8569a
Commit
d4c8569a
authored
Sep 07, 2019
by
Roman Haefeli
Browse files
put key command defintions into single subpatch; implement 'delete selection'
parent
6f155f25
Changes
1
Hide whitespace changes
Inline
Side-by-side
unpunch.pd
View file @
d4c8569a
...
...
@@ -520,7 +520,7 @@ n float nvis;
#X connect 21 0 5 1;
#X connect 22 0 9 0;
#X restore 491 186 pd create_vertline;
#N canvas 35 99 741 470 note-template
1
;
#N canvas 35 99 741 470 note-template
0
;
#X obj 121 282 min 127;
#X obj 51 166 route click change;
#X obj 121 307 t a a;
...
...
@@ -2867,7 +2867,7 @@ num float nvis;
#X connect 18 0 1 0;
#X connect 18 1 16 0;
#X restore 16 67 pd note.change.duration;
#N canvas
10
4 99
719 620
note.create/delete 0;
#N canvas
9
4 99
568 597
note.create/delete 0;
#X obj 29 275 del 0;
#X obj 29 302 f;
#X msg 68 275 1;
...
...
@@ -2990,48 +2990,12 @@ certain period.;
#X obj 107 61 == 0;
#X obj 281 229 list prepend 0;
#X obj 281 252 route 0 1, f 24;
#X text 252
8 Shift+click deletes a note (like double-click);
#X text 25
4
28 Shift+click deletes a note (like double-click);
#X obj 107 38 r \$0.mod.key;
#X obj 390 204 r \$0.mod.key;
#N canvas 0 99 400 375 mod.keys 0;
#X obj 25 15 keyname;
#X obj 25 37 pack f s;
#X msg 25 59 \$2 \$1;
#X obj 25 135 ||;
#X obj 86 109 t b a;
#X obj 25 230 change -1;
#X obj 25 253 s \$0.mod.key;
#X obj 25 83 route Shift_L Shift_R Control_L Control_R;
#X obj 146 132 ||;
#X obj 207 108 t b a;
#X obj 146 155 << 1;
#X obj 25 204 +;
#X obj 146 178 t b a;
#X text 44 287 Modifier key bitmask:;
#X text 44 307 ---X Shift;
#X text 44 327 --x- Ctrl;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 7 0;
#X connect 3 0 11 0;
#X connect 4 0 3 0;
#X connect 4 1 3 1;
#X connect 5 0 6 0;
#X connect 7 0 3 0;
#X connect 7 1 4 0;
#X connect 7 2 8 0;
#X connect 7 3 9 0;
#X connect 8 0 10 0;
#X connect 9 0 8 0;
#X connect 9 1 8 1;
#X connect 10 0 12 0;
#X connect 11 0 5 0;
#X connect 12 0 11 0;
#X connect 12 1 11 1;
#X restore 463 86 pd mod.keys;
#X obj 390 227 == 1;
#X text 431 223 Shift-Click;
#X text 436 249 Shift-Click;
#X obj 425 228 r \$0.delete.on.click;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 2 0 1 1;
...
...
@@ -3076,9 +3040,11 @@ certain period.;
#X connect 40 0 39 1;
#X connect 41 0 42 0;
#X connect 42 0 30 0;
#X connect 42 1 33 0;
#X connect 44 0 40 0;
#X connect 45 0 47 0;
#X connect 47 0 41 1;
#X connect 45 0 46 0;
#X connect 46 0 41 1;
#X connect 48 0 46 1;
#X restore 16 42 pd note.create/delete;
#N canvas 0 99 406 517 note.change.velocity 0;
#X obj 14 19 r \$0.note.send;
...
...
@@ -3273,7 +3239,6 @@ certain period.;
#X obj 19 342 pack f f, f 13;
#X obj 19 97 spigot 1;
#X obj 97 88 r \$0.mod.key;
#X obj 97 111 == 2;
#X obj 161 343 r \$0.mod.key;
#X obj 161 366 == 2;
#X obj 161 389 change -1;
...
...
@@ -3293,7 +3258,10 @@ certain period.;
#X text 142 624 <- we use the selection only locally;
#X text 182 599 [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 Ctrl-key pressed.;
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 connect 0 0 12 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
...
...
@@ -3306,49 +3274,81 @@ by clicking on two coordinates on the grid with Ctrl-key pressed.;
#X connect 9 0 11 1;
#X connect 10 0 8 0;
#X connect 10 1 9 0;
#X connect 11 0 1
8
0;
#X connect 11 0 1
7
0;
#X connect 12 0 1 0;
#X connect 13 0
1
4 0;
#X connect 14 0 1
2 1
;
#X connect 13 0
3
4 0;
#X connect 14 0 1
5 0
;
#X connect 15 0 16 0;
#X connect 16 0 17
0
;
#X connect 1
7
0 18
1
;
#X connect 16 0 17
1
;
#X connect 1
6
0 18
0
;
#X connect 17 0 19 0;
#X connect 18 0 20 0;
#X connect 19 0 24 0;
#X connect 18 0 23 0;
#X connect 19 0 20 0;
#X connect 19 1 24 1;
#X connect 20 0 21 0;
#X connect 20 1 25 1;
#X connect 21 0 22 0;
#X connect 22 0 25 0;
#X connect 22 1 23 0;
#X connect 23 0 21 1;
#X connect 24 0 21 1;
#X connect 25 0 26 0;
#X connect 26 0 28 0;
#X connect 26 1 27 0;
#X connect 27 0 28 2;
#X connect 27 1 28 3;
#X connect 28 0 30 0;
#X connect 30 0 29 0;
#X connect 21 0 24 0;
#X connect 21 1 22 0;
#X connect 22 0 20 1;
#X connect 23 0 20 1;
#X connect 24 0 25 0;
#X connect 25 0 27 0;
#X connect 25 1 26 0;
#X connect 26 0 27 2;
#X connect 26 1 27 3;
#X connect 27 0 29 0;
#X connect 29 0 28 0;
#X connect 33 0 34 1;
#X connect 34 0 12 1;
#X connect 35 0 15 1;
#X restore 16 166 pd note.select;
#X text 15 17 GENERATE EVENTS;
#N canvas 336 294 403 183 note.unselect 0;
#X obj 25 17 keyname;
#X obj 25 40 pack f s;
#X obj 25 63 route 1;
#X obj 25 86 route Escape;
#X obj 25 133 s \$0.global.receive;
#X text 148 135 <- we use the selection only locally;
#X msg 25 110 note unselect;
#X obj 25 76 r \$0.unselect.selection;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X restore 16 191 pd note.unselect;
#N canvas 269 301 348 183 delete.selection 0;
#X obj 11 27 r \$0.delete.selection;
#N canvas 371 289 393 275 get.selection 0;
#X obj 20 7 inlet;
#X msg 20 64 1000;
#X obj 20 87 until;
#X obj 20 30 t b b;
#X msg 75 62 0;
#X obj 20 110 f;
#X obj 100 119 + 1;
#X obj 20 156 tabread \$0.marked;
#X obj 20 229 outlet;
#X obj 20 179 pack f f;
#X obj 20 133 t a a a;
#X obj 20 202 route 1;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 3 0 1 0;
#X connect 3 1 4 0;
#X connect 4 0 5 1;
#X connect 5 0 10 0;
#X connect 6 0 5 1;
#X connect 7 0 9 0;
#X connect 9 0 11 0;
#X connect 10 0 7 0;
#X connect 10 1 9 1;
#X connect 10 2 6 0;
#X connect 11 0 8 0;
#X restore 11 53 pd get.selection;
#X msg 11 78 note delete \$1;
#X obj 11 101 s \$0.global.send;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 6 0 4 0;
#X restore 16 191 pd note.unselect;
#X restore 19 125 pd generate.events;
#N canvas 0 99 413 279 process.events 0;
#X restore 243 40 pd delete.selection;
#X text 244 17 KEY COMMANDS;
#X restore 19 155 pd generate.events;
#N canvas 0 99 414 276 process.events 0;
#N canvas 59 156 682 563 note.create 0;
#X obj 6 8 r \$0.global.receive;
#X obj 6 31 route note;
...
...
@@ -4123,7 +4123,7 @@ by clicking on two coordinates on the grid with Ctrl-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
297
347 307 note.select 0;
#N canvas 0
363
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;
...
...
@@ -4400,7 +4400,7 @@ by clicking on two coordinates on the grid with Ctrl-key pressed.;
#X connect 6 0 2 0;
#X connect 7 0 5 0;
#X restore 19 179 pd note.unselect;
#N canvas 0 2
34
371 458 note.change.pos 0;
#N canvas 0 2
67
371 458 note.change.pos 0;
#X obj 6 8 r \$0.global.receive;
#X obj 6 31 route note;
#X obj 6 100 t a a, f 34;
...
...
@@ -4490,7 +4490,7 @@ by clicking on two coordinates on the grid with Ctrl-key pressed.;
#X connect 23 0 16 0;
#X connect 24 0 17 0;
#X restore 19 133 pd note.change.pos;
#X restore 19 1
5
5 pd process.events;
#X restore 19 1
8
5 pd process.events;
#X text 13 12 [unpunch] v0.0alpha;
#X obj 565 443 array define \$0.marked 1000;
#X text 659 519 2019 \, Roman Haefeli;
...
...
@@ -4553,6 +4553,116 @@ by clicking on two coordinates on the grid with Ctrl-key pressed.;
#X obj 333 508 s \$0.global.receive;
#X msg 333 485 note change duration 0 \$1;
#X floatatom 333 460 5 0 0 0 - - -;
#N canvas 25 99 703 479 key.commands 0;
#N canvas 0 99 397 411 mod.keys 0;
#X obj 25 15 keyname;
#X obj 25 37 pack f s;
#X msg 25 59 \$2 \$1;
#X obj 25 135 ||;
#X obj 80 109 t b a;
#X obj 25 260 change -1;
#X obj 25 283 s \$0.mod.key;
#X obj 136 128 ||;
#X obj 192 106 t b a;
#X obj 136 151 << 1;
#X obj 25 204 +;
#X obj 136 174 t b a;
#X text 44 317 Modifier key bitmask:;
#X text 43 354 --x- Ctrl;
#X text 44 337 ---x Shift;
#X obj 25 83 route Shift_L Shift_R Control_L Control_R Alt_L;
#X obj 248 177 t b a;
#X obj 25 234 +;
#X obj 248 154 << 2;
#X text 43 371 -x-- Alt_l;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 15 0;
#X connect 3 0 10 0;
#X connect 4 0 3 0;
#X connect 4 1 3 1;
#X connect 5 0 6 0;
#X connect 7 0 9 0;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 9 0 11 0;
#X connect 10 0 17 0;
#X connect 11 0 10 0;
#X connect 11 1 10 1;
#X connect 15 0 3 0;
#X connect 15 1 4 0;
#X connect 15 2 7 0;
#X connect 15 3 8 0;
#X connect 15 4 18 0;
#X connect 16 0 17 0;
#X connect 16 1 17 1;
#X connect 17 0 5 0;
#X connect 18 0 16 0;
#X restore 26 25 pd mod.keys;
#X obj 218 177 r \$0.mod.key;
#X floatatom 218 200 5 0 0 0 - - -;
#X obj 24 83 loadbang;
#X obj 24 106 \$0;
#X text 216 287 2: Ctrl;
#X text 216 305 3: Ctrl+Shift;
#X text 216 322 4: Alt_L;
#X text 216 267 1: Shift;
#X obj 219 31 keyname;
#X obj 219 54 pack f s;
#X obj 219 77 route 1;
#X obj 219 100 symbol;
#X symbolatom 260 123 10 0 0 0 - - -;
#X obj 219 123 t a a;
#X text 23 62 Mod-Key Config:;
#X obj 477 85 s \$0.unselect.selection;
#X obj 219 147 s \$0.keyname;
#X obj 477 61 select Escape;
#X obj 348 80 r \$0.keyname;
#X text 218 235 MOD KEY TABLE;
#X text 218 249 -------------;
#X text 475 18 KEY COMMANDS;
#X obj 477 135 s \$0.delete.selection;
#X obj 477 160 select Up;
#X obj 477 111 select Delete;
#X obj 477 210 select Down;
#X obj 477 234 s \$0.move.down.selection;
#X obj 477 184 s \$0.move.up.selection;
#X text 475 30 ------------;
#X obj 477 260 select Left;
#X obj 477 284 s \$0.move.left.selection;
#X obj 477 310 select Right;
#X obj 477 334 s \$0.move.right.selection;
#X msg 24 129 \; \$1.delete.on.click 1 \; \$1.select.range 1 \; \$1.move.notes.octave
1 \; \$1.move.notes.bar 1 \; \$1.change.notes.duration 2 \;;
#X obj 24 336 r \$0.delete.on.click;
#X obj 24 359 r \$0.select.range;
#X obj 24 381 r \$0.move.notes.octave;
#X obj 24 402 r \$0.move.notes.bar;
#X obj 25 424 r \$0.change.notes.duration;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
#X connect 4 0 34 0;
#X connect 9 0 10 0;
#X connect 9 1 10 1;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 14 0;
#X connect 14 0 17 0;
#X connect 14 1 13 0;
#X connect 18 0 16 0;
#X connect 19 0 18 0;
#X connect 19 0 24 0;
#X connect 19 0 25 0;
#X connect 19 0 26 0;
#X connect 19 0 30 0;
#X connect 19 0 32 0;
#X connect 24 0 28 0;
#X connect 25 0 23 0;
#X connect 26 0 27 0;
#X connect 30 0 31 0;
#X connect 32 0 33 0;
#X restore 19 125 pd key.commands;
#X connect 0 0 22 0;
#X connect 1 0 2 0;
#X connect 2 0 45 0;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment