-
Notifications
You must be signed in to change notification settings - Fork 13
/
bl-tri2.mmb~.pd
158 lines (158 loc) · 4.02 KB
/
bl-tri2.mmb~.pd
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
#N canvas 425 22 917 809 10;
#X obj 104 68 inlet~;
#X obj 355 95 samplerate~;
#X obj 355 152 / 2;
#X obj 355 10 loadbang;
#X obj 341 202 /~;
#X obj 114 728 outlet~;
#X obj 113 687 lin-xfade.mmb~;
#X obj 259 652 /~ 1;
#X obj 259 628 -~ 30;
#X obj 449 84 v \$1-bl-maxsamprate.mmb;
#X obj 355 125 min 44100;
#X obj 355 62 t b b;
#X obj 449 111 sel 0;
#X msg 449 135 44100;
#X obj 449 51 r \$1-bl-getmaxsamprate.mmb;
#X obj 390 199 / 30;
#X obj 390 224 int;
#X obj 390 269 s \$0-maxharmonics;
#X obj 390 246 - 1;
#N canvas 495 50 818 674 triangle 0;
#X obj 467 317 expr~ if($v1<1 \, $v1 \, 2-$v1);
#X obj 404 103 expr~ abs(fmod($v1 \, 2));
#X obj 100 307 *~ 1027;
#X obj 100 330 +~ 1;
#X obj 100 245 -~;
#X obj 100 280 clip~ 0 1;
#X obj 176 112 expr~ int($v1);
#X obj 282 307 *~ 1027;
#X obj 282 330 +~ 1;
#X obj 282 245 -~;
#X obj 282 280 clip~ 0 1;
#X obj 80 111 *~ 1024;
#X obj 80 356 +~;
#X obj 262 356 +~;
#X obj 207 424 lin-xfade.mmb~;
#X obj 80 46 inlet~;
#X text 95 64 phasor;
#X obj 290 46 inlet~;
#X text 338 52 number of harmonics;
#X obj 207 462 outlet~;
#X text 543 340 ping pong crossfader;
#X text 439 383 evens;
#X text 41 382 odds;
#X text 447 162 <-- these guys make sure that one tabread is using
on less harmonic than the other. If int(harmonics) is even \, then
odds has on less harmonic \, and vise versa. They switch when the crossfader
brings them to silence.;
#X obj 163 243 r \$0-maxharmonics;
#X obj 339 161 expr~ $v1<1;
#X obj 340 200 expr~ $v1>1;
#X obj 80 383 tabread4~ \$1-bl-tritable.mmb;
#X obj 262 384 tabread4~ \$1-bl-tritable.mmb;
#X connect 0 0 14 2;
#X connect 1 0 0 0;
#X connect 1 0 25 0;
#X connect 1 0 26 0;
#X connect 2 0 3 0;
#X connect 3 0 12 1;
#X connect 4 0 5 0;
#X connect 5 0 2 0;
#X connect 6 0 4 0;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 8 0 13 1;
#X connect 9 0 10 0;
#X connect 10 0 7 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 27 0;
#X connect 13 0 28 0;
#X connect 14 0 19 0;
#X connect 15 0 11 0;
#X connect 17 0 6 0;
#X connect 17 0 1 0;
#X connect 24 0 5 2;
#X connect 24 0 10 2;
#X connect 25 0 4 1;
#X connect 26 0 9 1;
#X connect 27 0 14 0;
#X connect 28 0 14 1;
#X restore 175 299 pd triangle;
#X obj 81 528 wrap~ 0.5;
#X obj 81 552 expr~ if($v1>.5 \, 1-$v1 \, $v1);
#X obj 81 487 +~ 1.25;
#X obj 80 578 *~ 4;
#X obj 80 600 -~ 1;
#X obj 355 32 t b b;
#N canvas 0 22 715 533 check.for.bl-init 0;
#X obj 147 74 inlet;
#X obj 192 129 s \$1-bl-init.ping.mmb;
#X obj 147 96 t b b;
#X obj 192 163 r \$1-bl-init.pong.mmb;
#X msg 192 187 0;
#X obj 147 211 spigot 1;
#X obj 147 369 s pd-\$0-bl-init;
#N canvas 761 22 450 300 \$0-bl-init 0;
#X restore 363 394 pd \$0-bl-init;
#X text 154 446 This pings [bl-init.mmb \$1] and creates an instance
of it if it does not exist.;
#X obj 147 235 f \$1;
#X msg 174 333 obj 20 20 bl-init.mmb \$1 \, loadbang;
#X obj 147 264 sel 0;
#X msg 147 303 obj 20 20 bl-init.mmb \, loadbang;
#X text 351 295 apparently no argument doesn't mean \$1 in [send] and
[receive] will be 0;
#X connect 0 0 2 0;
#X connect 2 0 5 0;
#X connect 2 1 1 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 9 0;
#X connect 9 0 11 0;
#X connect 10 0 6 0;
#X connect 11 0 12 0;
#X connect 11 1 10 0;
#X connect 12 0 6 0;
#X restore 399 32 pd check.for.bl-init;
#X obj 184 68 inlet~;
#X text 99 36 phasor;
#X text 182 37 freq;
#X obj 281 23 r pd;
#X obj 281 45 route dsp;
#X obj 281 67 sel 1;
#X connect 0 0 19 0;
#X connect 0 0 22 0;
#X connect 1 0 10 0;
#X connect 2 0 4 0;
#X connect 2 0 15 0;
#X connect 3 0 25 0;
#X connect 4 0 19 1;
#X connect 6 0 5 0;
#X connect 7 0 6 2;
#X connect 8 0 7 0;
#X connect 9 0 12 0;
#X connect 10 0 2 0;
#X connect 11 0 1 0;
#X connect 11 1 9 0;
#X connect 12 0 13 0;
#X connect 12 1 10 1;
#X connect 13 0 10 1;
#X connect 14 0 9 0;
#X connect 15 0 16 0;
#X connect 16 0 18 0;
#X connect 18 0 17 0;
#X connect 19 0 6 1;
#X connect 20 0 21 0;
#X connect 21 0 23 0;
#X connect 22 0 20 0;
#X connect 23 0 24 0;
#X connect 24 0 6 0;
#X connect 25 0 11 0;
#X connect 25 1 26 0;
#X connect 27 0 4 1;
#X connect 27 0 8 0;
#X connect 30 0 31 0;
#X connect 31 0 32 0;
#X connect 32 0 11 0;