feat: add channel select (ST/M/S) to parametric EQ band editor
This commit is contained in:
parent
f892d80bf6
commit
2cc95c0ca0
2 changed files with 22 additions and 3 deletions
|
|
@ -2914,6 +2914,7 @@ export async function initializeSettings(scrobbler, player, api, ui) {
|
|||
control.className = 'autoeq-band-control';
|
||||
control.dataset.band = i;
|
||||
const currentType = band.type || 'peaking';
|
||||
const currentChannel = band.channel || 'stereo';
|
||||
control.innerHTML = `
|
||||
<div class="autoeq-band-header">
|
||||
<span class="autoeq-band-number">${i + 1}</span>
|
||||
|
|
@ -2922,6 +2923,11 @@ export async function initializeSettings(scrobbler, player, api, ui) {
|
|||
<option value="lowshelf"${currentType === 'lowshelf' ? ' selected' : ''}>LSF</option>
|
||||
<option value="highshelf"${currentType === 'highshelf' ? ' selected' : ''}>HSF</option>
|
||||
</select>
|
||||
<select class="autoeq-channel-select">
|
||||
<option value="stereo"${currentChannel === 'stereo' ? ' selected' : ''}>ST</option>
|
||||
<option value="mid"${currentChannel === 'mid' ? ' selected' : ''}>M</option>
|
||||
<option value="side"${currentChannel === 'side' ? ' selected' : ''}>S</option>
|
||||
</select>
|
||||
<div class="autoeq-band-param">
|
||||
<span class="autoeq-band-param-label">Freq</span>
|
||||
<span class="autoeq-band-value autoeq-freq-val">${formatFreq(band.freq)} Hz</span>
|
||||
|
|
@ -2990,6 +2996,16 @@ export async function initializeSettings(scrobbler, player, api, ui) {
|
|||
applyBandsToAudio(bands);
|
||||
scheduleDrawAutoEQGraph();
|
||||
});
|
||||
|
||||
const channelSelect = control.querySelector('.autoeq-channel-select');
|
||||
channelSelect.addEventListener('change', () => {
|
||||
const bands = getActiveBands();
|
||||
if (!bands || !bands[i]) return;
|
||||
bands[i].channel = channelSelect.value;
|
||||
computeCorrectedCurve();
|
||||
applyBandsToAudio(bands);
|
||||
scheduleDrawAutoEQGraph();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9085,7 +9085,8 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn {
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.autoeq-type-select {
|
||||
.autoeq-type-select,
|
||||
.autoeq-channel-select {
|
||||
padding: 0.15rem 0.3rem;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 600;
|
||||
|
|
@ -9098,11 +9099,13 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn {
|
|||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.autoeq-type-select:hover {
|
||||
.autoeq-type-select:hover,
|
||||
.autoeq-channel-select:hover {
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
.autoeq-type-select:focus {
|
||||
.autoeq-type-select:focus,
|
||||
.autoeq-channel-select:focus {
|
||||
border-color: var(--ring);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue