From bc68842d948532c72aa09240599ee24e56f820ba Mon Sep 17 00:00:00 2001 From: VoidX Date: Tue, 16 Apr 2024 01:24:49 +0200 Subject: [PATCH] Minor EQ features --- .../FilterSet/BaseClasses/EqualizerFilterSet.cs | 2 +- .../FilterSet/BaseClasses/MultiCurveFilterSet.cs | 4 ++-- Cavern.QuickEQ/Equalization/PeakingEqualizer.cs | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cavern.QuickEQ.Format/FilterSet/BaseClasses/EqualizerFilterSet.cs b/Cavern.QuickEQ.Format/FilterSet/BaseClasses/EqualizerFilterSet.cs index 6c531299..c801f144 100644 --- a/Cavern.QuickEQ.Format/FilterSet/BaseClasses/EqualizerFilterSet.cs +++ b/Cavern.QuickEQ.Format/FilterSet/BaseClasses/EqualizerFilterSet.cs @@ -57,7 +57,7 @@ public EqualizerFilterSet(ReferenceChannel[] channels, int sampleRate) : base(sa /// /// Construct an without the data of pre-created. - /// This is useful when you also derive and call . + /// This is useful when you also derive and call . /// protected EqualizerFilterSet(int sampleRate) : base(sampleRate) { } diff --git a/Cavern.QuickEQ.Format/FilterSet/BaseClasses/MultiCurveFilterSet.cs b/Cavern.QuickEQ.Format/FilterSet/BaseClasses/MultiCurveFilterSet.cs index 3b098cca..0c57f368 100644 --- a/Cavern.QuickEQ.Format/FilterSet/BaseClasses/MultiCurveFilterSet.cs +++ b/Cavern.QuickEQ.Format/FilterSet/BaseClasses/MultiCurveFilterSet.cs @@ -87,14 +87,14 @@ public override void Export(string path) { for (int i = 0; i < Channels.Length; i++) { MultiCurveChannelData channelRef = (MultiCurveChannelData)Channels[i]; if (!ForceAdditionals && channelRef.curve != null) { - string fileName = Path.Combine(folder, $"{fileNameBase} {Channels[i].name}{Postfix}.txt"); + string fileName = Path.Combine(folder, $"{fileNameBase} {GetLabel(i)}{Postfix}.txt"); channelRef.curve.Export(fileName, 0, optionalHeader, Culture); } (Equalizer curve, string postfix)[] additionals = channelRef.additionalCurves; if (additionals != null) { for (int j = 0; j < additionals.Length; j++) { - string fileName = Path.Combine(folder, $"{fileNameBase} {Channels[i].name}{additionals[j].postfix}.txt"); + string fileName = Path.Combine(folder, $"{fileNameBase} {GetLabel(i)}{additionals[j].postfix}.txt"); additionals[j].curve.Export(fileName, 0, optionalHeader, Culture); } } diff --git a/Cavern.QuickEQ/Equalization/PeakingEqualizer.cs b/Cavern.QuickEQ/Equalization/PeakingEqualizer.cs index 6616fb89..68a871ad 100644 --- a/Cavern.QuickEQ/Equalization/PeakingEqualizer.cs +++ b/Cavern.QuickEQ/Equalization/PeakingEqualizer.cs @@ -46,6 +46,11 @@ public class PeakingEqualizer { /// public int Iterations { get; set; } = 8; + /// + /// Number of output bands if is called. In that case, there will be one band for each input. + /// + public int Bands => source.Bands.Count; + /// /// Input curve to approximate. ///