-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
279 lines (259 loc) · 20 KB
/
index.html
File metadata and controls
279 lines (259 loc) · 20 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RACK4MASTER-REFERENCE</title>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Barlow+Condensed:wght@400;600;700;900&family=Share+Tech+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="https://unpkg.com/meyda@5.6.0/dist/web/meyda.min.js"></script>
</head>
<body>
<div id="app">
<header>
<div class="app-brand">
<div class="app-title">RACK4MASTER<span class="sep"> / </span><span class="ref">REFERENCE</span></div>
<div class="app-sub" data-i18n="app.sub">Spectral Reference Matching Processor —</div>
</div>
<div id="status-bar">
<div class="s-led" id="sLed"></div>
<span id="sText" data-i18n="status.ready">READY</span>
<span class="meyda-badge" id="meydaBadge">◆ MEYDA</span>
<div class="hamburger-wrap" style="margin-left:12px;">
<button class="hmenu-btn" id="menuBtn" title="Menu">☰</button>
<div class="hamburger-menu hidden" id="hamburgerMenu">
<div class="hmenu-section" data-i18n-label="menu.language">Language</div>
<button class="hmenu-item hmenu-lang" data-lang="en"><span class="hmenu-check" id="chk-en">✓</span> English</button>
<button class="hmenu-item hmenu-lang" data-lang="es"><span class="hmenu-check" id="chk-es">✓</span> Español</button>
<button class="hmenu-item hmenu-lang" data-lang="ca"><span class="hmenu-check" id="chk-ca">✓</span> Català</button>
<hr class="hmenu-divider">
<a class="hmenu-item" href="help.html" target="_blank"><span data-i18n="menu.help">Help</span></a>
</div>
</div>
</div>
</header>
<!-- REFERENCE -->
<div class="rack rack-top-ref">
<div class="rack-header"><span class="led" id="ledRef"></span><span data-i18n="track.ref">REFERENCE TRACK</span><span class="track-info" id="infoRef" data-i18n="track.nofile">NO FILE LOADED</span></div>
<div class="rack-body">
<div class="wave-drop" id="dropRef"><canvas id="waveRef" height="90"></canvas><div class="wave-hint" data-i18n="wave.hint.ref">▶ DROP REFERENCE TRACK HERE — OR CLICK TO BROWSE</div></div>
<div class="spec-wrap"><canvas id="specRef" height="66"></canvas></div>
<div class="transport">
<button class="btn btn-amber" id="loadRef">⇧ <span data-i18n="btn.load">LOAD</span></button>
<button class="btn btn-amber" id="playRef">▶ <span data-i18n="btn.play">PLAY</span></button>
<button class="btn btn-gray" id="stopRef">■ <span data-i18n="btn.stop">STOP</span></button>
<button class="btn btn-gray" id="loopRef">↻ <span data-i18n="btn.loop">LOOP</span></button>
</div>
</div>
<input type="file" id="fileRef" accept="audio/*" style="display:none">
</div>
<!-- TARGET -->
<div class="rack rack-top-target">
<div class="rack-header"><span class="led" id="ledTarget"></span><span data-i18n="track.target">TARGET TRACK</span><span class="track-info" id="infoTarget" data-i18n="track.nofile">NO FILE LOADED</span></div>
<div class="rack-body">
<div class="wave-drop" id="dropTarget"><canvas id="waveTarget" height="90"></canvas><div class="wave-hint" data-i18n="wave.hint.target">▶ DROP TARGET TRACK HERE — OR CLICK TO BROWSE</div></div>
<div class="spec-wrap"><canvas id="specTarget" height="66"></canvas></div>
<div class="transport">
<button class="btn btn-blue" id="loadTarget">⇧ <span data-i18n="btn.load">LOAD</span></button>
<button class="btn btn-blue" id="playTarget">▶ <span data-i18n="btn.play">PLAY</span></button>
<button class="btn btn-gray" id="stopTarget">■ <span data-i18n="btn.stop">STOP</span></button>
<button class="btn btn-gray" id="loopTarget">↻ <span data-i18n="btn.loop">LOOP</span></button>
</div>
</div>
<input type="file" id="fileTarget" accept="audio/*" style="display:none">
</div>
<!-- ANALYZE -->
<div class="analyze-zone">
<button class="btn-analyze" id="analyzeBtn">🔍 <span data-i18n="btn.analyze">ANALYZE & APPLY REFERENCE MATCHING</span></button>
</div>
<!-- ANALYSIS REPORT -->
<div class="rack rack-top-analysis rack-collapsible" id="analysisPanel" style="display:none">
<div class="rack-header" id="analysisPanelHeader"><span data-i18n="panel.analysis">SPECTRAL ANALYSIS REPORT</span><span class="rack-toggle-arrow">▼</span></div>
<div class="rack-collapse-body" id="analysisPanelBody">
<div class="rack-body"><div class="analysis-wrap" id="analysisContent"></div></div>
</div>
</div>
<!-- RESULT -->
<div class="rack rack-top-result" id="resultSection" style="display:none">
<div class="rack-header"><span class="led" id="ledResult"></span><span data-i18n="panel.output">PROCESSED OUTPUT</span><span class="live-badge" id="liveBadge" data-i18n="badge.live">LIVE DSP CHAIN ACTIVE</span></div>
<div class="rack-body">
<div class="wave-drop loaded" id="dropResult"><canvas id="waveResult" height="90"></canvas></div>
<div class="spec-wrap"><canvas id="specResult" height="66"></canvas></div>
<div class="transport">
<button class="btn btn-green" id="playResult">▶ <span data-i18n="btn.play">PLAY</span></button>
<button class="btn btn-gray" id="stopResult">■ <span data-i18n="btn.stop">STOP</span></button>
<button class="btn btn-ab" id="abBtn" disabled title="Toggle A (dry target) vs B (processed) — seamless crossfade [W]">A/B<span class="ab-state" id="abState">▬B</span></button>
<button class="btn btn-gray" id="loopResultBtn" disabled>↻ LOOP</button>
<button class="btn btn-sync synced" id="loopSyncBtn" disabled title="Sync result loop with target loop">⇌ SYNC</button>
</div>
<div class="vu-strip" id="vuStrip" style="display:none">
<div class="vu-row"><span class="vu-lbl">IN</span><div class="vu-bar-wrap"><canvas id="vuIn" height="11"></canvas></div><span class="vu-val" id="vuInVal">—</span></div>
<div class="vu-row"><span class="vu-lbl">GR</span><div class="vu-bar-wrap"><canvas id="vuGr" height="11"></canvas></div><span class="vu-val" id="vuGrVal">—</span></div>
<div class="vu-row"><span class="vu-lbl">OUT</span><div class="vu-bar-wrap"><canvas id="vuOut" height="11"></canvas></div><span class="vu-val" id="vuOutVal">—</span></div>
</div>
</div>
</div>
<!-- COMPARATIVE SPECTRUM -->
<div class="rack rack-top-comp" id="compPanel" style="display:none">
<div class="rack-header">
<span data-i18n="panel.comparison">SPECTRAL COMPARISON</span> —
<span style="color:var(--amber);font-size:.76rem;">▬ <span data-i18n="legend.ref">REFERENCE</span></span>
<span style="color:var(--blue);font-size:.76rem;">▬ <span data-i18n="legend.target">TARGET</span></span>
<span style="color:var(--green);font-size:.76rem;">▬ <span data-i18n="legend.result">RESULT (LIVE)</span></span>
</div>
<div class="rack-body" style="padding:12px 18px;">
<canvas id="compSpec" class="comp-spec-canvas" height="148"></canvas>
</div>
</div>
<!-- FX RACK -->
<div class="rack rack-top-fx" id="fxSection" style="display:none">
<div class="rack-header" data-i18n="panel.fx">PROCESSING CHAIN | HPF² → EQ7(shelf+peak) → SATURATION(4x) → DYNAMICS → M/S → LIMITER → OUT</div>
<div class="rack-body">
<div class="modules-row">
<div class="module">
<div class="mod-title"><span data-i18n="mod.eq">7-Band Parametric EQ</span><button class="mod-help-btn" data-help="helpEq" title="Help">?</button></div>
<div class="help-popup" id="helpEq" data-i18n-html="help.eq.body">
<p class="hp-intro">Shapes the frequency balance of the target to match the reference. SUB and AIR are shelf filters; the 5 middle bands are bell-shaped (±12 dB).</p>
<dl>
<dt>SUB — 50 Hz (shelf)</dt><dd>Sub-bass weight and rumble. Boost adds depth; cut cleans up low-end mud.</dd>
<dt>BASS — 100 Hz</dt><dd>Body and punch. The warmth foundation of the mix.</dd>
<dt>LO-MID — 300 Hz</dt><dd>Warmth vs. muddiness zone. Often cut slightly for clarity.</dd>
<dt>MID — 1 kHz</dt><dd>Presence and forward character. Defines attack and intelligibility.</dd>
<dt>HI-MID — 3 kHz</dt><dd>Clarity, edge, and harshness. Use with care — very audible range.</dd>
<dt>PRESENCE — 8 kHz</dt><dd>Brilliance, definition, and consonant detail.</dd>
<dt>AIR — 16 kHz (shelf)</dt><dd>Open, airy shimmer. Subtle boost lifts the top end.</dd>
</dl>
</div>
<div class="slider-row"><label data-i18n="eq.sub">SUB – 50 Hz ⎗</label> <input type="range" id="eq50" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq50v"> +0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.bass">BASS – 100 Hz</label> <input type="range" id="eq100" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq100v">+0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.lomid">LO-MID – 300 Hz</label><input type="range" id="eq300" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq300v">+0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.mid">MID – 1 kHz</label> <input type="range" id="eq1k" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq1kv"> +0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.himid">HI-MID – 3 kHz</label> <input type="range" id="eq3k" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq3kv"> +0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.presence">PRESENCE – 8 kHz</label><input type="range" id="eq8k" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq8kv"> +0.0 dB</span></div>
<div class="slider-row"><label data-i18n="eq.air">AIR – 16 kHz ⎗</label> <input type="range" id="eq16k" min="-12" max="12" value="0" step="0.1"><span class="sval" id="eq16kv">+0.0 dB</span></div>
</div>
<div class="module">
<div class="mod-title"><span data-i18n="mod.dynamics">Dynamics Processor</span><button class="mod-help-btn" data-help="helpDyn" title="Help">?</button></div>
<div class="help-popup" id="helpDyn" data-i18n-html="help.dyn.body">
<p class="hp-intro">Feed-forward compressor that reduces the dynamic range to match the reference crest factor and perceived density.</p>
<dl>
<dt>Threshold</dt><dd>Level above which gain reduction begins. Lower = more compression starts earlier.</dd>
<dt>Ratio</dt><dd>Compression intensity. 2:1 = gentle; 8:1 = heavy; 20:1 = near-limiting.</dd>
<dt>Attack</dt><dd>How fast compression kicks in after a transient. Slow = punchy transients pass through.</dd>
<dt>Release</dt><dd>How fast gain returns after the signal drops. Too fast causes audible pumping.</dd>
<dt>Makeup Gain</dt><dd>Compensates the volume lost through compression. Keep the output around 0 dBFS.</dd>
</dl>
</div>
<div class="slider-row"><label data-i18n="dyn.thr">THRESHOLD</label> <input type="range" id="compThr" min="-60" max="0" value="-24" step="0.5"><span class="sval" id="compThrV">-24.0 dB</span></div>
<div class="slider-row"><label data-i18n="dyn.rat">RATIO</label> <input type="range" id="compRat" min="1" max="20" value="3" step="0.5"><span class="sval" id="compRatV"> 3.0:1</span></div>
<div class="slider-row"><label data-i18n="dyn.atk">ATTACK</label> <input type="range" id="compAtk" min="0.5" max="50" value="3" step="0.1"><span class="sval" id="compAtkV"> 3.0 ms</span></div>
<div class="slider-row"><label data-i18n="dyn.rel">RELEASE</label> <input type="range" id="compRel" min="10" max="1000" value="250" step="5"> <span class="sval" id="compRelV"> 250 ms</span></div>
<div class="slider-row"><label data-i18n="dyn.mkp">MAKEUP GAIN</label> <input type="range" id="compMkp" min="-6" max="12" value="0" step="0.1"><span class="sval" id="compMkpV"> +0.0 dB</span></div>
</div>
<div class="module">
<div class="mod-title"><span data-i18n="mod.harmonics">Harmonics & Filter</span><button class="mod-help-btn" data-help="helpHpf" title="Help">?</button></div>
<div class="help-popup" id="helpHpf" data-i18n-html="help.hpf.body">
<p class="hp-intro">High-pass filter removes low-frequency rumble. Saturation adds harmonic coloration. Both run before the dynamics stage.</p>
<dl>
<dt>HPF Frequency</dt><dd>Cutoff point. Everything below is rolled off at 24 dB/oct (4th-order — twice as steep as typical). Derived from sub-bass energy delta vs. reference.</dd>
<dt>HPF Resonance (Q)</dt><dd>Slight resonant emphasis just before the cutoff. At Q > 1 you hear a subtle bump — useful to compensate for the filter's energy loss.</dd>
<dt>Saturation</dt><dd>Soft-clip waveshaper at 4× oversampling. Adds even + odd harmonics for analog warmth. 0 % = transparent; 100 % = heavy coloration. Derived from spectral flatness difference.</dd>
</dl>
</div>
<div class="slider-row"><label data-i18n="hpf.freq">HPF FREQUENCY</label><input type="range" id="hpfFreq" min="20" max="200" value="20" step="1"> <span class="sval" id="hpfFreqV"> 20 Hz</span></div>
<div class="slider-row"><label data-i18n="hpf.q">HPF RESONANCE</label><input type="range" id="hpfQ" min="0.5" max="3.0" value="0.7" step="0.1"><span class="sval" id="hpfQV"> 0.7 Q</span></div>
<div class="slider-row"><label data-i18n="hpf.sat">SATURATION</label> <input type="range" id="satAmt" min="0" max="100" value="0" step="1"> <span class="sval" id="satAmtV"> 0%</span></div>
</div>
<div class="module">
<div class="mod-title"><span data-i18n="mod.output">Output Stage</span><button class="mod-help-btn" data-help="helpOut" title="Help">?</button></div>
<div class="help-popup" id="helpOut" data-i18n-html="help.out.body">
<p class="hp-intro">M/S matrix adjusts stereo image width and phase balance. Limiter ensures the signal never exceeds the ceiling. Output Gain sets the final export level.</p>
<dl>
<dt>Mid Gain</dt><dd>Adjusts the center (mono-compatible) component — kick, bass, lead vocals. Boost to push center elements forward.</dd>
<dt>Side Gain</dt><dd>Adjusts stereo width. Boost to widen; cut to focus the image. Negative values narrow toward mono.</dd>
<dt>Limiter Ceiling</dt><dd>Absolute peak ceiling (brick wall, 20:1, 1 ms attack, 150 ms release). No sample can exceed this value after processing.</dd>
<dt>Output Gain</dt><dd>Final level trim applied after the limiter, before export. Use to match target loudness or create headroom.</dd>
</dl>
</div>
<div class="slider-row"><label data-i18n="out.mid">MID GAIN</label> <input type="range" id="midGain" min="-6" max="6" value="0" step="0.1"><span class="sval" id="midGainV"> +0.0 dB</span></div>
<div class="slider-row"><label data-i18n="out.side">SIDE GAIN</label> <input type="range" id="sideGain" min="-12" max="12" value="0" step="0.1"><span class="sval" id="sideGainV">+0.0 dB</span></div>
<div class="slider-row"><label data-i18n="out.lim">LIMITER CEILING</label><input type="range" id="limCeil" min="-6" max="0" value="-0.3" step="0.1"><span class="sval" id="limCeilV">-0.3 dB</span></div>
<div class="slider-row"><label data-i18n="out.gain">OUTPUT GAIN</label> <input type="range" id="outGain" min="-12" max="12" value="0" step="0.1"><span class="sval" id="outGainV">+0.0 dB</span></div>
</div>
</div>
</div>
</div>
<div class="action-row" id="actionRow" style="display:none">
<button class="btn btn-blue" id="downloadBtn">⬇ <span data-i18n="btn.export">EXPORT WAV</span></button>
<button class="btn btn-gray" id="resetBtn">↺ <span data-i18n="btn.reset">FULL RESET</span></button>
</div>
</div><!-- /app -->
<!-- CONFIRM RESET MODAL -->
<div class="modal-overlay hidden" id="confirmModal">
<div class="modal-box">
<div class="modal-title">⚠ <span data-i18n="modal.reset.title">FULL RESET</span></div>
<div class="modal-msg" data-i18n="modal.reset.msg">All loaded files, analysis data and processing settings will be permanently cleared.<br><br>This action cannot be undone.</div>
<div class="modal-btns">
<button class="btn btn-gray" id="confirmCancel">✕ <span data-i18n="modal.reset.cancel">CANCEL</span></button>
<button class="btn btn-red" id="confirmOk">↺ <span data-i18n="modal.reset.confirm">CONFIRM RESET</span></button>
</div>
</div>
</div>
<!-- INFO MODAL (Privacy / Legal / Terms) -->
<div class="modal-overlay hidden" id="infoModal">
<div class="info-modal-box">
<div class="info-modal-hdr">
<div class="info-modal-title" id="infoModalTitle">—</div>
<button class="info-modal-close" id="infoModalClose">✕</button>
</div>
<div class="info-modal-body" id="infoModalBody"></div>
</div>
</div>
<!-- EXPORT FORMAT DIALOG -->
<div id="exportFmtDialog" style="display:none;">
<div id="exportFmtBox">
<h3><svg style="width:14px;height:14px;vertical-align:-2px;margin-right:6px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><path d="M12 3v12m0 0l-4-4m4 4l4-4M3 17v2a2 2 0 002 2h14a2 2 0 002-2v-2"/></svg><span data-i18n="export.title">Export WAV</span></h3>
<div class="efmt-label" data-i18n="export.bitdepth">Bit depth</div>
<div class="efmt-group">
<button class="efmt-opt sel" id="efmt16">16 bit</button>
<button class="efmt-opt" id="efmt24">24 bit</button>
</div>
<div class="efmt-label" data-i18n="export.samplerate">Sample rate</div>
<div class="efmt-group">
<button class="efmt-opt sel" id="efmtOrig" data-i18n="export.original">Original</button>
<button class="efmt-opt" id="efmt48">48 000 Hz</button>
</div>
<div class="efmt-actions">
<button class="efmt-cancel" id="efmtCancel" data-i18n="export.cancel">Cancel</button>
<button class="efmt-go" id="efmtGo"><svg style="width:13px;height:13px;vertical-align:-2px;margin-right:5px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><path d="M12 3v12m0 0l-4-4m4 4l4-4M3 17v2a2 2 0 002 2h14a2 2 0 002-2v-2"/></svg><span data-i18n="export.download">Download</span></button>
</div>
</div>
</div>
<!-- FOOTER -->
<footer class="app-footer">
<span data-i18n="footer.rights">© 2026 Rack4Master. Francesc Llorens. All rights reserved.</span>
<span class="foot-sep">·</span>
<span style="color:var(--dim)" data-i18n="footer.local">Runs locally in your browser. No data stored or tracked.</span>
<span class="foot-sep">·</span>
<a href="#" class="foot-link" data-modal="privacy" data-i18n="footer.privacy">Privacy</a>
<span class="foot-sep">·</span>
<a href="#" class="foot-link" data-modal="legal" data-i18n="footer.legal">Legal</a>
<span class="foot-sep">·</span>
<a href="#" class="foot-link" data-modal="terms" data-i18n="footer.terms">Terms</a>
<span class="foot-sep">·</span>
<form action="https://www.paypal.com/donate" method="post" target="_blank" style="display:inline-block;margin:0;vertical-align:middle;">
<input type="hidden" name="business" value="73KKE6DVSJ8WY">
<input type="hidden" name="no_recurring" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif"
border="0" name="submit"
title="PayPal - The safer, easier way to pay online!"
alt="Donate with PayPal button"
style="vertical-align:middle;">
</form>
</footer>
<script src="i18n.js"></script>
<script src="script.js"></script>
</body>
</html>