File: seq-help.pd

package info (click to toggle)
pd-cyclone 0.9.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,860 kB
  • sloc: ansic: 38,656; makefile: 318; tcl: 81
file content (537 lines) | stat: -rw-r--r-- 19,563 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
#N canvas 395 51 562 648 10;
#X declare -stdpath ./;
#X obj 2 277 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 523 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 572 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 72 530 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 338 168 bng 15 250 50 0 empty empty empty 0 -6 0 10 #dcdcdc #000000 #000000;
#X obj 72 551 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 2 620 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 227 119 bng 18 250 50 0 empty bng_play empty 17 7 0 10 #d0d0d0 #404040 #000000;
#X text 156 282 bang;
#X text 150 296 float;
#X text 197 119 Play;
#X obj 227 169 print;
#X obj 72 284 cnv 17 3 234 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 191 553 sent at the end of a sequence (useful for looping);
#X text 144 377 append -;
#X text 198 377 records at the end of the stored sequence, f 57;
#X text 102 433 delay <float> -;
#X text 108 461 hook <float> -;
#X text 198 433 onset time in ms of the first event, f 57;
#X text 140 531 float -;
#X text 146 552 bang -;
#X text 116 577 1) symbol -;
#X msg 254 120 stop;
#X text 186 296 - raw MIDI data stream to be recorded, f 59;
#X text 191 531 raw MIDI data stream from played sequence;
#X text 356 168 <= when finished;
#X text 150 475 print -;
#X text 102 325 start <float> -;
#X text 102 311 read <symbol> -;
#X text 96 419 write <symbol> -;
#X text 144 363 record -;
#X text 156 349 stop -;
#X text 156 405 tick -;
#X text 198 363 starts recording raw MIDI received in the inlet, f 57;
#X text 198 405 external clock \, needed after 'start -1' message, f 57;
#X text 186 282 - starts or restarts playing a sequence at normal speed, f 59;
#X text 198 349 stops recording/playing and goes back to start, f 57;
#X text 66 82 [seq] plays/records raw MIDI streams and can save/read MIDI sequence files. All tracks of a multi-track midi file are merged into one.;
#N canvas 699 177 647 362 start 0;
#X obj 397 101 metro;
#X msg 397 127 tick;
#X obj 397 78 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 397 24 loadbang;
#X text 38 163 Note that the 'start' message can only set the speed once (at the start of the sequence) - because every time we send the start message \, it starts playing from the start! Thus \, a bang or a 'start' message can also be used to 'restart' the sequence., f 37;
#X obj 439 117 nbx 7 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 439 95 expr 60000 / ($f1 * 24);
#X text 514 114 tick time in ms, f 9;
#X msg 439 51 120;
#X obj 439 72 nbx 3 14 30 240 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 479 72 BPM;
#X msg 285 135 stop;
#X obj 397 238 cyclone/midiparse;
#X obj 397 213 cyclone/midiflush;
#N canvas 638 210 345 266 polysynth 0;
#X obj 65 20 inlet;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 41 151 pd synth;
#X obj 65 84 pack f f f;
#X obj 100 207 outlet~;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 100 151 pd synth;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 161 152 pd synth;
#X text 124 19 3-voice polyphonic synth;
#X obj 65 115 route 1 2 3, f 18;
#X obj 65 52 poly 3 1;
#X connect 0 0 8 0;
#X connect 1 0 3 0;
#X connect 2 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 3 0;
#X connect 7 0 1 0;
#X connect 7 1 4 0;
#X connect 7 2 5 0;
#X connect 8 0 2 0;
#X connect 8 1 2 1;
#X connect 8 2 2 2;
#X restore 397 264 pd polysynth;
#X obj 285 168 b;
#X obj 397 187 cyclone/seq seq.mid, f 20;
#X text 38 20 The 'start' message starts reading the loaded sequence and also allows you to control the playback speed set by the float after the 'start' message - the normal speed is set as 'start 1024' \, so 'start 512' is half the tempo (reads two times slower) \, 'start 2048' is twice the tempo (two times faster) and so on. If you send it just "start" \, it plays at the original speed (so it's the same as the bang message or 'start 1024')., f 37;
#X obj 514 213 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X msg 325 135 start \$1;
#X obj 325 113 f;
#X msg 325 45 -1;
#X msg 344 89 512;
#X msg 332 67 2048;
#X obj 514 236 s \$0-loop;
#X obj 296 23 r \$0-loop;
#X msg 434 154 start;
#X obj 408 154 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 474 155 (same as start 1024);
#X text 37 246 When you send it "start -1" \, it expects 'tick' messages as the clock \, so you can use it to vary the playback tempo or to synchronize with another clock (such as incoming MIDI Clock messages). 24 clock ticks is a quarter note \, you can convert BPM to time per clock tick as to the right., f 37;
#X obj 397 290 output~;
#X connect 0 0 1 0;
#X connect 1 0 16 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 3 0 8 0;
#X connect 5 0 0 1;
#X connect 6 0 5 0;
#X connect 8 0 9 0;
#X connect 9 0 6 0;
#X connect 11 0 16 0;
#X connect 11 0 15 0;
#X connect 12 0 14 0;
#X connect 13 0 12 0;
#X connect 14 0 30 0;
#X connect 15 0 13 0;
#X connect 16 0 13 0;
#X connect 16 1 18 0;
#X connect 18 0 24 0;
#X connect 19 0 16 0;
#X connect 20 0 19 0;
#X connect 21 0 20 0;
#X connect 22 0 20 0;
#X connect 23 0 20 0;
#X connect 25 0 20 0;
#X connect 26 0 16 0;
#X connect 27 0 16 0;
#X restore 492 144 pd start;
#X obj 227 146 cyclone/seq seq.mid;
#N canvas 410 267 401 256 inconsistencies 0;
#X text 31 24 The [seq] object in cyclone has two extra messages that the original does not have: pause and continue. It also misses the 'dump' message from the original MAX version \, which is something that doesn't seem to be really useful in MAX., f 56;
#X text 31 88 Moreover \, the [seq] object in cyclone can be clicked to open an edit window \, while nothing like this is present in the MAX original. Nonetheless \, this can be seen as a substitute for the purpose that the 'dump' message serves., f 56;
#X text 31 153 Since Max 7.3.2 \, there's support for MIDI Type 1 and you can save midi files in this format with separate tracks if you give a non zero argument to the 'write' message. Cyclone hasn't been updated to do this so it has the old behaviour from MAX that it always merges all tracks into one and always saves as format 1 as well., f 56;
#X restore 24 160 pd inconsistencies;
#X text 150 489 pause -;
#X text 132 503 continue -;
#X text 198 309 reads from MIDI/text files (no symbol opens a dialog box);
#X text 198 419 saves to MIDI/text files (no symbol opens a dialog box), f 57;
#X text 191 577 a MIDI/text file to be loaded;
#N canvas 871 85 493 491 text 0;
#X text 38 39 Besides MIDI files \, [seq] can load and save to .txt files \, just use this extension isntead. The text file follows a format that is also present in the edit window of the [seq] object that opens when you click on the object (note that this edit window functionality is not present in the original MAX object)., f 67;
#X obj 128 133 cyclone/seq seq.mid;
#X text 253 133 <= click to open;
#X text 136 284 0 144 60 112 \; 1000 144 60 0 \; 1500 192 31 \; 1500 144 60 112 \; 2500 144 60 0 \;, f 17;
#X text 39 192 The text format displays the MIDI events in lines separated by semicolons \, which consist of a start time in milliseconds (the time elapsed since the beginning of the sequence) followed by the raw bytes of the MIDI message., f 67;
#X text 39 371 This sequence plays the note middle C on channel 1 (with a velocity of 112) for one second \, then half a second later changes to program number 31 and plays middle C again for one second., f 67;
#X text 40 424 You can edit and close/save changes to the sequence \, but you need to write it to a file so it's saved., f 67;
#X obj 298 257 cyclone/seq seq.txt;
#X text 38 256 For example \, let's check this sequence ==> (also below):, f 42;
#X restore 498 123 pd text;
#X obj 2 596 cnv 3 550 3 empty empty click 8 12 0 13 #dcdcdc #000000 0;
#X text 198 324 start/restart sequence at a given tempo (default '1024' - normal tempo) \, 'start -1' expects tick messages;
#X text 150 391 clear -;
#X text 198 391 clears the sequence currently stored in the object, f 57;
#X text 159 601 opens a window to write/edit the sequence;
#X text 198 461 multiplies all the event times by the given number, f 57;
#N canvas 779 96 526 534 more 0;
#X msg 91 271 delay 500;
#X msg 128 360 pause;
#X msg 136 382 continue;
#X msg 121 337 print;
#X obj 289 368 cyclone/midiparse;
#X obj 289 189 tgl 22 0 empty empty empty 17 7 0 10 #d0d0d0 #404040 #000000 0 1;
#X msg 317 254 stop;
#X obj 289 253 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 319 191 play/stop;
#X obj 289 340 cyclone/midiflush;
#X msg 249 254 bang;
#X obj 289 221 select 1 0;
#N canvas 638 210 345 266 polysynth 0;
#X obj 65 20 inlet;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 41 151 pd synth;
#X obj 65 84 pack f f f;
#X obj 100 207 outlet~;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 100 151 pd synth;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 161 152 pd synth;
#X text 124 19 3-voice polyphonic synth;
#X obj 65 115 route 1 2 3, f 18;
#X obj 65 52 poly 3 1;
#X connect 0 0 8 0;
#X connect 1 0 3 0;
#X connect 2 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 3 0;
#X connect 7 0 1 0;
#X connect 7 1 4 0;
#X connect 7 2 5 0;
#X connect 8 0 2 0;
#X connect 8 1 2 1;
#X connect 8 2 2 2;
#X restore 289 401 pd polysynth;
#X obj 101 430 s \$0-more-messages;
#X obj 369 268 r \$0-more-messages;
#X msg 104 293 hook 2;
#X msg 112 312 hook 0.5;
#X text 18 65 The 'hook' message multiplies all the event times by the given number \, so '2' is twice as long and '0.5' is twice as fast. This is cumulative \, so you can keep speeding up or slowing it down by sending the same message multiple times., f 79;
#X text 18 105 The 'print' message prints the first 16 events of the sequence in the Pd Window in the same format as the edit window., f 79;
#X text 18 134 Cyclone has extra messages: pause and continue do the obvious and only work when playing (not when recording)., f 79;
#X obj 289 310 cyclone/seq seq.mid;
#X msg 68 245 addeventdelay 100;
#X msg 54 223 addeventdelay -100;
#X text 18 16 The delay message sets an onset delay time in ms to the start of the sequence. The addeventdelay message adds (or subtracts) to the onset delay and is cumulative (keeps adding/subtracting if you send the same message multiple times)., f 79;
#X obj 289 438 output~;
#X connect 0 0 13 0;
#X connect 1 0 13 0;
#X connect 2 0 13 0;
#X connect 3 0 13 0;
#X connect 4 0 12 0;
#X connect 5 0 11 0;
#X connect 6 0 20 0;
#X connect 7 0 20 0;
#X connect 9 0 4 0;
#X connect 10 0 9 0;
#X connect 11 0 7 0;
#X connect 11 1 6 0;
#X connect 11 1 10 0;
#X connect 12 0 24 0;
#X connect 14 0 20 0;
#X connect 15 0 13 0;
#X connect 16 0 13 0;
#X connect 20 0 9 0;
#X connect 20 1 7 0;
#X connect 21 0 13 0;
#X connect 22 0 13 0;
#X restore 498 165 pd more;
#X text 198 503 continues playing after a pause message was given, f 57;
#X text 198 489 pauses playing, f 57;
#N canvas 482 115 884 498 basic 0;
#X obj 150 319 cyclone/midiparse;
#X obj 179 149 tgl 22 0 empty empty empty 17 7 0 10 #d0d0d0 #404040 #000000 0 1;
#X msg 186 216 stop;
#X obj 150 220 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 209 151 play/stop;
#X obj 150 291 cyclone/midiflush;
#X msg 255 251 bang;
#X text 289 244 flush hanging;
#X text 291 258 MIDI notes;
#X msg 470 144 record;
#X obj 600 149 midiin;
#X obj 609 178 notein;
#X obj 609 238 cyclone/midiformat;
#X obj 609 202 pack;
#X obj 179 181 select 1 0;
#X obj 84 154 loadbang;
#X msg 44 180 read;
#X msg 439 200 write;
#X obj 471 390 cyclone/midiparse;
#X obj 614 390 cyclone/midiformat;
#X obj 545 426 cyclone/midiflush;
#X text 249 367 synthesizer, f 18;
#N canvas 638 210 345 266 polysynth 0;
#X obj 65 20 inlet;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 41 151 pd synth;
#X obj 65 84 pack f f f;
#X obj 100 207 outlet~;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 100 151 pd synth;
#N canvas 667 245 370 323 synth 0;
#X obj 234 124 / 127;
#X obj 219 204 *~;
#X obj 81 134 phasor~;
#X obj 81 102 mtof;
#X obj 81 31 inlet;
#X obj 219 273 outlet~;
#X obj 81 70 unpack float float;
#X obj 234 174 vline~;
#X msg 234 149 \$1 50;
#X obj 81 162 cyclone/triangle~ 0.9;
#X obj 219 236 /~ 3;
#X connect 0 0 8 0;
#X connect 1 0 10 0;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 0 0;
#X connect 7 0 1 1;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 5 0;
#X restore 161 152 pd synth;
#X text 124 19 3-voice polyphonic synth;
#X obj 65 115 route 1 2 3, f 18;
#X obj 65 52 poly 3 1;
#X connect 0 0 8 0;
#X connect 1 0 3 0;
#X connect 2 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 3 0;
#X connect 7 0 1 0;
#X connect 7 1 4 0;
#X connect 7 2 5 0;
#X connect 8 0 2 0;
#X connect 8 1 2 1;
#X connect 8 2 2 2;
#X restore 150 352 pd polysynth;
#X text 231 352 <= 3 voice polyphonic;
#X msg 84 179 read seq.mid;
#X text 23 21 Below \, we play and stop with a toggle. At the end of the file \, a bang out the 2nd outlet of [seq] makes it play again in a loop. When you stop it with the toggle \, it also flushes possible hanging MIDI notes (with [midiflush]). We use [midiparse] to send note messages to our synth.;
#X text 414 77 Use 'write' to save to a MIDI file with the dialog box \, or use 'write <symbol>' to save to a specific file., f 59;
#X obj 150 251 cyclone/seq;
#X msg 519 144 stop;
#X msg 537 170 append;
#X obj 537 270 s \$0-seq;
#X obj 254 213 r \$0-seq;
#X text 414 25 You can directly record from raw MIDI data with [midiin]. Use the 'record' message to start recodring \, you don't need the stop message to switch from recording/playing. Use 'append' to record from the point you stopped recording.;
#X text 439 308 You can record from [makenote] or specialized MIDI objects such as [notein] using the [midiformat] object to convert the messages to raw MIDI. Please check the help file of [midiparse] \, [midiformat] and [midiflush] \, which are useful with [seq]., f 55;
#X obj 660 212 pack;
#X msg 660 166 60;
#X obj 660 191 makenote 120 100;
#X obj 660 142 metro 250;
#X obj 660 121 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X text 25 87 Use the 'read' message to open another file with the dialog box and 'read seq.mid' to re open the example. The 'delay' message adds a delay in ms before sending the first event.;
#X obj 150 388 output~;
#X obj 307 437 declare -stdpath ./;
#X connect 0 0 22 0;
#X connect 1 0 14 0;
#X connect 2 0 27 0;
#X connect 3 0 27 0;
#X connect 5 0 0 0;
#X connect 6 0 5 0;
#X connect 9 0 30 0;
#X connect 10 0 30 0;
#X connect 11 0 13 0;
#X connect 11 1 13 1;
#X connect 12 0 30 0;
#X connect 13 0 12 0;
#X connect 14 0 3 0;
#X connect 14 1 2 0;
#X connect 14 1 6 0;
#X connect 15 0 24 0;
#X connect 16 0 27 0;
#X connect 17 0 30 0;
#X connect 22 0 40 0;
#X connect 24 0 27 0;
#X connect 27 0 5 0;
#X connect 27 1 3 0;
#X connect 28 0 30 0;
#X connect 29 0 30 0;
#X connect 31 0 27 0;
#X connect 34 0 12 0;
#X connect 35 0 36 0;
#X connect 36 0 34 0;
#X connect 36 1 34 1;
#X connect 37 0 35 0;
#X connect 38 0 37 0;
#X restore 492 102 pd basic;
#X text 78 447 addeventdelay <f> -;
#X text 198 475 prints sequence's first 16 events in the Pd window, f 57;
#X text 198 447 adds (in ms) to the onset delay, f 57;
#X obj 5 3 ./header seq;
#X text 22 62 MIDI sequencer;
#X text 75 228 see also:;
#X obj 391 244 open-else;
#X text 422 216 click;
#X msg 391 216 midi;
#X text 143 222 Plugdata users or those with ELSE can also use [else/midi] as an alternative., f 39;
#X connect 7 0 39 0;
#X connect 22 0 39 0;
#X connect 39 0 11 0;
#X connect 39 1 4 0;
#X connect 65 0 63 0;