#N canvas 592 81 557 515 10;
#X obj 0 0 cnv 15 552 40 empty empty gestalt 3 12 0 18 -204280 -1 0
;
#X obj 0 317 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 0 401 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 0 461 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 79 410 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 79 328 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 0 509 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#N canvas 240 348 428 75 Related_objects 0;
#X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0;
#X text 6 1 Related Objects;
#X restore 206 511 pd Related_objects;
#N canvas 626 552 379 261 META 0;
#X text 12 184 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
Wilkes for Pd version 0.42. Updated by Fred Jan Kraan 2016-02.;
#X text 12 145 AUTHOR Olaf Matthes;
#X text 12 25 LICENSE GPL v2;
#X text 12 125 OUTLET_0 float;
#X text 12 5 KEYWORDS control random;
#X text 12 85 INLET_1 float;
#X text 12 105 INLET_2 float;
#X text 12 64 INLET_0 float;
#X text 11 45 DESCRIPTION monophonic melody detection;
#X text 12 164 MAINTAINER Fred Jan Kraan <fjkraan@xs4all.nl>;
#X restore 502 513 pd META;
#X obj 79 353 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X text 107 352 float;
#X obj 79 377 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X text 107 376 float;
#X text 107 410 float;
#X text 8 23 gestalt detection for monophonic melodies;
#X obj 500 4 gestalt;
#X obj 87 53 tgl 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X floatatom 170 154 5 0 0 0 - - -, f 5;
#X text 116 54 click to play random melody;
#X text 85 474 reference time. i.e. time in ms expected to be the duration
of the shortest note (also setable via rightmost inlet);
#X text 161 410 - the higher the output the more the gestalt changes
\; one could use 'tilt' to detect abrupt changes that indicate the
start of a new segment;
#X text 162 327 - note number;
#X text 162 352 - note velocity;
#X obj 87 235 maxlib/gestalt 100;
#X obj 114 128 maxlib/beat;
#N canvas 656 388 450 300 melodymaker 0;
#X obj 58 176 makenote 100 100;
#X obj 58 76 metro 100;
#X obj 58 100 random 24;
#X obj 58 124 + 60;
#X obj 151 100 random 24;
#X obj 151 124 select 0;
#X msg 196 146 100;
#X msg 151 146 400;
#X floatatom 68 154 5 0 0 0 - - -, f 5;
#X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0;
#X text 6 1 random melody maker;
#X obj 58 40 inlet;
#X obj 58 250 outlet;
#X obj 151 250 outlet;
#X connect 0 0 12 0;
#X connect 0 1 13 0;
#X connect 1 0 2 0;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X connect 3 0 8 0;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 5 1 6 0;
#X connect 6 0 0 2;
#X connect 7 0 0 2;
#X connect 11 0 1 0;
#X restore 87 80 pd melodymaker;
#X obj 87 103 t f f;
#X floatatom 87 298 5 0 0 0 - - -, f 5;
#X text 162 376 - reference time. must be > 0;
#X text 107 327 float;
#X connect 16 0 25 0;
#X connect 23 0 27 0;
#X connect 24 1 17 0;
#X connect 24 1 23 2;
#X connect 25 0 26 0;
#X connect 25 1 23 1;
#X connect 25 1 24 1;
#X connect 26 0 23 0;
#X connect 26 1 24 0;
