#N canvas 65 92 964 534 10;
#X floatatom 611 80 5 0 0 0 - - -;
#X obj 611 101 mtof;
#X floatatom 611 132 5 0 0 0 - - -;
#X obj 611 263 *~ 1;
#X obj 652 262 *~ 0;
#X obj 673 242 tgl 15 0 empty empty aliased 17 7 1 10 -262144 -1 -1
0 1;
#X obj 632 215 tgl 15 0 empty empty bandlim. 17 7 1 10 -262144 -1 -1
0 1;
#X obj 513 453 throw~ \$0-outl;
#X obj 804 453 throw~ \$0-outr;
#X obj 697 317 catch~ \$0-outr;
#X obj 684 292 catch~ \$0-outl;
#X obj 611 162 phasor~;
#X obj 610 352 soundoutput;
#N canvas 165 183 582 570 REFERENCE 0;
#X text 24 434 Tags:;
#X text 24 31 Name: u_splicetrans;
#X text 58 434 Audio \, Utility;
#X text 24 334 See also: [u_stereo];
#X text 23 58 Summary: Replace jumps in a phasor~ signal by a bandlimited
transition.;
#X text 24 100 Argument 0: <bool> if 0 use harm. 1 \, 3 for transition
table \, if 1 use harm. 1 \, 3 \, 5 for transition table.;
#X text 24 146 Inlet 0: phasor signal from 0-1;
#X text 24 166 Inlet 1: frequency of phasor signal;
#X text 24 186 Outlet 0: phasor signal from 0-1 with bandlimited jump.
;
#X text 24 233 Description: Replace jumps in a phasor~ signal by a
bandlimited transition.;
#X coords 0 -1 1 1 450 450 1 10 10;
#X restore 19 55 pd REFERENCE;
#X obj 19 24 cnv 15 450 27 empty empty empty 20 12 0 14 -261234 -66577
0;
#X obj 22 29 u_splicetrans;
#X text 530 492 RjDj Library (https://github.com/rjdj/rjlib) - 2011
;
#X text 489 54 Example:;
#X text 128 30 - Replace jumps in a phasor~ signal;
#X obj 611 188 u_splicetrans;
#N canvas 483 205 746 653 Extracting 0;
#X floatatom 45 74 5 0 0 1 frequency - -;
#X obj 101 155 wrap~;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-phasor-output 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 504 23 graph;
#X obj 45 102 phasor~ 0;
#X obj 36 244 -~;
#X obj 98 244 +~;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-wrap-output 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 505 158 graph;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-sum 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 506 293 graph;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-difference 882 float 0;
#X coords 0 1.02 882 -1.02 200 130 1;
#X restore 506 433 graph;
#X msg 172 180 bang;
#X text 102 8 BUCHLA'S METHOD;
#X text 511 567 ---- 0.02 seconds ----;
#X obj 125 99 s \$0-freq;
#N canvas 0 22 450 300 s 0;
#X obj 119 107 r \$0-freq;
#X obj 31 87 inlet~;
#X obj 29 158 outlet~;
#X obj 29 130 -~ 0.5;
#X obj 30 108 u_splicetrans;
#X connect 0 0 4 1;
#X connect 1 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
#X restore 102 180 pd s;
#N canvas 0 22 450 300 s 0;
#X obj 119 107 r \$0-freq;
#X obj 31 87 inlet~;
#X obj 30 168 outlet~;
#X obj 30 136 -~ 0.5;
#X obj 30 109 u_splicetrans;
#X connect 0 0 4 1;
#X connect 1 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
#X restore 44 181 pd s;
#X obj 45 50 mtof;
#X floatatom 45 31 5 0 0 0 - - -;
#X obj 172 215 tabwrite~ \$0-phasor-output;
#X obj 172 248 tabwrite~ \$0-wrap-output;
#X obj 172 282 tabwrite~ \$0-sum;
#X obj 172 327 tabwrite~ \$0-difference;
#X obj 37 383 outlet~;
#X obj 97 383 outlet~;
#X obj 101 130 -~ 0.5;
#X text 198 99 for [u_splicetrans];
#X floatatom 156 129 5 0 0 0 - - -;
#X obj 98 355 *~ 0;
#X obj 121 336 tgl 15 0 empty empty sum 17 7 1 10 -262144 -1 -1 0 1
;
#X obj 60 335 tgl 15 0 empty empty diff 17 7 1 10 -262144 -1 -1 0 1
;
#X obj 37 356 *~ 0;
#X text 27 414 [pd s] contains [u_splicetrans]. The important thing
to note here is: Always put [u_splicetrans] after any [wrap~] operations
you may be using! Otherwise [wrap] will destroy the hard-earned bandlimit
at the jumps.;
#X text 27 483 This is an example on how to use the bandlimited version
of phasor~ with u_splicetrans for constructing classical waveforms
like saw and square. It's a variation on the example patch K04.even.odd.pd
;
#X connect 0 0 3 0;
#X connect 0 0 12 0;
#X connect 1 0 13 0;
#X connect 3 0 14 0;
#X connect 3 0 23 0;
#X connect 4 0 20 0;
#X connect 4 0 29 0;
#X connect 5 0 19 0;
#X connect 5 0 26 0;
#X connect 9 0 17 0;
#X connect 9 0 18 0;
#X connect 9 0 19 0;
#X connect 9 0 20 0;
#X connect 13 0 4 1;
#X connect 13 0 5 1;
#X connect 13 0 18 0;
#X connect 14 0 5 0;
#X connect 14 0 4 0;
#X connect 14 0 17 0;
#X connect 15 0 0 0;
#X connect 16 0 15 0;
#X connect 23 0 1 0;
#X connect 25 0 23 1;
#X connect 26 0 22 0;
#X connect 27 0 26 1;
#X connect 28 0 29 1;
#X connect 29 0 21 0;
#X restore 513 433 pd Extracting harmonics from bandlimited phasor~
;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 11 0;
#X connect 2 0 19 1;
#X connect 3 0 12 0;
#X connect 3 0 12 1;
#X connect 4 0 12 0;
#X connect 4 0 12 1;
#X connect 5 0 4 1;
#X connect 6 0 3 1;
#X connect 9 0 12 1;
#X connect 10 0 12 0;
#X connect 11 0 4 0;
#X connect 11 0 19 0;
#X connect 19 0 3 0;
#X connect 20 0 7 0;
#X connect 20 1 8 0;
