The first place where we can really see the WDRC parameters is in the example “05-FullSystems\WDRC_8BandFIR”. In this example sketch, look at the file “GHA_Constants.h” (GHA stands for "General Hearing Aid).
In this file, you see two groups of settings: the “dsl” settings and the “gha” settings. Given that this example calls itself “8BandFIR”, this example breaks up the audio into 8 parallel frequency bands and applies a compressor to each. Then, at the end, it rejoins the 8 bands into a single “broadband” channel and applies one final compressor. Let’s focus on that last “gha” broadband compressor because will expose everything that we want to see about the WDRC compressor settings:
BTNRH_WDRC::CHA_WDRC gha = {5.f, // attack time (ms)
300.f, // release time (ms)
24000.f, // sampling rate (Hz)...ignored. Set globally in the main program.
115.f, // maxdB. calibration. dB SPL for signal at 0dBFS. Needs to be tailored to mic, spkrs, and mic gain.
1.0, // compression ratio for lowest-SPL region (ie, the expansion region) (should be < 1.0. set to 1.0 for linear)
0.0, // kneepoint of end of expansion region (set very low to defeat the expansion)
0.f, // compression-start gain....set to zero for pure limitter
115.f, // compression-start kneepoint...set to some high value to make it not relevant
1.f, // compression ratio...set to 1.0 to make linear (to defeat)
98.0 // output limiting threshold...hardwired to compression ratio of 10.0
};
By looking at the comments, you get an overall idea of what each setting does. It has the attack and release times, the sample rate (totally ignored), followed by the WDRC kneepoints and compression ratios. This is the good stuff.
For the kneepoints and compression ratios, you can learn everything that you need to know using that graphing calculator that I linked earlier. For me, playing with that calculator was way more helpful than words.
The odd setting here, the only one currently unexplained, is the setting named “maxdB” (shown at a value of 115). What is this??? Next post…
Chip