#N struct trumpet float x float y float freq float v1 float v2 float v3 float breath float lip float mute; #N canvas 407 195 617 649 10; #N canvas 467 283 660 624 trumpet 0; #X obj 211 365 until; #X msg 206 342 4; #X obj 54 112 drawnumber x 0 0 0 trumpet:; #X obj 209 391 f 0; #X obj 235 390 + 1; #X obj 419 359 makefilename pd-%s; #X msg 423 385 traverse \$1 \, bang; #X obj 425 410 pointer; #X obj 236 277 inlet; #X obj 289 326 list; #X msg 241 340 0; #X obj 236 305 t b b a; #X obj 246 440 * 20; #X obj 211 415 t a a b; #X obj 199 471 append trumpet x y; #X text 115 253 make 4 trumpet instances to store per note settings ; #X obj 41 46 struct trumpet float x float y float freq float v1 float v2 float v3 float breath float lip float mute; #X connect 0 0 3 0; #X connect 1 0 0 0; #X connect 3 0 4 0; #X connect 3 0 13 0; #X connect 4 0 3 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 14 2; #X connect 8 0 11 0; #X connect 9 0 5 0; #X connect 10 0 3 1; #X connect 11 0 1 0; #X connect 11 1 10 0; #X connect 11 2 9 0; #X connect 12 0 14 1; #X connect 13 0 14 0; #X connect 13 1 12 0; #X restore 412 151 pd trumpet; #N canvas 0 0 450 300 trumpet-settings 0; #X scalar trumpet 0 0 61 1 1 1 74 92 72 \;; #X scalar trumpet 1 20 78 0 0 1 56 66 65 \;; #X scalar trumpet 2 40 70 1 0 1 76 10 75 \;; #X scalar trumpet 3 60 65 1 0 1 48 73 88 \;; #X restore 405 342 pd trumpet-settings; #X msg 412 124 trumpet-settings; #X obj 71 387 poly 4; #X obj 442 98 s pd-trumpet-settings; #X msg 442 75 clear; #X obj 71 455 route 1 2 3 4; #X obj 71 411 pack 0 0 0 p; #X obj 71 127 pointer trumpet; #X obj 71 42 t a b; #X msg 143 101 traverse pd-trumpet-settings; #X msg 71 102 next; #X obj 71 77 until; #N canvas 474 382 664 304 randoms 0; #X obj 326 145 random 100; #X obj 407 144 random 100; #X obj 494 145 random 100; #X obj 103 180 outlet; #X obj 164 180 outlet; #X obj 243 178 outlet; #X obj 326 178 outlet; #X obj 407 175 outlet; #X obj 494 178 outlet; #X obj 103 143 random 2; #X obj 164 146 random 2; #X obj 243 146 random 2; #X obj 80 30 inlet; #X obj 80 65 t b b; #X obj 80 262 outlet; #X obj 80 225 random 127; #X connect 0 0 6 0; #X connect 1 0 7 0; #X connect 2 0 8 0; #X connect 9 0 3 0; #X connect 10 0 4 0; #X connect 11 0 5 0; #X connect 12 0 13 0; #X connect 13 0 15 0; #X connect 13 1 10 0; #X connect 13 1 11 0; #X connect 13 1 0 0; #X connect 13 1 1 0; #X connect 13 1 2 0; #X connect 13 1 9 0; #X connect 15 0 14 0; #X restore 93 184 pd randoms; #X obj 71 153 t a b a; #X text 224 184 Generate new settings per note; #X obj 93 244 set trumpet freq v1 v2 v3 breath lip mute; #X obj 71 287 t a a; #X obj 71 331 get trumpet freq; #X obj 412 51 t b b; #X obj 412 12 bng 32 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1; #N canvas 0 0 671 478 trumpet-synth 0; #X obj 225 173 get trumpet v1 v2 v3 breath lip mute; #X obj 225 347 print v1; #X obj 274 320 print v2; #X obj 323 297 print v3; #X obj 373 268 print breath; #X obj 422 247 print lip; #X obj 472 222 print mute; #X obj 75 79 unpack 0 0 p; #X obj 75 160 print freq; #X obj 114 136 print vol; #X obj 45 30 inlet; #X obj 45 58 t b a; #X obj 45 246 print -------------; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 0 2 3 0; #X connect 0 3 4 0; #X connect 0 4 5 0; #X connect 0 5 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 0 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X restore 135 484 pd trumpet-synth; #N canvas 0 0 671 478 trumpet-synth 0; #X obj 225 173 get trumpet v1 v2 v3 breath lip mute; #X obj 225 347 print v1; #X obj 274 320 print v2; #X obj 323 297 print v3; #X obj 373 268 print breath; #X obj 422 247 print lip; #X obj 472 222 print mute; #X obj 75 79 unpack 0 0 p; #X obj 75 160 print freq; #X obj 114 136 print vol; #X obj 45 30 inlet; #X obj 45 58 t b a; #X obj 45 246 print -------------; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 0 2 3 0; #X connect 0 3 4 0; #X connect 0 4 5 0; #X connect 0 5 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 0 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X restore 114 514 pd trumpet-synth; #N canvas 0 0 671 478 trumpet-synth 0; #X obj 225 173 get trumpet v1 v2 v3 breath lip mute; #X obj 225 347 print v1; #X obj 274 320 print v2; #X obj 323 297 print v3; #X obj 373 268 print breath; #X obj 422 247 print lip; #X obj 472 222 print mute; #X obj 75 79 unpack 0 0 p; #X obj 75 160 print freq; #X obj 114 136 print vol; #X obj 45 30 inlet; #X obj 45 58 t b a; #X obj 45 246 print -------------; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 0 2 3 0; #X connect 0 3 4 0; #X connect 0 4 5 0; #X connect 0 5 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 0 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X restore 92 545 pd trumpet-synth; #N canvas 0 0 671 478 trumpet-synth 0; #X obj 225 173 get trumpet v1 v2 v3 breath lip mute; #X obj 225 347 print v1; #X obj 274 320 print v2; #X obj 323 297 print v3; #X obj 373 268 print breath; #X obj 422 247 print lip; #X obj 472 222 print mute; #X obj 75 79 unpack 0 0 p; #X obj 75 160 print freq; #X obj 114 136 print vol; #X obj 45 30 inlet; #X obj 45 58 t b a; #X obj 45 246 print -------------; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 0 2 3 0; #X connect 0 3 4 0; #X connect 0 4 5 0; #X connect 0 5 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 0 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X restore 71 577 pd trumpet-synth; #X obj 71 360 makenote 100 1000; #X obj 171 152 t b; #X text 204 154 loop around; #X msg 71 18 4; #X text 178 404 TODO: Note-offs will send the wrong (last) pointer \, but in practice this may not matter. Unfortunatly poly and makenote cannot store pointers. Feature request?; #X connect 2 0 0 0; #X connect 3 0 7 0; #X connect 3 1 7 1; #X connect 3 2 7 2; #X connect 5 0 4 0; #X connect 6 0 24 0; #X connect 6 1 23 0; #X connect 6 2 22 0; #X connect 6 3 21 0; #X connect 7 0 6 0; #X connect 8 0 14 0; #X connect 8 2 26 0; #X connect 9 0 12 0; #X connect 9 1 10 0; #X connect 10 0 8 0; #X connect 11 0 8 0; #X connect 12 0 11 0; #X connect 13 0 16 0; #X connect 13 1 16 1; #X connect 13 2 16 2; #X connect 13 3 16 3; #X connect 13 4 16 4; #X connect 13 5 16 5; #X connect 13 6 16 6; #X connect 14 0 17 0; #X connect 14 1 13 0; #X connect 14 2 16 7; #X connect 17 0 18 0; #X connect 17 1 7 3; #X connect 18 0 25 0; #X connect 19 0 2 0; #X connect 19 1 5 0; #X connect 20 0 19 0; #X connect 25 0 3 0; #X connect 25 1 3 1; #X connect 26 0 10 0; #X connect 28 0 9 0;