-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zita)#: Add parameter struct and helper for easier passing of zi…
…ta parameters around
- Loading branch information
Showing
3 changed files
with
223 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace SharpPipe; | ||
|
||
/// <summary> | ||
/// Helper class for easier manipulation of parameters | ||
/// </summary> | ||
public static class ParameterHelper | ||
{ | ||
/// <summary> | ||
/// Copies the parameters from one Zita filter implementation to another | ||
/// </summary> | ||
/// <param name="zita">This Zita filter</param> | ||
/// <param name="other">The Zita filter to copy parameters from</param> | ||
public static void FromOther(this IZitaFilter zita, in IZitaFilter other) | ||
{ | ||
zita.InDelay = other.InDelay; | ||
zita.Crossover = other.Crossover; | ||
zita.RT60Low = other.RT60Low; | ||
zita.RT60Mid = other.RT60Mid; | ||
zita.HighFrequencyDamping = other.HighFrequencyDamping; | ||
zita.EQ1Frequency = other.EQ1Frequency; | ||
zita.EQ1Level = other.EQ1Level; | ||
zita.EQ2Frequency = other.EQ2Frequency; | ||
zita.EQ2Level = other.EQ2Level; | ||
zita.Mix = other.Mix; | ||
zita.Level = other.Level; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
namespace SharpPipe; | ||
|
||
|
||
/// <summary> | ||
/// Parameter struct that implements the Zita filter interface | ||
/// </summary> | ||
public struct ZitaParameters : IZitaFilter | ||
{ | ||
/// <summary> | ||
/// The input delay (ms) before reverb is applied to the incoming signal (default: 60ms) | ||
/// </summary> | ||
public float InDelay { get; set; } | ||
|
||
/// <summary> | ||
/// The separation between 'high' and 'low' frequencies (default: 200hz) | ||
/// </summary> | ||
public float Crossover { get; set; } | ||
|
||
/// <summary> | ||
/// The time in seconds it takes for low frequencies to decrease by 60dB (default: 3 seconds) | ||
/// </summary> | ||
public float RT60Low { get; set; } | ||
|
||
/// <summary> | ||
/// The time in seconds it takes for mid frequencies to decrease by 60dB (default: 2 seconds) | ||
/// </summary> | ||
public float RT60Mid { get; set; } | ||
|
||
/// <summary> | ||
/// 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) | ||
/// </summary> | ||
public float HighFrequencyDamping { get; set; } | ||
|
||
/// <summary> | ||
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the first section (default: 315hz) | ||
/// </summary> | ||
public float EQ1Frequency { get; set; } | ||
|
||
/// <summary> | ||
/// The peak level (dB) of equalizer 1 (default: 0dB) | ||
/// </summary> | ||
public float EQ1Level { get; set; } | ||
|
||
/// <summary> | ||
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the second section (default: 1500hz) | ||
/// </summary> | ||
public float EQ2Frequency { get; set; } | ||
|
||
/// <summary> | ||
/// The peak level (dB) of equalizer 2 (default: 0dB) | ||
/// </summary> | ||
public float EQ2Level { get; set; } | ||
|
||
/// <summary> | ||
/// Mixes the wet and dry signals - e.g. 0 is no reverb, 1 is only reverb (default: 1) | ||
/// </summary> | ||
public float Mix { get; set; } | ||
|
||
/// <summary> | ||
/// The factor (dB) to scale the output by (default: -20dB) | ||
/// </summary> | ||
public float Level { get; set; } | ||
} |