#N canvas 609 23 559 620 10;
#X obj 3 594 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289
0;
#X obj 3 404 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 3 482 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 3 536 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 121 412 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X obj 121 433 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X obj 121 456 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0
;
#X obj 119 491 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0
;
#X text 183 491 signal;
#X text 236 491 - the pulse train signal;
#X text 171 543 1) float;
#X text 171 558 2) float;
#X text 171 573 3) float;
#X obj 119 513 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0
;
#X text 195 513 bang;
#X text 236 513 - when transition from 0 to 1 occurs;
#X text 148 457 float/signal;
#X text 148 413 float/signal;
#X text 148 435 float/signal;
#X text 236 413 - pulse period (in ms);
#X text 236 435 - pulse width (0-1);
#X text 236 457 - onset phase offset (0-1);
#X text 235 542 - period in ms (default 1000), f 42;
#X text 235 557 - pulse width from 0-1 (default 0.5), f 42;
#X text 235 573 - onset phase offset from 0-1 (default 0), f 42;
#X text 91 88 [train~] generates a pulse signal alternating from on
(1) to off (0) at a period given in ms. It also sends a bang when going
from 0 to 1 \, so it can be used as a metronome., f 57;
#X obj 2 4 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 3 graph;
#X obj 305 4 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 3 pd;
#X text 91 129 A pulse width of 0 has the smallest "on" pulse size
(a single sample) \, while a pulse width of 1 has the largest (the
entire period except the last sample). The "onset phase" delays the
"on" portion by a fraction of the total pulse period.;
#X obj 19 54 cyclone/comment 0 14 DejaVu\ Sans\ Mono empty 0 0 0 0
0 255 255 255 0 0 Pulse-train generator and metronome;
#X obj 16 2 cyclone/comment 0 33 DejaVu\ Sans\ Mono empty 0 0 0 0 0
255 255 255 0 0 train~;
#X obj 322 28 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 4 cyclone/comment 0 24 DejaVu\ Sans\ Mono empty 0 224 228
220 0 255 255 255 0 0 cyclone;
#X obj 499 69 cyclone/setdsp~;
#N canvas 853 206 335 379 example 0;
#X obj 242 136 bng 30 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X obj 68 144 cyclone/sah~;
#X obj 68 264 cyclone/cycle~;
#X obj 68 108 noise~;
#X obj 68 201 cyclone/scale~ -1 1 500 1000;
#X obj 68 300 ./out~;
#X text 133 62 period;
#X text 114 81 ms;
#X obj 137 82 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X text 48 25 [train~] used to trigger the [sah~] object.;
#X obj 84 171 cyclone/number~;
#A saved 0 0 100 -inf inf #2a3434 #ffffff #b6fefd;
#X obj 86 232 cyclone/number~;
#A saved 0 0 100 -inf inf #2a3434 #ffffff #b6fefd;
#X obj 137 109 cyclone/train~ 500;
#X connect 1 0 4 0;
#X connect 1 0 10 0;
#X connect 2 0 5 0;
#X connect 2 0 5 1;
#X connect 3 0 1 0;
#X connect 4 0 2 0;
#X connect 4 0 11 0;
#X connect 8 0 12 0;
#X connect 12 0 1 1;
#X connect 12 1 0 0;
#X restore 471 343 pd example;
#X obj 303 301 bng 30 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X obj 232 195 hsl 128 16 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X obj 306 224 hsl 128 16 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X text 242 195 pulse width (0-1);
#X text 142 378 0;
#X text 142 296 1;
#X obj 156 301 cyclone/scope~ 131 88 147 3 64 -0.015 1.015 0 0 0 0
205 229 232 74 79 77 96 98 102 0 empty;
#X text 315 224 onset phase (0-1);
#X text 152 213 period;
#X text 133 232 ms;
#X obj 156 270 cyclone/train~ 1000 0.5, f 25;
#X obj 303 245 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 229 245 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 156 233 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#N canvas 875 190 538 383 onset 0;
#X obj 174 307 bng 30 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X obj 63 280 cyclone/train~ 1000;
#X obj 339 304 bng 30 250 50 0 empty empty empty 17 7 0 10 -228856
-1 -1;
#X obj 228 277 cyclone/train~ 1000;
#X obj 342 225 hsl 128 16 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 1;
#X text 351 225 onset phase (0-1);
#X obj 339 250 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-228856 -1 -1 0 256;
#X obj 339 187 tgl 25 0 empty empty empty 17 7 0 10 -228856 -1 -1 0
1;
#X text 75 40 The original object in MAX/MSP has a very weird behaviour
for the onset that just seems buggy so it was not ported to Cyclone
- though we still have something similar.;
#X text 76 86 It is important to note that the onset does not behave
as a "phase offset". The onset is from 0 to 1 \, so an onset of "1"
will delay the [train~] object for one period long. You can use it
to delay one object and make two of them out of sync.;
#X text 77 142 Play with this example below to see how it goes.;
#X connect 1 1 0 0;
#X connect 3 1 2 0;
#X connect 4 0 6 0;
#X connect 6 0 3 2;
#X connect 7 0 4 0;
#X restore 483 368 pd onset;
#X connect 38 0 49 0;
#X connect 39 0 48 0;
#X connect 47 0 43 0;
#X connect 47 1 37 0;
#X connect 48 0 47 2;
#X connect 49 0 47 1;
#X connect 50 0 47 0;
