Pan/EQ: 12-band advanced EQ (add 3 kHz and 6 kHz)
Ed wanted a band between 4 and 8 kHz. Advanced EQ goes from 10 to 12 bands: added 6 kHz (4-8 gap) and 3 kHz (2-4 gap) for even resolution through the presence region. PeerShaping .AdvancedBandsDb default is now 12; MainForm.NormalizeBands grows an older 10-length array on load so nothing breaks. (Feature unreleased, so no shipped settings to migrate.) Held for next release. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fc4ad3bb92
commit
d0d14ab95c
@@ -3268,8 +3268,23 @@ public sealed class MainForm : Form
|
||||
|
||||
private PeerShaping GetOrCreateShaping(string? key)
|
||||
{
|
||||
if (key is null) return new PeerShaping();
|
||||
if (key is null) return NormalizeBands(new PeerShaping());
|
||||
if (!peerShaping.TryGetValue(key, out var s)) { s = new PeerShaping(); peerShaping[key] = s; }
|
||||
return NormalizeBands(s);
|
||||
}
|
||||
|
||||
// Grow the band-gain arrays to the current band counts (e.g. a profile saved when the advanced EQ
|
||||
// had 10 bands, now 12) so the new bands can be read and stored. New slots are 0 dB (flat).
|
||||
private static PeerShaping NormalizeBands(PeerShaping s)
|
||||
{
|
||||
if (s.SimpleBandsDb.Length < PeerEqBands.Simple.Length)
|
||||
{
|
||||
var a = s.SimpleBandsDb; Array.Resize(ref a, PeerEqBands.Simple.Length); s.SimpleBandsDb = a;
|
||||
}
|
||||
if (s.AdvancedBandsDb.Length < PeerEqBands.Advanced.Length)
|
||||
{
|
||||
var a = s.AdvancedBandsDb; Array.Resize(ref a, PeerEqBands.Advanced.Length); s.AdvancedBandsDb = a;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user