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

implement 'note create' and 'note delete' events in sequencer

parent fe86eb05
......@@ -8,7 +8,9 @@ gid;
#N struct 1003.dur float x float y float value;
#N struct 1003.show.selector float x float y float hilite float id
symbol label;
#N canvas 0 99 1123 568 10;
#N struct 1003.note float x float y float w float h float id float
gid float vel float c float vis;
#N canvas 0 99 1037 557 10;
#X msg 644 365 clear;
#X obj 437 15 loadbang;
#X obj 437 38 \$0;
......@@ -627,8 +629,6 @@ id float gid float vel float c float vis;
#X msg 751 47 const 0;
#X obj 835 16 array define \$0.active 1000;
#X obj 581 338 t b b b b b;
#X obj 897 308 route click;
#X obj 897 356 s \$0.default.gid;
#N canvas 617 363 640 399 create_guis 0;
#X obj 356 33 inlet;
#X obj 404 294 outlet;
......@@ -887,7 +887,7 @@ id float gid float vel float c float vis;
#X connect 11 3 8 0;
#X connect 11 4 7 0;
#X restore 581 475 pd create_guis;
#N canvas 0 99 416 185 gui-templates 0;
#N canvas 0 99 813 177 gui-templates 0;
#N canvas 0 99 408 150 gid.button-template 0;
#X obj 17 26 filledpolygon clr 0 hl 0 0 0 15 15 15 15 0;
#X obj 16 99 s \$0.gid.button.send;
......@@ -947,48 +947,35 @@ hl float gid;
float id symbol label;
#X connect 3 0 0 0;
#X restore 9 102 pd show.selector-template;
#X obj 464 59 route click;
#X obj 464 107 s \$0.default.gid;
#X obj 333 35 r \$0.vel.send;
#X obj 333 81 get \$0.vel value;
#X obj 333 106 s \$0.default.vel;
#X obj 333 58 route change;
#X obj 209 55 route change;
#X obj 209 32 r \$0.dur.send;
#X obj 209 78 get \$0.dur value;
#X obj 209 103 s \$0.default.dur;
#X obj 464 36 r \$0.gid.button.send;
#X obj 464 82 get \$0.gid.button gid;
#X obj 612 60 route click;
#X obj 612 37 r \$0.show.selector.send;
#X obj 612 83 get \$0.show.selector id;
#X obj 612 108 s \$0.default.show;
#X connect 4 0 15 0;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 9 0 7 0;
#X connect 10 0 12 0;
#X connect 11 0 10 0;
#X connect 12 0 13 0;
#X connect 14 0 4 0;
#X connect 15 0 5 0;
#X connect 16 0 18 0;
#X connect 17 0 16 0;
#X connect 18 0 19 0;
#X restore 754 475 pd gui-templates;
#X obj 897 395 r \$0.vel.send;
#X obj 897 441 get \$0.vel value;
#X obj 897 466 s \$0.default.vel;
#X obj 897 418 route change;
#X obj 1007 418 route change;
#X obj 1007 395 r \$0.dur.send;
#X obj 1007 441 get \$0.dur value;
#X obj 1007 466 s \$0.default.dur;
#X obj 897 285 r \$0.gid.button.send;
#X obj 897 331 get \$0.gid.button gid;
#N canvas 0 99 627 397 sequencer.part 0;
#X obj 443 64 text define sandbox;
#X obj 56 174 text insert sandbox;
#X msg 104 130 100000;
#X obj 104 94 loadbang;
#X obj 341 272 text search sandbox > 0;
#X obj 345 143 text delete sandbox;
#X msg 348 106 -1;
#X msg 56 44 0 60 90 0 \, 0 64 90 1 \, 2 67 90 2 \, 4 60 0 3 \, 4 67
0 4 \, 8 64 0 5;
#X msg 286 197 3 48 127;
#X obj 286 225 t a a;
#X msg 341 247 \$1;
#X msg 353 197 10 48 0;
#X obj 286 346 text insert sandbox;
#X obj 341 295 sel -1;
#X msg 341 320 1e+09;
#X connect 2 0 1 1;
#X connect 3 0 2 0;
#X connect 4 0 13 0;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 12 0;
#X connect 9 1 10 0;
#X connect 10 0 4 0;
#X connect 11 0 9 0;
#X connect 13 0 14 0;
#X connect 13 1 12 1;
#X connect 14 0 12 1;
#X restore 256 39 pd sequencer.part;
#X obj 28 16 pianorollseq-display \$0.display;
#X obj 581 524 s \$0.display;
#X obj 704 164 r \$0.display;
......@@ -1254,7 +1241,7 @@ float id symbol label;
#X obj 258 160 s \$0.global.receive;
#X obj 258 114 t a a;
#X obj 285 138 print ACTIONS;
#N canvas 260 288 300 366 note.delete 0;
#N canvas 260 321 300 366 note.delete 0;
#X obj 6 8 r \$0.global.receive;
#X obj 6 31 route note;
#X obj 6 54 route delete;
......@@ -1986,24 +1973,114 @@ to the note (or prints a 'not found' error);
#X connect 17 1 12 0;
#X restore 43 356 pd note.change.gid;
#X msg 283 358 note change gid 16 58 4;
#X obj 897 208 route click;
#X obj 897 185 r \$0.show.selector.send;
#X obj 897 231 get \$0.show.selector id;
#X obj 897 256 s \$0.default.show;
#X msg 437 61 \; \$1.stepcount 64 \; \$1.pitchrange 48 \; \$1.stepviswidth
15 \; \$1.stepvisheight 14 \; \$1.canvastopmargin 60 \; \$1.canvasleftmargin
90 \; \$1.stepkeycolor1 887 \; \$1.stepkeycolor2 777 \; \$1.griddivision
4 \; \$1.gridsubdivision 4 \; \$1.gidcolorlist 800 840 80 88 8 808
\; \$1.default.vel 64 \; \$1.default.gid 0 \; \$1.default.dur 4 \;
\$1.default.show 0 \; \$1.init bang \;;
#X connect 0 0 37 0;
#X obj 78 465 text define \$0.sequence;
#N canvas 959 549 627 397 sequencer 1;
#N canvas 0 99 415 375 note.create 0;
#X obj 24 204 t a a;
#X msg 79 226 \$1;
#X obj 79 274 sel -1;
#X msg 79 299 1e+09;
#X obj 24 325 text insert \$0.sequence;
#X obj 79 251 text search \$0.sequence > 0;
#X obj 24 16 r \$0.global.receive;
#X obj 24 39 route note;
#X obj 24 62 route create;
#X msg 118 173 \$1 \$2 \$3;
#X msg 24 123 \$1 \$4;
#X obj 24 146 +;
#X obj 24 85 t a a a;
#X obj 24 173 pack f f 0;
#X msg 68 125 \$2;
#X connect 0 0 4 0;
#X connect 0 1 1 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 2 1 4 1;
#X connect 3 0 4 1;
#X connect 5 0 2 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 12 0;
#X connect 9 0 0 0;
#X connect 10 0 11 0;
#X connect 11 0 13 0;
#X connect 12 0 10 0;
#X connect 12 1 14 0;
#X connect 12 2 9 0;
#X connect 13 0 0 0;
#X connect 14 0 13 1;
#X restore 13 19 pd note.create;
#N canvas 0 99 415 397 note.delete 0;
#X obj 24 16 r \$0.global.receive;
#X obj 24 39 route note;
#X obj 24 62 route delete;
#N canvas 126 411 388 279 resolve.note 0;
#X obj 39 95 r \$0.resolve.note.receive;
#X obj 39 72 s \$0.resolve.note.send;
#X obj 20 224 pointer;
#X obj 20 17 inlet;
#X obj 20 46 t b a b;
#X obj 20 174 f;
#X obj 20 197 sel 1;
#X obj 39 118 t b p;
#X msg 39 142 1;
#X msg 107 141 0;
#X obj 20 247 outlet;
#X connect 0 0 7 0;
#X connect 2 0 10 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 4 1 1 0;
#X connect 4 2 9 0;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 7 0 8 0;
#X connect 7 1 2 1;
#X connect 8 0 5 1;
#X connect 9 0 5 1;
#X restore 102 141 pd resolve.note;
#X obj 102 166 get \$0.note id;
#X obj 102 189 tabread \$0.duration;
#X msg 83 209 \$1;
#X obj 83 236 +;
#X obj 83 115 t a a a;
#X obj 83 262 pack f f;
#X msg 127 233 \$2;
#X obj 24 300 text search \$0.sequence 0 1;
#X obj 24 85 t a a;
#X obj 24 323 text delete \$0.sequence;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 12 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 7 1;
#X connect 6 0 7 0;
#X connect 7 0 9 0;
#X connect 8 0 6 0;
#X connect 8 1 3 0;
#X connect 8 2 10 0;
#X connect 9 0 11 0;
#X connect 10 0 9 1;
#X connect 11 0 13 0;
#X connect 12 0 11 0;
#X connect 12 1 8 0;
#X restore 13 42 pd note.delete;
#X restore 79 440 pd sequencer;
#X connect 0 0 24 0;
#X connect 1 0 2 0;
#X connect 2 0 66 0;
#X connect 2 0 49 0;
#X connect 3 0 20 0;
#X connect 4 0 2 0;
#X connect 5 0 37 0;
#X connect 8 0 37 0;
#X connect 10 0 37 0;
#X connect 5 0 24 0;
#X connect 8 0 24 0;
#X connect 10 0 24 0;
#X connect 17 0 18 0;
#X connect 18 0 12 0;
#X connect 18 0 13 0;
......@@ -2011,30 +2088,18 @@ to the note (or prints a 'not found' error);
#X connect 18 0 14 0;
#X connect 18 0 16 0;
#X connect 18 0 19 0;
#X connect 20 0 23 0;
#X connect 20 0 21 0;
#X connect 20 1 10 0;
#X connect 20 2 5 0;
#X connect 20 3 8 0;
#X connect 20 4 0 0;
#X connect 21 0 34 0;
#X connect 23 0 37 0;
#X connect 25 0 28 0;
#X connect 26 0 27 0;
#X connect 21 0 24 0;
#X connect 25 0 26 0;
#X connect 27 0 28 0;
#X connect 28 0 26 0;
#X connect 29 0 31 0;
#X connect 30 0 29 0;
#X connect 31 0 32 0;
#X connect 33 0 21 0;
#X connect 34 0 22 0;
#X connect 38 0 39 0;
#X connect 40 0 41 0;
#X connect 41 0 39 0;
#X connect 43 0 45 0;
#X connect 45 0 44 0;
#X connect 45 1 46 0;
#X connect 56 0 55 0;
#X connect 58 0 55 0;
#X connect 61 0 55 0;
#X connect 62 0 64 0;
#X connect 63 0 62 0;
#X connect 64 0 65 0;
#X connect 30 0 32 0;
#X connect 32 0 31 0;
#X connect 32 1 33 0;
#X connect 43 0 42 0;
#X connect 45 0 42 0;
#X connect 48 0 42 0;
Supports Markdown
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