-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreadme.html
187 lines (132 loc) · 5.75 KB
/
readme.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>pd-pulqui</TITLE>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
p {
#font-weight: bold;
}
a {
font-weight: bold;
}
H1, H2, H3, H4, H5, H6, ol, ul, mark, PRE, p {
color: #3E4349;
}
#corpus {
width: 8.5in;
margin-left: 0.8in;
}
/* standard link */
a:link {
text-decoration: none;
color: #4479cf;
#color: blue;
}
a:visited {
text-decoration: none;
color: #4479cf;
#color: blue;
}
a:hover {
#background-color:#eeeee4;
}
a:active {
text-decoration: none;
color: #4479cf;
#color: blue;
}
@media screen and (max-device-width: 700px) {
#corpus {
padding: 10px;
width: auto;
margin-left: 6px;
}
H1 {font-size: 20pt;}
IMG {max-width: 100%;}
}
/* responsive css for small "browser window" */
@media screen and (max-width: 700px) {
#corpus {
padding: 10px;
width: auto;
margin-left: 6px;
}
H1 {font-size: 20pt;}
IMG {max-width: 100%;}
}
</style>
</head>
<body>
<div id=corpus>
<body>
<h1 id="pd-pulqui">pd-pulqui</h1>
<p>An audio limiter algorithm developed on <a href="https://github.com/pure-data/pure-data">Pure-Data</a>.</p>
<p>It is named “Pulqui” because it sounds the same as “Pull key”. It’s the <a href="https://en.wikipedia.org/wiki/Mapuche">Mapuche</a> word for “arrow” and was also used to name an Argentine jet aircraft prototype <a href="https://en.wikipedia.org/wiki/FMA_I.Ae._27_Pulqui_I">-></a>.</p>
<p>The algorithm works scanning audio files or live signal. In both cases the scan generates a “side-chain” signal that is used to manipulate the original signal. The live signal process takes at least a theoretical latency of a little more than 25ms (half of a 20hz period).</p>
<h2 id="The..side-chain..signal.">The “side-chain” signal.</h2>
<p>From a given signal:</p>
<pre><code> /\
/\ / \
\/ \ /
\/
</code></pre>
<p>We scan which was the <strong>highest value</strong> that we have for the lap that <strong>starts</strong> whenever the sample exceeds a zero value and <strong>stops</strong> whenever the sample is very near a zero value. We write the highest value on all that lap. We do the same for the negative laps but we invert the lowest value :</p>
<pre><code> ___ ___
_ _
</code></pre>
<h2 id="Combination.">Combination.</h2>
<p>We use the “side-chain” values to do the attenuation math on the original signal.</p>
<p>The “original signal” first waves from 0.5 to -0.5 and then from 1 to -1. We want to “limit” it so that it never exceeds 0.5.</p>
<p>We use the “side-chain signal” to anticipate how much attenuation we need for that exact lap of time. i.e we know how much to attenuate as soon as the lap starts.</p>
<pre><code>1 ___ ___
_ _
0
-1
</code></pre>
<p>We ignore the first two values because they are equal or less than 0.5 but we use the following two because they are grater than 0.5.</p>
<p>Limited output:</p>
<pre><code>1
0 /\ /\
\/ \/
-1
</code></pre>
<h2 id="Intermodulation.Distortion.">Intermodulation Distortion.</h2>
<p>Intermodulation distortion may be introduced with this limiter.</p>
<p>For example in an edge case:</p>
<p>In a single vacuum tube triode circuit only one side of the signal enters the saturation area (this is the intermodulation distortion produced by the triode) so the distorted signal, along with other things, waves less on the positive side than on the negative one.</p>
<pre><code>1
0_._ _._ _
. .
-1
</code></pre>
<p>If we limit such a signal with this limiter it starts limiting only the negative side (this is the intermodulation distortion produced by this limiter). The more we limit it at some point both sides are equal in amplitude.</p>
<h2 id="Objects">Objects</h2>
<p><strong>pulqui~</strong> scans live input</p>
<p><strong>pulquilimiter~</strong> combines both signals (signal and it’s side-chain)</p>
<p><strong>pulqui</strong> generates a scan signal file from a given .wav file.</p>
<p><strong>pulqui-limiter.pd</strong> abstraction to load files, generate their scans and combine them.</p>
<p><strong>pqcrossover~</strong> 4th order Linkwitz-Riley filters.</p>
<p><strong>pqpeak~</strong> reports maximum peak in dBFS from a 2048 sample buffer.</p>
<hr />
<h2 id="Installation.">Installation.</h2>
<p>The easiest way is to open Pd (you must have Pd installed to use pulqui) and go to the menu <strong>help/find externals</strong> and type “pulqui” on the search bar. Hopefully your search results on a high-lighted pulqui version that matches your Pd and OS architecture. Click on it and the automatic installation will start.</p>
<p>Alternatively you can find the binaries for your Pd/OS architecture in the <a href="https://github.com/Lucarda/pd-pulqui/releases">release</a> section. Download and extract the one you need and place it on your Pd’s externals folder.</p>
<h2 id="Compiling">Compiling</h2>
<p>Download and extract the sources. Then it should be straight-forward (using Linux GCC, macOS Xcode or Windows MinGW) with:</p>
<pre><code>cd <path/to/the/pulqui-folder>
make install
</code></pre>
<p>If you need to specify Pd’s location and an output dir do:</p>
<pre><code>make install PDDIR=<path/to/your/pd> PDLIBDIR=<path/you/want/the/output>
</code></pre>
<h2 id="Repository">Repository</h2>
<p><a href="https://github.com/Lucarda/pd-pulqui">https://github.com/Lucarda/pd-pulqui</a></p>
<h2 id="Report.bugs">Report bugs</h2>
<p>to <a href="https://github.com/Lucarda/pd-pulqui/issues">https://github.com/Lucarda/pd-pulqui/issues</a></p>
</body>
</html>