Skip to content

Commit 86ea009

Browse files
committed
feat(zita)#: Add parameter struct and helper for easier passing of zita parameters around
1 parent 12e63db commit 86ea009

File tree

3 files changed

+223
-1
lines changed

3 files changed

+223
-1
lines changed

SharpPipe/Docs.xml

+133-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SharpPipe/Helpers/ParameterHelper.cs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
namespace SharpPipe;
2+
3+
/// <summary>
4+
/// Helper class for easier manipulation of parameters
5+
/// </summary>
6+
public static class ParameterHelper
7+
{
8+
/// <summary>
9+
/// Copies the parameters from one Zita filter implementation to another
10+
/// </summary>
11+
/// <param name="zita">This Zita filter</param>
12+
/// <param name="other">The Zita filter to copy parameters from</param>
13+
public static void FromOther(this IZitaFilter zita, in IZitaFilter other)
14+
{
15+
zita.InDelay = other.InDelay;
16+
zita.Crossover = other.Crossover;
17+
zita.RT60Low = other.RT60Low;
18+
zita.RT60Mid = other.RT60Mid;
19+
zita.HighFrequencyDamping = other.HighFrequencyDamping;
20+
zita.EQ1Frequency = other.EQ1Frequency;
21+
zita.EQ1Level = other.EQ1Level;
22+
zita.EQ2Frequency = other.EQ2Frequency;
23+
zita.EQ2Level = other.EQ2Level;
24+
zita.Mix = other.Mix;
25+
zita.Level = other.Level;
26+
}
27+
}

SharpPipe/Structs/ZitaParameters.cs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
namespace SharpPipe;
2+
3+
4+
/// <summary>
5+
/// Parameter struct that implements the Zita filter interface
6+
/// </summary>
7+
public struct ZitaParameters : IZitaFilter
8+
{
9+
/// <summary>
10+
/// The input delay (ms) before reverb is applied to the incoming signal (default: 60ms)
11+
/// </summary>
12+
public float InDelay { get; set; }
13+
14+
/// <summary>
15+
/// The separation between 'high' and 'low' frequencies (default: 200hz)
16+
/// </summary>
17+
public float Crossover { get; set; }
18+
19+
/// <summary>
20+
/// The time in seconds it takes for low frequencies to decrease by 60dB (default: 3 seconds)
21+
/// </summary>
22+
public float RT60Low { get; set; }
23+
24+
/// <summary>
25+
/// The time in seconds it takes for mid frequencies to decrease by 60dB (default: 2 seconds)
26+
/// </summary>
27+
public float RT60Mid { get; set; }
28+
29+
/// <summary>
30+
/// Frequencies (hz) above this one are heard half as long as as the mid-range frequencies - e.g. when their T60 is half of the middle-range's T60 (default: 6000hz)
31+
/// </summary>
32+
public float HighFrequencyDamping { get; set; }
33+
34+
/// <summary>
35+
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the first section (default: 315hz)
36+
/// </summary>
37+
public float EQ1Frequency { get; set; }
38+
39+
/// <summary>
40+
/// The peak level (dB) of equalizer 1 (default: 0dB)
41+
/// </summary>
42+
public float EQ1Level { get; set; }
43+
44+
/// <summary>
45+
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the second section (default: 1500hz)
46+
/// </summary>
47+
public float EQ2Frequency { get; set; }
48+
49+
/// <summary>
50+
/// The peak level (dB) of equalizer 2 (default: 0dB)
51+
/// </summary>
52+
public float EQ2Level { get; set; }
53+
54+
/// <summary>
55+
/// Mixes the wet and dry signals - e.g. 0 is no reverb, 1 is only reverb (default: 1)
56+
/// </summary>
57+
public float Mix { get; set; }
58+
59+
/// <summary>
60+
/// The factor (dB) to scale the output by (default: -20dB)
61+
/// </summary>
62+
public float Level { get; set; }
63+
}

0 commit comments

Comments
 (0)