Commit 0196795a authored by Roman Haefeli's avatar Roman Haefeli
Browse files

send correct note-off even for moved notes

parent 145dcdd1
#N canvas 0 99 799 557 10;
#N canvas 0 99 801 561 10;
#X msg 536 105 clear;
#X obj 206 22 loadbang;
#X obj 206 45 \$0;
......@@ -1555,7 +1555,7 @@ float hilite float ihilite;
#X obj 20 498 r \$0.global.send;
#X obj 20 465 s \$0.global.receive;
#X obj 285 430 text define \$0.sequence;
#N canvas 136 170 518 371 sequencer 0;
#N canvas 136 170 766 345 sequencer 0;
#N canvas 0 278 505 346 note.create 0;
#X obj 24 39 route note;
#X obj 24 62 route create;
......@@ -1708,7 +1708,7 @@ float hilite float ihilite;
#X connect 13 0 9 0;
#X connect 14 0 13 0;
#X restore 15 152 pd event.add;
#N canvas 594 897 359 230 event.remove 0;
#N canvas 594 930 356 230 event.remove 0;
#X obj 47 110 text delete \$0.sequence;
#X obj 14 11 r \$0.sequencer.event.remove;
#X obj 14 80 sel -1;
......@@ -1771,7 +1771,7 @@ float hilite float ihilite;
#X connect 16 0 8 0;
#X connect 17 0 6 0;
#X restore 13 88 pd note.change.velocity;
#N canvas 0 99 415 480 play.notes.by.index 0;
#N canvas 0 297 334 470 play.notes.by.index 0;
#X obj 18 77 text search \$0.sequence 0;
#X obj 96 100 text search \$0.sequence > 0;
#X obj 18 52 t a a;
......@@ -1785,40 +1785,40 @@ float hilite float ihilite;
#X obj 112 302 + 1;
#X obj 90 344 loadbang;
#X msg 90 370 1;
#X msg 129 368 2;
#X obj 51 397 text get \$0.sequence;
#X obj 96 123 sel -1;
#X msg 51 225 \$2 \$1;
#X msg 120 240 \$1;
#X obj 96 147 text size \$0.sequence;
#X obj 18 17 inlet;
#X obj 51 420 outlet;
#X obj 51 426 outlet;
#X msg 129 368 3;
#X connect 0 0 3 0;
#X connect 1 0 15 0;
#X connect 1 0 14 0;
#X connect 2 0 0 0;
#X connect 2 1 1 0;
#X connect 3 1 4 0;
#X connect 4 0 5 0;
#X connect 5 0 16 0;
#X connect 5 1 17 0;
#X connect 5 0 15 0;
#X connect 5 1 16 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 14 0;
#X connect 9 0 13 0;
#X connect 9 1 10 0;
#X connect 10 0 8 1;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 14 1;
#X connect 13 0 14 2;
#X connect 14 0 20 0;
#X connect 15 0 18 0;
#X connect 15 1 4 1;
#X connect 16 0 6 0;
#X connect 17 0 8 1;
#X connect 18 0 4 1;
#X connect 19 0 2 0;
#X restore 248 189 pd play.notes.by.index;
#X connect 11 0 20 0;
#X connect 12 0 13 1;
#X connect 13 0 19 0;
#X connect 14 0 17 0;
#X connect 14 1 4 1;
#X connect 15 0 6 0;
#X connect 16 0 8 1;
#X connect 17 0 4 1;
#X connect 18 0 2 0;
#X connect 20 0 13 2;
#X restore 248 87 pd play.notes.by.index;
#X obj 248 36 inlet;
#X obj 248 309 outlet;
#N canvas 0 157 416 332 cursor 0;
......@@ -1857,54 +1857,12 @@ float hilite float ihilite;
#X connect 13 0 1 0;
#X connect 14 0 13 0;
#X connect 15 0 14 0;
#X restore 342 107 pd cursor;
#X restore 401 91 pd cursor;
#N canvas 258 224 446 426 bag 0;
#X obj 35 33 inlet;
#X obj 310 34 inlet;
#X obj 205 34 inlet;
#X obj 35 387 outlet;
#X obj 35 56 t a a;
#X obj 94 160 sel 0;
#X msg 94 183 -1;
#X obj 120 33 table \$0.note.state 127;
#X obj 141 177 tabread \$0.note.state;
#X msg 141 117 \$1;
#X obj 94 85 t a a;
#X obj 141 140 t a a;
#X obj 94 207 +;
#X obj 94 232 max 0;
#X obj 94 259 tabwrite \$0.note.state;
#X obj 94 133 > 0;
#X msg 94 108 \$2;
#N canvas 0 99 384 368 flush.notes 0;
#X obj 21 66 array max \$0.note.state;
#X obj 48 113 pack f f;
#X obj 21 89 sel 0;
#X obj 21 42 until;
#X obj 48 136 t a a;
#X msg 75 160 \$2 0;
#X obj 75 183 s \$0.note.state;
#X obj 48 213 unpack;
#X obj 48 236 until;
#X obj 48 259 f;
#X msg 48 282 \$1 0;
#X obj 21 10 inlet;
#X obj 48 313 outlet;
#X connect 0 0 2 0;
#X connect 0 1 1 1;
#X connect 1 0 4 0;
#X connect 2 0 3 1;
#X connect 2 1 1 0;
#X connect 3 0 0 0;
#X connect 4 0 7 0;
#X connect 4 1 5 0;
#X connect 5 0 6 0;
#X connect 7 0 8 0;
#X connect 7 1 9 1;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 12 0;
#X connect 11 0 3 0;
#X restore 310 250 pd flush.notes;
#N canvas 112 142 450 300 detect.leap 0;
#X obj 36 19 inlet;
#X obj 36 60 t a a;
......@@ -1918,88 +1876,83 @@ float hilite float ihilite;
#X connect 2 0 3 0;
#X connect 3 1 4 0;
#X connect 4 0 5 0;
#X restore 310 111 pd detect.leap;
#X restore 205 111 pd detect.leap;
#X text 82 37 pitch vel id;
#X obj 113 189 bag;
#X msg 113 112 \$3 \$2;
#X msg 205 160 flush;
#X obj 113 311 pack f f f;
#X obj 113 254 tabread \$0.pitch;
#X obj 113 228 t a b a, f 12;
#X msg 141 282 0;
#X connect 0 0 3 0;
#X connect 1 0 17 0;
#X connect 1 0 4 0;
#X connect 3 0 2 0;
#X connect 3 1 9 0;
#X connect 4 0 5 0;
#X connect 4 1 11 0;
#X connect 5 0 11 0;
#X connect 7 0 11 1;
#X connect 8 0 10 0;
#X connect 9 0 15 0;
#X connect 9 1 8 0;
#X connect 10 0 7 0;
#X connect 10 1 13 1;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 14 0 4 0;
#X connect 15 0 14 0;
#X connect 16 0 2 0;
#X connect 17 0 16 0;
#X restore 248 240 pd bag;
#X obj 248 59 t a a a a;
#N canvas 483 129 381 618 mute.deleted.note 0;
#X obj 274 33 inlet;
#X obj 127 542 outlet;
#X connect 3 1 7 0;
#X connect 4 0 8 0;
#X connect 6 0 11 0;
#X connect 7 0 6 0;
#X connect 8 0 6 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 10 0;
#X connect 11 1 12 0;
#X connect 11 2 9 2;
#X connect 12 0 9 1;
#X restore 248 161 pd bag;
#N canvas 483 294 358 592 mute.deleted.note 0;
#X obj 24 39 route note;
#X obj 24 62 route delete;
#X obj 24 85 b;
#X obj 24 108 f;
#X obj 24 143 route -1;
#X obj 88 228 tabread \$0.step;
#X obj 130 207 tabread \$0.duration;
#X obj 88 251 t a a;
#X obj 115 276 +;
#X obj 61 287 moses;
#X obj 88 318 moses;
#X obj 61 241 f;
#X obj 69 177 t b a a a;
#X obj 159 304 tabread \$0.pitch;
#X obj 88 345 b;
#X obj 88 417 tabread \$0.note.state;
#X obj 88 368 f;
#X obj 88 391 t a a;
#X obj 88 442 moses 1;
#X obj 127 468 b;
#X obj 127 491 f;
#X msg 127 516 \$1 0;
#X obj 56 110 r \$0.delete.id;
#X obj 50 110 r \$0.delete.id;
#X obj 24 16 r \$0.seq.receive;
#X connect 0 0 13 1;
#X obj 25 272 inlet;
#X obj 25 488 outlet;
#X obj 25 295 t a a;
#X msg 73 324 \$3 \$2;
#X obj 73 347 unpack f f;
#X obj 130 371 > 0;
#X obj 73 394 pack f f;
#X obj 74 448 table \$0.playing.notes 1000;
#X obj 73 417 s \$0.playing.notes;
#X obj 132 141 t a a;
#X obj 132 164 tabread \$0.playing.notes;
#X obj 132 186 sel 1;
#X obj 132 209 f;
#X obj 132 234 t a b a;
#X obj 132 283 tabread \$0.pitch;
#X obj 132 306 pack f f f;
#X msg 151 258 0;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 1 14 0;
#X connect 4 1 16 0;
#X connect 5 0 3 1;
#X connect 6 0 0 0;
#X connect 7 0 9 0;
#X connect 8 0 10 1;
#X connect 9 0 11 1;
#X connect 9 0 8 0;
#X connect 9 1 10 0;
#X connect 10 0 12 1;
#X connect 10 0 11 0;
#X connect 11 0 13 0;
#X connect 11 1 12 0;
#X connect 12 0 16 0;
#X connect 13 0 11 0;
#X connect 14 0 13 0;
#X connect 14 1 7 0;
#X connect 14 2 8 0;
#X connect 14 3 15 0;
#X connect 15 0 18 1;
#X connect 16 0 18 0;
#X connect 17 0 20 0;
#X connect 12 0 13 1;
#X connect 13 0 15 0;
#X connect 16 0 17 0;
#X connect 16 1 19 1;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 19 0 17 0;
#X connect 19 1 22 1;
#X connect 20 1 21 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 20 1 23 0;
#X connect 20 2 22 2;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 23 0 1 0;
#X connect 24 0 5 1;
#X connect 25 0 2 0;
#X restore 312 144 pd mute.deleted.note;
#X connect 22 0 9 0;
#X connect 23 0 22 1;
#X restore 248 130 pd mute.deleted.note;
#X obj 17 207 r \$0.clear;
#X text 286 240 keep track of playing notes;
#N canvas 447 99 474 322 note.change.pos 0;
#X obj 24 39 route note;
#X obj 24 62 route change;
......@@ -2038,16 +1991,69 @@ float hilite float ihilite;
#X connect 14 0 15 1;
#X connect 15 0 16 0;
#X restore 13 109 pd note.change.pos;
#N canvas 494 237 410 372 lookup.note.off 0;
#X obj 19 73 inlet;
#X obj 19 334 outlet;
#X msg 19 96 \$2 \$1 \$3;
#X obj 19 119 route 0, f 30;
#X msg 19 142 \$2;
#X text 76 95 vel pitch id;
#X text 47 142 id;
#X msg 19 218 \$1 0;
#X text 52 218 pitch vel;
#X text 19 19 make sure the correct note is turned off in cases where
the note was being moved while playing.;
#X obj 19 241 list append;
#X msg 196 222 \$2 \$1 \$3;
#X text 264 222 pitch vel id;
#X obj 19 165 t a a, f 11;
#X text 97 244 pitch vel id;
#X obj 226 89 table \$0.current.pitch 1000;
#X obj 196 146 t a a;
#X msg 223 172 \$3 \$2;
#X obj 223 195 s \$0.current.pitch;
#X obj 19 195 tabread \$0.current.pitch;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 16 0;
#X connect 4 0 13 0;
#X connect 7 0 10 0;
#X connect 10 0 1 0;
#X connect 11 0 1 0;
#X connect 13 0 19 0;
#X connect 13 1 10 1;
#X connect 16 0 11 0;
#X connect 16 1 17 0;
#X connect 17 0 18 0;
#X connect 19 0 7 0;
#X restore 248 188 pd lookup.note.off;
#N canvas 0 132 355 202 append.gid 0;
#X obj 37 37 inlet;
#X obj 37 150 outlet;
#X obj 37 60 unpack f f f;
#X obj 37 119 pack f f f;
#X obj 106 86 tabread \$0.gid;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 3 1;
#X connect 2 2 4 0;
#X connect 3 0 1 0;
#X connect 4 0 3 2;
#X restore 248 214 pd append.gid;
#X text 259 108 pitch vel id;
#X obj 248 63 t a a a, f 26;
#X connect 5 0 6 0;
#X connect 8 0 12 0;
#X connect 9 0 13 0;
#X connect 12 0 10 0;
#X connect 13 0 8 0;
#X connect 13 1 12 1;
#X connect 13 2 14 0;
#X connect 13 3 11 0;
#X connect 14 0 12 0;
#X connect 15 0 5 0;
#X connect 8 0 13 0;
#X connect 9 0 19 0;
#X connect 12 0 16 0;
#X connect 13 0 12 0;
#X connect 14 0 5 0;
#X connect 16 0 17 0;
#X connect 17 0 10 0;
#X connect 19 0 8 0;
#X connect 19 1 12 1;
#X connect 19 2 11 0;
#X restore 199 430 pd sequencer;
#X obj 20 521 outlet;
#X obj 20 364 inlet;
......@@ -5026,19 +5032,22 @@ by clicking on two coordinates on the grid with Mod-key pressed.;
#X obj 13 45 route note;
#X obj 13 73 route create delete;
#X obj 110 223 s \$0.delete.id;
#N canvas 731 272 337 209 only.active 0;
#N canvas 731 338 337 209 only.active 0;
#X obj 20 71 tabread \$0.active;
#X obj 20 94 sel 1;
#X obj 20 117 f;
#X obj 20 47 t a a;
#X obj 20 18 inlet;
#X obj 20 146 outlet;
#X msg 49 118 -1;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 6 0;
#X connect 2 0 5 0;
#X connect 3 0 0 0;
#X connect 3 1 2 1;
#X connect 4 0 3 0;
#X connect 6 0 5 0;
#X restore 110 142 pd only.active;
#X connect 0 0 3 0;
#X connect 1 0 2 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