#N canvas 576 54 560 561 10;
#X obj 2 268 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 2 332 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 2 475 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 78 453 cnv 17 3 17 empty empty 6 5 9 0 16 -228856 -162280 0
;
#X obj 78 277 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 78 357 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 78 376 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X obj 78 395 cnv 17 3 17 empty empty 3 5 9 0 16 -228856 -162280 0
;
#X obj 78 414 cnv 17 3 17 empty empty 4 5 9 0 16 -228856 -162280 0
;
#X obj 78 433 cnv 17 3 17 empty empty 5 5 9 0 16 -228856 -162280 0
;
#X obj 78 338 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 42 135 midiin;
#X text 129 482 (none);
#X obj 2 556 cnv 1 550 1 empty empty empty 0 0 0 4 -262144 -262144
0;
#X obj 2 535 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#X text 158 395 -;
#X text 118 395 float;
#X text 158 415 -;
#X text 118 415 float;
#X text 158 434 -;
#X text 118 434 float;
#X text 158 453 -;
#X text 118 453 float;
#X text 158 338 -;
#X text 125 338 list;
#X text 158 357 -;
#X text 125 357 list;
#X text 158 376 -;
#X text 125 376 list;
#X text 158 276 -;
#X text 119 276 float;
#X text 158 294 -;
#X text 125 294 bang;
#X obj 2 5 cnv 15 553 42 empty empty empty 20 12 0 14 -233017 -66577
0;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 554 42 1 0 0;
#X restore 2 4 graph;
#X obj 305 5 cnv 15 250 40 empty empty empty 12 13 0 18 -128992 -233080
0;
#N canvas 382 141 749 319 (subpatch) 0;
#X coords 0 -1 1 1 252 42 2 100 100;
#X restore 304 4 pd;
#X obj 42 187 unpack;
#X text 173 276 raw MIDI data stream;
#X obj 164 244 cyclone/comment 50 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Control;
#X obj 262 234 cyclone/comment 50 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Aftertouch;
#X obj 323 233 cyclone/comment 0 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Pitch Bend;
#X obj 413 218 cyclone/comment 0 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Channel;
#X text 173 376 <value/controller number> pairs from control messages
, f 60;
#X text 173 357 <aftertouch/pitch> pairs from polyphonic aftertouch
messages;
#X text 173 338 <pitch/velocity> pairs from note messages, f 60;
#X text 173 395 value from program change messages, f 60;
#X text 173 415 value from channel aftertouch messages, f 60;
#X text 173 434 value from pitch bend messages, f 60;
#X text 173 453 the MIDI channel number from raw MIDI message, f 60
;
#X obj 44 246 cyclone/comment 43 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Note in;
#X obj 98 244 cyclone/comment 0 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Poly touch;
#X obj 210 234 cyclone/comment 0 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Program;
#X text 122 90 [midiparse] receives raw MIDI data and retrieves different
MIDI messages from it.;
#X text 88 134 <= MIDI from a controller;
#X obj 381 216 nbx 2 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 324 216 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 268 216 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 211 217 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 42 227 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 52 208 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 98 187 unpack;
#X obj 98 227 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 108 208 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 155 187 unpack;
#X obj 155 227 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 165 208 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#N canvas 604 102 498 480 examples 0;
#X obj 200 308 cyclone/midiformat;
#X obj 200 348 cyclone/midiparse;
#X text 67 163 [midiparse] is the counterpart of the [midiformat] object.
;
#X obj 189 103 cyclone/midiparse, f 19;
#X obj 189 68 cyclone/seq;
#X text 53 22 [midiparse] is very useful to retrieve MIDI data from
the [seq] object.;
#X obj 200 242 makenote 127 500;
#X obj 200 216 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 200 389 unpack float float;
#X obj 200 418 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 305 418 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 200 269 pack float float;
#X connect 0 0 1 0;
#X connect 1 0 8 0;
#X connect 4 0 3 0;
#X connect 6 0 11 0;
#X connect 6 1 11 1;
#X connect 7 0 6 0;
#X connect 8 0 9 0;
#X connect 8 1 10 0;
#X connect 11 0 0 0;
#X restore 475 170 pd examples;
#X obj 42 163 cyclone/midiparse @hires 2, f 57;
#N canvas 482 327 795 404 hires 0;
#X text 420 12 The Pitch Bend message is composed of 3 numbers.;
#X text 420 34 The first one determines it's a Pitch Bend message and
it is 224 for channel 1 (225 for channel 2 \, and so on up to 239 for
channel 16).;
#X text 420 80 Then we have the two subsequent numbers that decode
the Pitch Bend Value. First there's the Least Significant Byte and
then the Most Significant Byte.;
#X text 420 127 The 7 bit messages set only the Most Significant Byte.
;
#X text 85 155 Check the formatted Pitch Bend messages below:;
#X text 18 12 By default \, [midiparse] retrieves a low resolution
7 bit (values from 0 to 127) for Pitch Bend messages \, but the 'hires'
message or attribute sets to a high resolution of 14 bits \, which
has been the usual resolution for Pitch Bend messages for a long time.
;
#X text 18 90 The possible values are 0 (default \, 7 bits) \, 1 (14
bit as float values from -1 to 1) and 2 (14 bits as integer values
from -8192 to 8191). The [midiformat] object \, which is the counterpart
\, also has the same parameters.;
#X msg 361 270 hires \$1;
#X obj 361 197 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -228856
-1 -1 2;
#X floatatom 361 247 5 0 0 0 - - -;
#X obj 496 215 hsl 128 15 -1 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 493 240 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 424 187 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 421 213 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 588 240 hsl 128 15 -8192 8191 0 0 empty empty empty -2 -8 0
10 -228856 -1 -1 0 1;
#X obj 585 264 nbx 6 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 361 301 cyclone/midiformat @hires 2;
#X text 87 197 0) 7 bit (integers from 0 to 127 \, default) =>;
#X text 87 212 1) 14 bit (floats from -1 to 1) ============>;
#X text 87 227 2) 14 bit (integers from -8192 to 8191) ====>;
#X obj 468 361 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 341 333 cyclone/midiparse @hires 2;
#X text 376 360 Pitch Bend ==>;
#X text 591 240 14 bit -8192 to 8191;
#X text 445 187 7 bit 0 to 127;
#X text 512 215 14 bit -1 to 1;
#X connect 7 0 16 0;
#X connect 7 0 21 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
#X connect 10 0 11 0;
#X connect 11 0 16 5;
#X connect 12 0 13 0;
#X connect 13 0 16 5;
#X connect 14 0 15 0;
#X connect 15 0 16 5;
#X connect 16 0 21 0;
#X connect 21 5 20 0;
#X restore 493 193 pd hires;
#X obj 2 505 cnv 3 550 3 empty empty attribute 8 12 0 13 -228856 -1
0;
#X text 122 512 @hires <0 \, 1 \, 2> - pitch bend precision (see example
above);
#X text 173 294 clears object's memory of received MIDI data;
#X text 160 311 -;
#X text 95 311 hires <f>;
#X text 175 311 sets 14-bit pitch bend input precision (see example
above);
#X obj 378 233 cyclone/comment 215 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 (-8192 to 8191 in @hires 2);
#X obj 17 58 cyclone/comment 0 14 DejaVu\ Sans\ Mono empty 0 0 0 0
0 255 255 255 0 0 Retrieve MIDI messages;
#X obj 16 5 cyclone/comment 0 33 DejaVu\ Sans\ Mono empty 0 0 0 0 0
255 255 255 0 0 midiparse;
#X obj 322 29 cyclone/comment 0 13 DejaVu\ Sans\ Mono empty 0 224 228
220 0 255 255 255 0 0 Objects cloned from Max/MSP;
#X obj 363 5 cyclone/comment 0 24 DejaVu\ Sans\ Mono empty 0 224 228
220 0 255 255 255 0 0 cyclone;
#X connect 11 0 68 0;
#X connect 37 0 59 0;
#X connect 37 1 60 0;
#X connect 61 0 62 0;
#X connect 61 1 63 0;
#X connect 64 0 65 0;
#X connect 64 1 66 0;
#X connect 68 0 37 0;
#X connect 68 1 61 0;
#X connect 68 2 64 0;
#X connect 68 3 58 0;
#X connect 68 4 57 0;
#X connect 68 5 56 0;
#X connect 68 6 55 0;
