aboutsummaryrefslogtreecommitdiff
path: root/examples/lpc-cross-synthesis.pd
blob: e49ea4a8a7774e484ab66aff45073d3414b8fd7d (plain)
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
#N canvas 87 183 604 300 10;
#X obj 247 210 hsl 121 15 100 10000 0 1 empty empty filter-f -2 -6
0 8 -225280 -62784 -90133 3409 1;
#X floatatom 244 225 0 0 0 0 - - -;
#X obj 91 218 dac~;
#N canvas 0 0 453 387 lpc-resynth 0;
#X obj 27 199 lpreson~;
#X obj 28 244 hip~ 18;
#X obj 27 49 inlet~;
#X obj 145 64 inlet;
#X obj 202 34 inlet;
#X obj 99 118 inlet~;
#X obj 28 318 outlet~;
#X obj 27 94 hip~ 1000;
#X obj 99 135 hip~ 1000;
#X obj 27 216 lop~ 1000;
#X obj 316 54 inlet;
#X obj 27 111 lpc~ 32;
#X obj 27 152 *~ 1;
#X obj 99 152 *~ 0;
#X obj 202 51 sel 0 1;
#X text 164 280 filter with larger block sizes;
#X text 163 267 lpc~ produces a less glitchy;
#X msg 202 68 1;
#X msg 202 85 0;
#X msg 224 85 1;
#X msg 224 68 0;
#X text 294 23 pre-emphasis/;
#X text 275 36 de-emphasis frequency;
#X text 160 18 select excitation;
#X text 146 48 order;
#X obj 181 248 block~ 1024 2 1;
#X obj 28 284 *~;
#X obj 142 221 tabreceive~ hanning;
#X text 151 296 overlapping windows are essential;
#X text 151 308 otherwise clicks will result;
#X connect 0 0 9 0;
#X connect 1 0 26 0;
#X connect 2 0 7 0;
#X connect 3 0 11 1;
#X connect 4 0 14 0;
#X connect 5 0 8 0;
#X connect 7 0 11 0;
#X connect 8 0 13 0;
#X connect 9 0 1 0;
#X connect 10 0 9 1;
#X connect 10 0 7 1;
#X connect 10 0 8 1;
#X connect 11 0 12 0;
#X connect 11 1 0 0;
#X connect 12 0 0 0;
#X connect 13 0 0 0;
#X connect 14 0 17 0;
#X connect 14 0 18 0;
#X connect 14 1 20 0;
#X connect 14 1 19 0;
#X connect 17 0 12 1;
#X connect 18 0 13 1;
#X connect 19 0 13 1;
#X connect 20 0 12 1;
#X connect 26 0 6 0;
#X connect 27 0 26 1;
#X restore 92 184 pd lpc-resynth;
#N canvas 0 0 450 300 graph2 0;
#X array voice 88800 float 0;
#X coords 0 1 88799 -1 100 70 1;
#X restore 358 49 graph;
#N canvas 0 0 450 300 graph2 0;
#X array sample 105840 float 0;
#X coords 0 1 105839 -1 100 70 1;
#X restore 358 121 graph;
#X obj 75 55 bng 15 250 50 0 empty empty load-voice -38 -6 0 8 -262144
-1 -1;
#X obj 111 55 bng 15 250 50 0 empty empty sample -10 -6 0 8 -262144
-1 -1;
#N canvas 0 0 450 300 play 0;
#X obj 82 157 tabplay~ voice;
#X obj 237 157 tabplay~ sample;
#X obj 291 71 inlet;
#X obj 350 71 inlet;
#X obj 52 66 inlet;
#X obj 111 66 inlet;
#X obj 190 140 metro;
#X obj 48 140 metro;
#X obj 84 196 outlet~;
#X obj 238 269 outlet~;
#X obj 410 80 inlet;
#X obj 237 235 *~ 0;
#X connect 0 0 8 0;
#X connect 1 0 11 0;
#X connect 2 0 7 1;
#X connect 3 0 6 1;
#X connect 4 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 7 0;
#X connect 5 0 6 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 10 0 11 1;
#X connect 11 0 9 0;
#X restore 73 146 pd play;
#X obj 22 125 bng 15 250 50 0 empty empty play 0 -6 0 8 -262144 -1
-1;
#X floatatom 195 97 5 1 100 2 order - -;
#X obj 210 142 tgl 15 1 empty empty select-excitation -25 -6 0 8 -262144
-1 -1 1 1;
#X obj 52 111 tgl 15 0 empty empty loop 0 -6 0 8 -262144 -1 -1 1 1
;
#N canvas 0 0 450 300 load 0;
#X obj 77 135 soundfiler;
#X obj 77 169 outlet;
#X obj 161 186 soundfiler;
#X obj 161 220 outlet;
#X msg 161 169 read -resize drummach.wav sample;
#X obj 161 101 loadbang;
#X obj 80 84 openpanel;
#X obj 80 27 inlet;
#X msg 8 101 read -resize \$1 voice;
#X msg 218 152 read -resize \$1 sample;
#X obj 77 152 / 44.1;
#X obj 114 47 samplerate~;
#X obj 114 64 / 1000;
#X obj 218 135 openpanel;
#X obj 218 25 inlet;
#X obj 161 203 / 44.1;
#X msg 77 118 read -resize beauty.wav voice;
#X connect 0 0 10 0;
#X connect 2 0 15 0;
#X connect 4 0 2 0;
#X connect 5 0 16 0;
#X connect 5 0 4 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 7 0 11 0;
#X connect 8 0 0 0;
#X connect 9 0 2 0;
#X connect 10 0 1 0;
#X connect 11 0 12 0;
#X connect 12 0 10 1;
#X connect 12 0 15 1;
#X connect 13 0 9 0;
#X connect 14 0 13 0;
#X connect 14 0 11 0;
#X connect 15 0 3 0;
#X connect 16 0 0 0;
#X restore 75 70 pd load;
#X text 192 70 filter;
#X msg 244 80 32;
#X obj 244 63 loadbang;
#X floatatom 138 84 5 0 100 0 - - -;
#X obj 138 98 dbtorms;
#X text 144 52 V;
#X text 144 45 |;
#X text 144 37 |;
#X text 144 30 |;
#X text 315 224 pre-emphasis/;
#X text 296 237 de-emphasis frequency;
#X msg 222 178 2500;
#X obj 216 161 loadbang;
#X text 36 18 sample level should be lower than for a regular filter
;
#X text 37 4 LPC CROSS SYNTHESIS;
#X text 128 262 (C) Edward Kelly and Nicolas Chetry 2005;
#X msg 138 67 88;
#X msg 472 52 \; pd dsp \$1;
#X obj 472 23 tgl 15 0 empty empty audio_on 0 -6 0 8 -262144 -1 -1
0 1;
#N canvas 0 0 450 300 graph11 0;
#X array hanning 1024 float 1;
#A 0 0 9.41236e-06 3.76491e-05 8.47091e-05 0.000150591 0.000235291
0.000338808 0.000461136 0.000602272 0.00076221 0.000940944 0.00113847
0.00135477 0.00158985 0.00184369 0.00211629 0.00240764 0.00271771 0.00304651
0.00339403 0.00376023 0.00414512 0.00454868 0.00497089 0.00541175 0.00587122
0.00634929 0.00684595 0.00736118 0.00789495 0.00844726 0.00901807 0.00960736
0.0102151 0.0108413 0.0114859 0.0121489 0.0128303 0.01353 0.0142481
0.0149844 0.015739 0.0165118 0.0173028 0.018112 0.0189393 0.0197847
0.0206483 0.0215298 0.0224294 0.023347 0.0242825 0.0252359 0.0262072
0.0271963 0.0282033 0.029228 0.0302704 0.0313305 0.0324082 0.0335036
0.0346165 0.035747 0.0368949 0.0380602 0.039243 0.0404431 0.0416605
0.0428951 0.044147 0.045416 0.0467021 0.0480054 0.0493256 0.0506628
0.0520169 0.0533879 0.0547756 0.0561802 0.0576015 0.0590394 0.0604939
0.061965 0.0634525 0.0649565 0.0664769 0.0680136 0.0695665 0.0711357
0.072721 0.0743224 0.0759398 0.0775732 0.0792225 0.0808876 0.0825686
0.0842652 0.0859775 0.0877054 0.0894487 0.0912076 0.0929818 0.0947714
0.0965762 0.0983962 0.100231 0.102082 0.103947 0.105827 0.107722 0.109631
0.111556 0.113495 0.115448 0.117416 0.119399 0.121396 0.123407 0.125432
0.127471 0.129524 0.131592 0.133673 0.135768 0.137876 0.139999 0.142135
0.144284 0.146447 0.148623 0.150812 0.153014 0.15523 0.157458 0.159699
0.161954 0.164221 0.1665 0.168792 0.171097 0.173414 0.175743 0.178084
0.180438 0.182803 0.185181 0.18757 0.189971 0.192384 0.194809 0.197244
0.199692 0.20215 0.20462 0.207101 0.209593 0.212096 0.21461 0.217134
0.219669 0.222215 0.224771 0.227338 0.229914 0.232501 0.235098 0.237705
0.240322 0.242949 0.245585 0.248231 0.250886 0.253551 0.256225 0.258908
0.2616 0.264302 0.267012 0.269731 0.272458 0.275194 0.277939 0.280692
0.283453 0.286222 0.289 0.291785 0.294578 0.297379 0.300188 0.303004
0.305827 0.308658 0.311496 0.314341 0.317194 0.320052 0.322918 0.325791
0.32867 0.331555 0.334447 0.337345 0.340249 0.343159 0.346075 0.348997
0.351925 0.354858 0.357796 0.36074 0.363689 0.366644 0.369603 0.372567
0.375536 0.37851 0.381488 0.384471 0.387458 0.390449 0.393445 0.396444
0.399448 0.402455 0.405466 0.40848 0.411498 0.414519 0.417543 0.420571
0.423601 0.426635 0.429671 0.43271 0.435751 0.438795 0.441841 0.444889
0.447939 0.450991 0.454046 0.457101 0.460159 0.463218 0.466278 0.46934
0.472402 0.475466 0.478531 0.481596 0.484663 0.487729 0.490797 0.493864
0.496932 0.5 0.503068 0.506136 0.509203 0.512271 0.515337 0.518404
0.521469 0.524534 0.527598 0.53066 0.533722 0.536782 0.539841 0.542899
0.545954 0.549009 0.552061 0.555111 0.558159 0.561205 0.564249 0.56729
0.570329 0.573365 0.576399 0.579429 0.582457 0.585481 0.588502 0.59152
0.594534 0.597545 0.600552 0.603556 0.606555 0.609551 0.612542 0.615529
0.618512 0.62149 0.624464 0.627433 0.630397 0.633356 0.636311 0.63926
0.642204 0.645142 0.648075 0.651003 0.653925 0.656841 0.659751 0.662655
0.665553 0.668445 0.67133 0.674209 0.677082 0.679947 0.682806 0.685659
0.688504 0.691342 0.694173 0.696996 0.699812 0.702621 0.705422 0.708215
0.711 0.713778 0.716547 0.719308 0.722061 0.724806 0.727542 0.730269
0.732988 0.735698 0.7384 0.741092 0.743775 0.746449 0.749114 0.751769
0.754415 0.757051 0.759678 0.762295 0.764902 0.767499 0.770086 0.772663
0.775229 0.777785 0.780331 0.782866 0.78539 0.787904 0.790407 0.792899
0.79538 0.79785 0.800308 0.802756 0.805191 0.807616 0.810029 0.81243
0.814819 0.817197 0.819562 0.821916 0.824257 0.826586 0.828903 0.831208
0.8335 0.835779 0.838046 0.840301 0.842542 0.84477 0.846986 0.849188
0.851377 0.853553 0.855716 0.857865 0.860001 0.862124 0.864232 0.866327
0.868408 0.870476 0.872529 0.874568 0.876593 0.878604 0.880601 0.882584
0.884552 0.886505 0.888444 0.890369 0.892278 0.894173 0.896053 0.897918
0.899769 0.901604 0.903424 0.905229 0.907018 0.908792 0.910551 0.912295
0.914023 0.915735 0.917431 0.919112 0.920777 0.922427 0.92406 0.925678
0.927279 0.928864 0.930433 0.931986 0.933523 0.935044 0.936548 0.938035
0.939506 0.940961 0.942399 0.94382 0.945224 0.946612 0.947983 0.949337
0.950674 0.951995 0.953298 0.954584 0.955853 0.957105 0.95834 0.959557
0.960757 0.96194 0.963105 0.964253 0.965383 0.966496 0.967592 0.96867
0.96973 0.970772 0.971797 0.972804 0.973793 0.974764 0.975717 0.976653
0.977571 0.97847 0.979352 0.980215 0.981061 0.981888 0.982697 0.983488
0.984261 0.985016 0.985752 0.98647 0.98717 0.987851 0.988514 0.989159
0.989785 0.990393 0.990982 0.991553 0.992105 0.992639 0.993154 0.993651
0.994129 0.994588 0.995029 0.995451 0.995855 0.99624 0.996606 0.996953
0.997282 0.997592 0.997884 0.998156 0.99841 0.998645 0.998862 0.999059
0.999238 0.999398 0.999539 0.999661 0.999765 0.999849 0.999915 0.999962
0.999991 1 0.999991 0.999962 0.999915 0.999849 0.999765 0.999661 0.999539
0.999398 0.999238 0.999059 0.998862 0.998645 0.99841 0.998156 0.997884
0.997592 0.997282 0.996953 0.996606 0.99624 0.995855 0.995451 0.995029
0.994588 0.994129 0.993651 0.993154 0.992639 0.992105 0.991553 0.990982
0.990393 0.989785 0.989159 0.988514 0.987851 0.98717 0.98647 0.985752
0.985016 0.984261 0.983488 0.982697 0.981888 0.981061 0.980215 0.979352
0.97847 0.977571 0.976653 0.975717 0.974764 0.973793 0.972804 0.971797
0.970772 0.96973 0.96867 0.967592 0.966496 0.965383 0.964253 0.963105
0.96194 0.960757 0.959557 0.95834 0.957105 0.955853 0.954584 0.953298
0.951995 0.950674 0.949337 0.947983 0.946612 0.945224 0.94382 0.942399
0.940961 0.939506 0.938035 0.936548 0.935044 0.933523 0.931986 0.930433
0.928864 0.927279 0.925678 0.92406 0.922427 0.920777 0.919112 0.917431
0.915735 0.914023 0.912295 0.910551 0.908792 0.907018 0.905229 0.903424
0.901604 0.899769 0.897918 0.896053 0.894173 0.892278 0.890369 0.888444
0.886505 0.884552 0.882584 0.880601 0.878604 0.876593 0.874568 0.872529
0.870476 0.868408 0.866327 0.864232 0.862124 0.860001 0.857865 0.855716
0.853553 0.851377 0.849188 0.846986 0.84477 0.842542 0.840301 0.838046
0.835779 0.8335 0.831208 0.828903 0.826586 0.824257 0.821916 0.819562
0.817197 0.814819 0.81243 0.810029 0.807616 0.805191 0.802756 0.800308
0.79785 0.79538 0.792899 0.790407 0.787904 0.78539 0.782866 0.780331
0.777785 0.775229 0.772663 0.770086 0.767499 0.764902 0.762295 0.759678
0.757051 0.754415 0.751769 0.749114 0.746449 0.743775 0.741092 0.7384
0.735698 0.732988 0.730269 0.727542 0.724806 0.722061 0.719308 0.716547
0.713778 0.711 0.708215 0.705422 0.702621 0.699812 0.696996 0.694173
0.691342 0.688504 0.685659 0.682806 0.679947 0.677082 0.674209 0.67133
0.668445 0.665553 0.662655 0.659751 0.656841 0.653925 0.651003 0.648075
0.645142 0.642204 0.63926 0.636311 0.633356 0.630397 0.627433 0.624464
0.62149 0.618512 0.615529 0.612542 0.609551 0.606555 0.603556 0.600552
0.597545 0.594534 0.59152 0.588502 0.585481 0.582457 0.579429 0.576399
0.573365 0.570329 0.56729 0.564249 0.561205 0.558159 0.555111 0.552061
0.549009 0.545954 0.542899 0.539841 0.536782 0.533722 0.53066 0.527598
0.524534 0.521469 0.518404 0.515337 0.512271 0.509203 0.506136 0.503068
0.5 0.496932 0.493864 0.490797 0.487729 0.484663 0.481596 0.478531
0.475466 0.472402 0.46934 0.466278 0.463218 0.460159 0.457101 0.454046
0.450991 0.447939 0.444889 0.441841 0.438795 0.435751 0.43271 0.429671
0.426635 0.423601 0.420571 0.417543 0.414519 0.411498 0.40848 0.405466
0.402455 0.399448 0.396444 0.393445 0.390449 0.387458 0.384471 0.381488
0.37851 0.375536 0.372567 0.369603 0.366644 0.363689 0.36074 0.357796
0.354858 0.351925 0.348997 0.346075 0.343159 0.340249 0.337345 0.334447
0.331555 0.32867 0.325791 0.322918 0.320052 0.317194 0.314341 0.311496
0.308658 0.305827 0.303004 0.300188 0.297379 0.294578 0.291785 0.289
0.286222 0.283453 0.280692 0.277939 0.275194 0.272458 0.269731 0.267012
0.264302 0.2616 0.258908 0.256225 0.253551 0.250886 0.248231 0.245585
0.242949 0.240322 0.237705 0.235098 0.232501 0.229914 0.227338 0.224771
0.222215 0.219669 0.217134 0.21461 0.212096 0.209593 0.207101 0.20462
0.20215 0.199692 0.197244 0.194809 0.192384 0.189971 0.18757 0.185181
0.182803 0.180438 0.178084 0.175743 0.173414 0.171097 0.168792 0.1665
0.164221 0.161954 0.159699 0.157458 0.15523 0.153014 0.150812 0.148623
0.146447 0.144284 0.142135 0.139999 0.137876 0.135768 0.133673 0.131592
0.129524 0.127471 0.125432 0.123407 0.121396 0.119399 0.117416 0.115448
0.113495 0.111556 0.109631 0.107722 0.105827 0.103947 0.102082 0.100231
0.0983962 0.0965762 0.0947714 0.0929818 0.0912076 0.0894487 0.0877054
0.0859775 0.0842652 0.0825686 0.0808876 0.0792225 0.0775732 0.0759398
0.0743224 0.072721 0.0711357 0.0695665 0.0680136 0.0664769 0.0649565
0.0634525 0.061965 0.0604939 0.0590394 0.0576015 0.0561802 0.0547756
0.0533879 0.0520169 0.0506628 0.0493256 0.0480054 0.0467021 0.045416
0.044147 0.0428951 0.0416605 0.0404431 0.039243 0.0380602 0.0368949
0.035747 0.0346165 0.0335036 0.0324082 0.0313305 0.0302704 0.029228
0.0282033 0.0271963 0.0262072 0.0252359 0.0242825 0.023347 0.0224294
0.0215298 0.0206483 0.0197847 0.0189393 0.018112 0.0173028 0.0165118
0.015739 0.0149844 0.0142481 0.01353 0.0128303 0.0121489 0.0114859
0.0108413 0.0102151 0.00960736 0.00901807 0.00844726 0.00789495 0.00736118
0.00684595 0.00634929 0.00587122;
#A 1000 0.00541175 0.00497089 0.00454868 0.00414512 0.00376023 0.00339403
0.00304651 0.00271771 0.00240764 0.00211629 0.00184369 0.00158985 0.00135477
0.00113847 0.000940944 0.00076221 0.000602272 0.000461136 0.000338808
0.000235291 0.000150591 8.47091e-05 3.76491e-05 9.41236e-06;
#X coords 0 1 1023 0 100 70 1;
#X restore 478 154 graph;
#X connect 0 0 1 0;
#X connect 1 0 3 4;
#X connect 3 0 2 0;
#X connect 3 0 2 1;
#X connect 6 0 13 0;
#X connect 7 0 13 1;
#X connect 8 0 3 0;
#X connect 8 1 3 1;
#X connect 9 0 8 0;
#X connect 10 0 3 2;
#X connect 11 0 3 3;
#X connect 12 0 8 1;
#X connect 13 0 8 2;
#X connect 13 1 8 3;
#X connect 15 0 10 0;
#X connect 16 0 15 0;
#X connect 16 0 30 0;
#X connect 17 0 18 0;
#X connect 18 0 8 4;
#X connect 25 0 0 0;
#X connect 26 0 25 0;
#X connect 30 0 17 0;
#X connect 32 0 31 0;