generated from gllmAR/docsify-gabarit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analyse_audio.pd
151 lines (151 loc) · 4.53 KB
/
analyse_audio.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
#N canvas 827 239 527 327 12;
#X declare -stdpath ./;
#X obj 8 -48 adc~;
#X obj 8 371 dac~;
#X obj 75 34 vu 59 160 empty empty -1 -8 0 12 #404040 #000000 1 0;
#N canvas 329 161 625 417 vu 0;
#X obj 59 129 env~ 1024;
#X obj 161 111 abs~;
#X obj 161 213 snapshot~;
#X obj 161 256 rmstodb;
#X obj 161 21 inlet~;
#X obj 161 288 - 100;
#X obj 59 287 - 100;
#X obj 59 361 outlet;
#X obj 161 361 outlet;
#X text 344 307 Check the help file of env~ and slop~ for more details., f 31;
#X obj 239 89 expr 1000 / $f1;
#X floatatom 239 117 5 0 0 0 - - - 0;
#X obj 161 146 slop~ 0 0 0 0 1e+09;
#X obj 239 18 inlet;
#X floatatom 239 57 5 0 0 0 - - - 0;
#X text 359 89 convert to hz;
#X text 282 118 hz;
#X text 284 57 peak decay time in ms;
#X obj 59 171 t f b;
#X text 345 132 The env~ object is dedicated to RMS analysis. Its output is in dB (0-100 range \, pd style) but needs to be converted to dBFS (and we do that by simply subtracting 100)., f 31;
#X text 345 225 The slop~ object is used here for peak detection. We need to convert the output to dB with rmstodb and also subtract by 100 to convert it to dBFS., f 31;
#X connect 0 0 18 0;
#X connect 1 0 12 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 8 0;
#X connect 6 0 7 0;
#X connect 10 0 11 0;
#X connect 11 0 12 3;
#X connect 12 0 2 0;
#X connect 13 0 14 0;
#X connect 14 0 10 0;
#X connect 18 0 6 0;
#X connect 18 1 2 0;
#X restore 74 -19 pd vu;
#X obj 86 -100 tgl 19 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X floatatom 115 208 8 0 0 0 - - - 0;
#X floatatom 80 238 8 0 0 0 - - - 0;
#X text 168 207 Peak;
#X text 158 237 RMS;
#X floatatom 158 6 9 0 60000 0 - decay - 16;
#N canvas 525 219 362 314 noise-burst 0;
#X obj 139 166 *~;
#X obj 121 263 outlet~;
#X obj 139 137 vline~;
#X obj 139 27 inlet;
#X obj 68 110 noise~;
#X msg 139 107 1 \, 0 100;
#X obj 121 194 *~;
#X obj 139 75 metro 500;
#X obj 224 124 loadbang;
#X msg 224 152 \; decay 500 \; pd dsp 1;
#X connect 0 0 6 1;
#X connect 2 0 0 0;
#X connect 2 0 0 1;
#X connect 3 0 7 0;
#X connect 4 0 6 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 7 0 5 0;
#X connect 8 0 9 0;
#X coords 0 314 1 313 150 60 0;
#X restore 86 -70 pd noise-burst;
#X text 293 -79 peak decay time in ms, f 10;
#X obj 8 437 declare -stdpath ./;
#X text 267 -79 <--;
#X text -3 -101 turn on --> test sound, f 12;
#X obj 230 34 vu 59 160 empty empty -1 -8 0 12 #404040 #000000 1 0;
#N canvas 329 161 625 417 vu 0;
#X obj 59 129 env~ 1024;
#X obj 161 111 abs~;
#X obj 161 213 snapshot~;
#X obj 161 256 rmstodb;
#X obj 161 21 inlet~;
#X obj 161 288 - 100;
#X obj 59 287 - 100;
#X obj 59 361 outlet;
#X obj 161 361 outlet;
#X text 344 307 Check the help file of env~ and slop~ for more details., f 31;
#X obj 239 89 expr 1000 / $f1;
#X floatatom 239 117 5 0 0 0 - - - 0;
#X obj 161 146 slop~ 0 0 0 0 1e+09;
#X obj 239 18 inlet;
#X floatatom 239 57 5 0 0 0 - - - 0;
#X text 359 89 convert to hz;
#X text 282 118 hz;
#X text 284 57 peak decay time in ms;
#X obj 59 171 t f b;
#X text 345 132 The env~ object is dedicated to RMS analysis. Its output is in dB (0-100 range \, pd style) but needs to be converted to dBFS (and we do that by simply subtracting 100)., f 31;
#X text 345 225 The slop~ object is used here for peak detection. We need to convert the output to dB with rmstodb and also subtract by 100 to convert it to dBFS., f 31;
#X connect 0 0 18 0;
#X connect 1 0 12 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 8 0;
#X connect 6 0 7 0;
#X connect 10 0 11 0;
#X connect 11 0 12 3;
#X connect 12 0 2 0;
#X connect 13 0 14 0;
#X connect 14 0 10 0;
#X connect 18 0 6 0;
#X connect 18 1 2 0;
#X restore 267 -19 pd vu;
#X floatatom 253 205 8 0 0 0 - - - 0;
#X floatatom 221 236 8 0 0 0 - - - 0;
#X text 315 205 Peak;
#X text 305 235 RMS;
#X text 314 -20 <-- open for analysis;
#X obj 80 316 scale -100 0 0 127;
#X obj 115 277 scale -100 0 0 127;
#X obj 221 314 scale -100 0 0 127;
#X obj 253 275 scale -100 0 0 127;
#X obj 69 371 ctlout 0 1;
#X obj 115 396 ctlout 1 1;
#X obj 221 371 ctlout 2 1;
#X obj 267 396 ctlout 3 1;
#X connect 0 0 1 0;
#X connect 0 0 3 0;
#X connect 0 1 1 1;
#X connect 0 1 16 0;
#X connect 2 0 6 0;
#X connect 2 1 5 0;
#X connect 3 0 2 0;
#X connect 3 1 2 1;
#X connect 4 0 10 0;
#X connect 5 0 23 0;
#X connect 6 0 22 0;
#X connect 9 0 3 1;
#X connect 9 0 16 1;
#X connect 10 0 3 0;
#X connect 15 0 18 0;
#X connect 15 1 17 0;
#X connect 16 0 15 0;
#X connect 16 1 15 1;
#X connect 17 0 25 0;
#X connect 18 0 24 0;
#X connect 22 0 26 0;
#X connect 23 0 27 0;
#X connect 24 0 28 0;
#X connect 25 0 29 0;