-
Notifications
You must be signed in to change notification settings - Fork 1
/
bandlimited~-help.pd
156 lines (156 loc) · 4.9 KB
/
bandlimited~-help.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
#N canvas 415 103 692 489 10;
#X text 392 364 see:;
#X obj 447 -51 cnv 15 210 400 empty empty empty 20 12 0 14 -261682
-66577 0;
#X obj 537 144 mtof;
#X floatatom 537 123 5 0 0 0 - - -, f 5;
#X obj 527 302 dac~;
#X obj 458 179 bng 15 250 50 1 empty empty empty 17 7 0 10 -262144
-1 -1;
#X msg 575 200 0;
#X obj 540 203 sig~;
#X floatatom 539 175 5 0 0 0 - - -, f 5;
#X obj 580 136 samplerate~;
#X obj 579 115 loadbang;
#X obj 455 150 r \$0.set;
#N canvas 0 22 542 489 fader 0;
#X obj 97 310 dbtorms;
#X obj 100 102 vsl 30 64 101 1 1 0 empty empty empty 0 -9 0 10 -203904
-1 -1 0 1;
#X obj 93 238 - 1;
#X msg 93 260 100 \$1;
#X obj 94 282 -;
#X obj 96 372 outlet~;
#X obj 98 348 line~;
#X msg 102 325 \$1 2;
#X connect 0 0 7 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X coords 0 -1 1 1 30 70 2 100 100;
#X restore 576 249 pd fader;
#X obj 531 269 *~;
#X obj 581 158 / 575;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0.view 575 float 0;
#X coords 0 1 574 -1 200 140 1;
#X restore 452 -37 graph;
#X obj 500 324 tabwrite~ \$0.view;
#X obj -4 136 cnv 15 450 87 empty empty empty 20 12 0 14 -232576 -66577
0;
#X obj 264 160 s \$0.set;
#X msg 264 141 type square;
#X obj 176 161 s \$0.set;
#X msg 176 142 type triangle;
#X obj 342 162 s \$0.set;
#X msg 342 143 type sawtriangle;
#X text 5 157 The type method changes the;
#X obj -4 -2 cnv 15 450 65 empty empty empty 20 12 0 14 -203904 -66577
0;
#X msg 366 20 cutoff \$1;
#X floatatom 366 1 5 0 0 0 - - -, f 5;
#X obj 366 39 s \$0.set;
#X obj -4 60 cnv 15 450 75 empty empty empty 20 12 0 14 -170745 -66577
0;
#X floatatom 362 68 5 0 0 0 - - -, f 5;
#X obj 361 108 s \$0.set;
#X msg 362 87 max \$1;
#X text 1 62 The max method sets the maximum number of harmonics to
generate. Also acts like a low pass filter who's cut off frequency
is dependent on the frequency being generated. The default is 1104
which should cover all frequencies between 20hz and 22050 hz at 44.1kHz.
0 resets to 1104;
#X obj -4 224 cnv 15 450 125 empty empty empty 20 12 0 14 -200256 -66577
0;
#X obj 498 225 bandlimited~ saw 77.78;
#X obj 364 323 s \$0.set;
#X obj 365 284 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 365 302 approximate \$1;
#X text 2 255 bandlimited~ works by using a series of wavetables with
different quanities of harmonics. This is done to keep CPU usage at
a minimum. The wavetable with the highest harmonic content has a maximum
of 1104 harmonics. Any frequency below 20hz at 44.1kHz will start to
geometrically use more CPU power. By enabling the approximate method
it will use slightly less CPU and generate a close enough waveform.
;
#X text 2 224 creation arguments: [bandlimited~ type frequency max
cutoff;
#X text 360 223 approximate];
#X text 8 238 max cutoff approximate are optional \, 0 sets their defaults.
;
#X obj 422 358 bl.sq~ 0 1;
#X obj 401 381 bl.rsaw~ 0 1;
#X obj 565 358 bl.saw~ 0 1;
#X obj 491 358 bl.tri~ 0 1;
#X obj 480 381 bl.sawtri~ 0 1;
#X obj 573 380 bl.pulse~ 0 1;
#N canvas 0 22 563 298 dutycycle 0;
#X obj 45 82 +~ 1;
#X obj 55 203 s~ \$0.dc;
#X obj 43 54 osc~ 1.01;
#X obj 46 109 /~ 2;
#X obj 55 146 *~ 0.8;
#X obj 49 180 +~ 0.1;
#X text 141 46 The third inlet takes a signal value between 0 and 1
which corresponds to the dutycycle \, the ratio between pulse duration
and the period.;
#X text 144 93 A value of 0.5 will create a squarewave much like bl.sq~
(though computationally more expensive). Any other value will create
an assymetrical pulse wave.;
#X connect 0 0 3 0;
#X connect 2 0 0 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 1 0;
#X restore 245 386 pd dutycycle;
#X obj 606 193 r~ \$0.dc;
#X text 6 -51 Generates a bandlimited waveform (square \, pulse \,
saw \, reverse saw \, triangle and saw-triangle). It's porpuse is to
produce a signal without aliasing.;
#X text -1 -3 The cutoff method sets a limit to the number of harmonics
generated based on frequency. This acts much like a low pass filter.
By default the nyquist limit is set (cannot be set higher than this).
0 resets to the default.;
#X text 5 175 waveform being generated;
#X msg 194 182 type rsaw;
#X obj 194 201 s \$0.set;
#X obj 256 203 s \$0.set;
#X msg 256 184 type saw;
#X obj 320 203 s \$0.set;
#X msg 320 184 type pulse;
#X text 7 367 (C) Paulo Casaes \, 2010 Apache License 2;
#X text 33 389 v 1.0.0;
#X connect 2 0 8 0;
#X connect 3 0 2 0;
#X connect 5 0 6 0;
#X connect 5 0 16 0;
#X connect 6 0 35 1;
#X connect 7 0 35 0;
#X connect 8 0 7 0;
#X connect 9 0 14 0;
#X connect 10 0 9 0;
#X connect 11 0 5 0;
#X connect 11 0 35 0;
#X connect 12 0 13 1;
#X connect 13 0 4 0;
#X connect 13 0 4 1;
#X connect 14 0 8 0;
#X connect 19 0 18 0;
#X connect 21 0 20 0;
#X connect 23 0 22 0;
#X connect 26 0 28 0;
#X connect 27 0 26 0;
#X connect 30 0 32 0;
#X connect 32 0 31 0;
#X connect 35 0 13 0;
#X connect 35 0 16 0;
#X connect 37 0 38 0;
#X connect 38 0 36 0;
#X connect 50 0 35 2;
#X connect 54 0 55 0;
#X connect 57 0 56 0;
#X connect 59 0 58 0;