-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtarget_curve_peq.html
208 lines (206 loc) · 5 KB
/
target_curve_peq.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/eq-curves.css">
<!-- JavaScript function to handle sequence generation and graph drawing-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/13.2.2/math.js" ></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="js/eq-curves.js"></script>
<title>Target Curve PEQ</title>
</head>
<body>
<!-- Input fields and button will go here -->
<div id="frame">
<h1>Target Curve PEQ</h1>
<form id="targetCurvePEQForm">
<div>
<label for="targetcurve">Paste a target curve file (defaults: <a href="" onclick="setDefault('targetcurve', 'defaultTargetFlat'); return false;">flat</a>, <a href="" onclick="setDefault('targetcurve', 'defaultTargetH7'); return false;">h7</a>, create your own using the <a href="./">target curve generator</a>):</label><br>
<textarea id="targetcurve" rows="20" cols="50" style="width:780px; margin-top: 15px;"></textarea><br>
</div>
<div>
<label for="peq">Paste a 96kHz biquad PEQ file (example: <a href="" onclick="document.getElementById('peq').value=biquadToText(peakFilter(200,1,3),1); return false;")>+3dB at 200Hz with Q=1</a>):</label><br>
<textarea id="peq" rows="20" cols="50" style="width:780px; margin-top: 15px;"></textarea><br>
</div>
<button type="button" onclick="generateCombinedText()" class="full-width" id="generatebutton">Generate new target curve</button>
</form>
<div></div>
<!-- Output text field, download button and chart-->
<div>
<label for="targetcurve">New Target Curve with PEQ applied:</label><br>
<textarea id="output" rows="20" cols="50" style="width:780px; margin-top: 15px;"></textarea><br>
</div>
<div><label for="filename">Filename:</label> <input type="text" id="filename" name="filename" size="75"> <button type="button" id="downloadbutton" onclick="saveText()" disabled="True">Dowload file</button></div>
<div id="curve_chart" style="width: 780px; height: 350px; align:center;"></div>
<div style="width: 780px">
Instructions:<br>
Paste a target curve you want to further tweak (e.g., from <a href="./">the target curve generator</a> and a biquad file (e.g. from REW PEQ) that defines the tweaks.<br>
Click generate to create a new target curve file to download and use in your room correction software (e.g., Dirac Live).<br>
Notes:<br>
The PEQ filters are applied at the positions of the existing target curve frequencies. You may want to make sure that there are enough intermediate values to accuratly represent low-bandwidth filters (e.g., 6 per octave in the target curve generator)
</div>
<textarea id="defaultTargetH7" hidden="true">
NAME
H7 with roll-off from EQ Target Curve Generator - https://databender1729.github.io/eq-target-curves/
DEVICENAME
Unnamed
BREAKPOINTS
10 7
11.22 6.99988
12.6 6.99974
14.14 6.99959
15.87 6.99942
17.82 6.99923
20 6.99887
22.45 6.99531
25.2 6.99131
28.28 6.98682
31.75 6.97485
35.64 6.95538
40 6.93125
44.9 6.86971
50.4 6.79014
56.57 6.63136
63.5 6.40908
71.27 6.09012
80 5.61243
89.8 5.04092
100.79 4.29444
113.14 3.5473
126.99 2.7693
142.54 2.07882
160 1.49893
179.59 1.04354
201.59 0.70181
226.27 0.45892
253.98 0.29102
285.09 0.18612
320 0.1167
359.19 0.09527
403.17 0.08136
452.55 0.07416
507.97 0.06665
570.18 0.05822
640 0.04877
718.38 0.03815
806.35 0.02623
905.1 0.01286
1015.94 0
1140.35 0
1280 0
1436.75 0
1612.7 0
1810.19 0
2031.87 0
2280.7 0
2560 0
2873.5 0
3225.4 0
3620.39 0
4063.75 -0.01753
4561.4 -0.15439
5120 -0.308
5747.01 -0.48043
6450.8 -0.67397
7240.77 -0.89121
8127.49 -1.13506
9122.8 -1.40877
10240 -1.716
11494.01 -2.06085
12901.59 -2.44794
14481.55 -2.88243
16254.99 -3.37012
18245.61 -3.91754
20480 -4.532
22988.02 -5.22171
24000 -5.5
LOWLIMITHZ
10
HIGHLIMITHZ
24000</textarea>
<textarea id="defaultTargetFlat" hidden="true">
NAME
Flat from EQ Target Curve Generator - https://databender1729.github.io/eq-target-curves/
DEVICENAME
Unnamed
BREAKPOINTS
10 0
11.22 0
12.6 0
14.14 0
15.87 0
17.82 0
20 0
22.45 0
25.2 0
28.28 0
31.75 0
35.64 0
40 0
44.9 0
50.4 0
56.57 0
63.5 0
71.27 0
80 0
89.8 0
100.79 0
113.14 0
126.99 0
142.54 0
160 0
179.59 0
201.59 0
226.27 0
253.98 0
285.09 0
320 0
359.19 0
403.17 0
452.55 0
507.97 0
570.18 0
640 0
718.38 0
806.35 0
905.1 0
1015.94 0
1140.35 0
1280 0
1436.75 0
1612.7 0
1810.19 0
2031.87 0
2280.7 0
2560 0
2873.5 0
3225.4 0
3620.39 0
4063.75 0
4561.4 0
5120 0
5747.01 0
6450.8 0
7240.77 0
8127.49 0
9122.8 0
10240 0
11494.01 0
12901.59 0
14481.55 0
16254.99 0
18245.61 0
20480 0
22988.02 0
24000 0
LOWLIMITHZ
10
HIGHLIMITHZ
24000</textarea>
</div>
</body>
</html>