#N canvas 458 59 559 595 10;
#X obj 2 324 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 2 485 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 2 513 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 83 464 cnv 17 3 17 empty empty 6 5 9 0 16 -228856 -162280 0
;
#X msg 134 171 88 127;
#X obj 104 293 midiout;
#X msg 185 132 90 88;
#X obj 83 491 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 83 364 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 83 384 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X obj 83 404 cnv 17 3 17 empty empty 3 5 9 0 16 -228856 -162280 0
;
#X obj 83 424 cnv 17 3 17 empty empty 4 5 9 0 16 -228856 -162280 0
;
#X obj 83 444 cnv 17 3 17 empty empty 5 5 9 0 16 -228856 -162280 0
;
#X obj 83 331 cnv 17 3 29 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 2 591 cnv 1 550 1 empty empty empty 0 0 0 4 -262144 -262144
0;
#X obj 2 570 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#X msg 152 194 88 0;
#X text 167 405 -;
#X text 126 405 float;
#X text 167 426 -;
#X text 126 426 float;
#X text 167 446 -;
#X text 126 446 float;
#X text 167 465 -;
#X text 126 465 float;
#X text 167 332 -;
#X text 167 366 -;
#X text 167 385 -;
#X text 167 492 -;
#X text 126 492 float;
#X text 167 518 -;
#X text 108 519 1) float;
#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 89 152 cyclone/comment 100 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 <Note / Velocity>;
#X obj 223 134 cyclone/comment 285 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Polyphonic Aftetoutch;
#X text 97 170 Note;
#X text 89 189 On/Off;
#X obj 283 181 cyclone/comment 100 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Program Change;
#X obj 310 202 cyclone/comment 100 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Channel Aftertouch;
#X obj 339 221 cyclone/comment 215 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 Pitch Bend (-8192 to 8191 in @hires 2);
#X obj 362 241 cyclone/comment 100 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 MIDI Channel;
#X obj 242 180 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 328 239 nbx 2 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 271 200 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 299 219 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 333 134 cyclone/comment 285 11 helvetica empty 0 0 0 0 0 255
255 255 0 0 <pitch \, pressure>;
#X obj 157 293 print raw_midi;
#X text 132 332 list;
#X text 132 366 list;
#X text 132 385 list;
#X msg 214 156 127 1;
#X obj 258 159 cyclone/comment 0 11 helvetica empty 0 0 0 0 0 255 255
255 0 0 Control Change <value \, control #>;
#X text 182 332 <pitch/velocity> pairs for note on/off messages;
#X text 182 405 program change value for program change message, f
59;
#X text 182 426 channel aftertouch value for channel aftertouch message
, f 59;
#X text 182 446 pitch bend value for pitch bend message, f 59;
#X text 182 492 raw MIDI messages, f 60;
#X text 182 519 channel number (default 1), f 58;
#X text 51 87 [midiformat] receives different MIDI information in each
inlet and formats to a raw MIDI message output.;
#X text 183 366 <aftertouch/pitch> pairs for polyphonic aftertouch
messages;
#X text 182 385 <value/controller number> pairs for control messages
;
#X text 182 465 channel number (wraps at 16) - doesn't output MIDI
messages;
#N canvas 863 73 414 536 examples 0;
#X obj 131 70 makenote 127 250;
#X obj 131 101 pack;
#X obj 131 133 cyclone/midiformat;
#X obj 131 165 cyclone/seq;
#X text 25 15 using [midiformat] to get note messages from a [makenote]
object and send it to a [seq] object;
#X text 35 222 [midiformat] is the counterpart of the [midiparse] object.
Please check it too.;
#X obj 195 363 cyclone/midiformat;
#X obj 195 403 cyclone/midiparse;
#X obj 195 297 makenote 127 500;
#X obj 195 324 pack;
#X obj 195 271 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 195 444 unpack float float;
#X obj 195 473 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 300 473 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 6 0 7 0;
#X connect 7 0 11 0;
#X connect 8 0 9 0;
#X connect 8 1 9 1;
#X connect 9 0 6 0;
#X connect 10 0 8 0;
#X connect 11 0 12 0;
#X connect 11 1 13 0;
#X restore 468 266 pd examples;
#X obj 157 260 cyclone/midiformat 5 @hires 2;
#N canvas 341 79 805 403 hires 0;
#X text 21 17 By default \, [midiformat] receives 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 msg 331 269 hires \$1;
#X obj 331 196 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -228856
-1 -1 2;
#X floatatom 331 246 5 0 0 0 - - -;
#X obj 466 214 hsl 128 15 -1 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 463 239 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 394 186 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 391 212 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 558 239 hsl 128 15 -8192 8191 0 0 empty empty empty -2 -8 0
10 -228856 -1 -1 0 1;
#X obj 555 263 nbx 6 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 423 17 The Pitch Bend message is composed of 3 numbers.;
#X text 423 39 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 423 85 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 423 132 The 7 bit messages set only the Most Significant Byte.
;
#X obj 331 300 cyclone/midiformat @hires 2;
#X text 57 196 0) 7 bit (integers from 0 to 127 \, default) =>;
#X text 57 211 1) 14 bit (floats from -1 to 1) ============>;
#X text 57 226 2) 14 bit (integers from -8192 to 8191) ====>;
#X obj 438 360 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 79 160 Check the formatted Pitch Bend messages below:;
#X obj 311 332 cyclone/midiparse @hires 2;
#X text 346 359 Pitch Bend ==>;
#X text 561 239 14 bit -8192 to 8191;
#X text 415 186 7 bit 0 to 127;
#X text 482 214 14 bit -1 to 1;
#X text 21 94 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 [midiparse] object \, which is the counterpart
\, also has the same parameters.;
#X obj 504 326 print MIDI_FORMAT;
#X connect 1 0 14 0;
#X connect 1 0 20 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X connect 4 0 5 0;
#X connect 5 0 14 5;
#X connect 6 0 7 0;
#X connect 7 0 14 5;
#X connect 8 0 9 0;
#X connect 9 0 14 5;
#X connect 14 0 20 0;
#X connect 14 0 26 0;
#X connect 20 5 18 0;
#X restore 486 289 pd hires;
#X text 167 347 -;
#X text 102 347 hires <f>;
#X text 182 347 sets 14-bit pitch bend input precision (see example
above);
#X obj 2 540 cnv 3 550 3 empty empty attribute 8 12 0 13 -228856 -1
0;
#X text 122 547 @hires <0 \, 1 \, 2> - pitch bend precision (see example
above);
#X obj 17 58 cyclone/comment 0 14 DejaVu\ Sans\ Mono empty 0 0 0 0
0 255 255 255 0 0 Format MIDI messages;
#X obj 16 5 cyclone/comment 0 33 DejaVu\ Sans\ Mono empty 0 0 0 0 0
255 255 255 0 0 midiformat;
#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 4 0 66 0;
#X connect 6 0 66 1;
#X connect 16 0 66 0;
#X connect 44 0 66 3;
#X connect 45 0 66 6;
#X connect 46 0 66 4;
#X connect 47 0 66 5;
#X connect 53 0 66 2;
#X connect 66 0 5 0;
#X connect 66 0 49 0;
