Skip to content

Commit

Permalink
Minor EQ features
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Apr 15, 2024
1 parent dc6e75f commit bc68842
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public EqualizerFilterSet(ReferenceChannel[] channels, int sampleRate) : base(sa

/// <summary>
/// Construct an <see cref="EqualizerFilterSet"/> without the data of <see cref="Channels"/> pre-created.
/// This is useful when you also derive <see cref="EqualizerChannelData"/> and call <see cref="FilterSet.Initialize{T}"/>.
/// This is useful when you also derive <see cref="EqualizerChannelData"/> and call <see cref="FilterSet.Initialize{T}(int)"/>.
/// </summary>
protected EqualizerFilterSet(int sampleRate) : base(sampleRate) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
5 changes: 5 additions & 0 deletions Cavern.QuickEQ/Equalization/PeakingEqualizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public class PeakingEqualizer {
/// </summary>
public int Iterations { get; set; } = 8;

/// <summary>
/// Number of output bands if <see cref="GetPeakingEQ(int)"/> is called. In that case, there will be one band for each input.
/// </summary>
public int Bands => source.Bands.Count;

/// <summary>
/// Input curve to approximate.
/// </summary>
Expand Down

0 comments on commit bc68842

Please sign in to comment.