Skip to content

Commit

Permalink
chore(zita)#: Add interface for zita reverb
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueCyro committed Sep 11, 2024
1 parent 32ce85f commit 75062ab
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 3 deletions.
62 changes: 62 additions & 0 deletions SharpPipe/Interfaces/IZitaFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
namespace SharpPipe;

/// <summary>
/// Represents the interface for Zita Reverb objects
/// </summary>
public interface IZitaFilter
{
/// <summary>
/// The input delay (ms) before reverb is applied to the incoming signal (default: 60ms)
/// </summary>
float InDelay { get; }

/// <summary>
/// The separation between 'high' and 'low' frequencies (default: 200hz)
/// </summary>
float Crossover { get; }

/// <summary>
/// The time in seconds it takes for low frequencies to decrease by 60dB (default: 3 seconds)
/// </summary>
float RT60Low { get; }

/// <summary>
/// The time in seconds it takes for mid frequencies to decrease by 60dB (default: 2 seconds)
/// </summary>
float RT60Mid { get; }

/// <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>
float HighFrequencyDamping { get; }

/// <summary>
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the first section (default: 315hz)
/// </summary>
float EQ1Frequency { get; }

/// <summary>
/// The peak level (dB) of equalizer 1 (default: 0dB)
/// </summary>
float EQ1Level { get; }

/// <summary>
/// The center frequency (hz) of the Regalia Mitra peaking equalizer for the second section (default: 1500hz)
/// </summary>
float EQ2Frequency { get; }

/// <summary>
/// The peak level (dB) of equalizer 2 (default: 0dB)
/// </summary>
float EQ2Level { get; }

/// <summary>
/// Mixes the wet and dry signals - e.g. 0 is no reverb, 1 is only reverb (default: 1)
/// </summary>
float Mix { get; }

/// <summary>
/// The factor (dB) to scale the output by (default: -20dB)
/// </summary>
float Level { get; }
}
6 changes: 3 additions & 3 deletions SharpPipe/Managed wrapper classes/ZitaReverb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ namespace SharpPipe;
/// <summary>
/// Uses the 8 FDB zitareverb algorithm to provide reverb to processed samples ( see: https://paulbatchelor.github.io/res/soundpipe/docs/zitarev.html )
/// </summary>
public class ZitaReverb : IDisposable
public class ZitaReverb : IDisposable, IZitaFilter
{
internal IntPtr zitaRevObject;

/// <summary>
/// The soundpipe object used by this reverb
/// </summary>
public SoundPipe Pipe;
public SoundPipe Pipe { get; }

/// <summary>
/// True if the object is disposed
Expand Down Expand Up @@ -198,4 +198,4 @@ private void Dispose(bool disposing)
{
Dispose(false);
}
}
}

0 comments on commit 75062ab

Please sign in to comment.