DH MultiFilter2

From SoundDB
Jump to: navigation, search

A multimode filter module that can internally chain up to 8 2-pole biquad filter stages in series to achieve very steep roll off characteristics when needed. The module uses all new, original code. Filter coefficient calculations are adapted from Robert Bristow-Johnson's Cookbook formulae.


   * 64-bit internal processing throughout
   * Filter Stages pin allows selection of from 1 to 8 stages
   * LP, HP, BP1, BP2, and Notch (BR) filter types
   * 2 band pass types:
     o BP1 - constant skirt gain, peak gain = Q
     o BP2 - constant 0 dB peak gain 
   * Gain Compensation option for LP, HP and BP1 filter types
   * Frequency range extends up to Nyquist.
   * Parameters can be entered as Pitch and Res (0 - 10 volts), comparable to native SE filters, or in standard Hz and Q factor format 

Filter Parameters:

The options for entering filter parameters can be combined in any way that's convenient for your application, giving 4 possible input modes:

   * Hz/Q
   * Pitch/Res
   * Hz/Res
   * Pitch/Q 

where "Pitch" and "Res" refer to the 0 to 10 volt SE scale.

You set the input mode using the module's right-click Properties:

About Modulation: Like its predecessor, DH_MultiFilter2 is not really designed to handle audio-rate modulation of its parameters. For efficiency, the filter engine processes audio samples in groups of 4, and checks the frequency/pitch and Q/res parameter inputs for changes once every 4-sample group. This is much more frequently than the original MultiFilter, which only checked for changes once per block (usually around 96 - 128 samples). Still, if you apply a modulation signal to a DH_MultiFilter2's parameter, you should be aware that it is being effectively sampled at only 1/4 of the host sample rate, so you are likely to get aliasing-related artifacts if your modulation rate exceeds half of that, (1/8 of the host sample rate).

Gain Compensation is an option that attempts to maintain the module's total gain at a steady level, or at least within reasonable bounds, at any combination of Q or resonance level and number of stages. It can be used with LP, HP, and BP1 filter types. (BP2 and Notch filter types have constant 0dB peak gain.) Gain compensation models the filter's gain characteristics using mathematical formulas with results stored in a gain table. Although the model is quite detailed, and is reasonably accurate overall, it was not possible to capture every nuance of how the filter stages interact. As a result, there are some local "hot spots" where resonance peaks are not as well controlled, and some "dead spots", where less attenuation or even some boosting would be desirable. In many cases, these may not be a problem, depending on how the filter is being used in the application. If you find that the trouble spots do affect your application, you may need to either supplement the DH_MultiFilter2's gain compensation with your own gain control mechanism such as a limiter or compressor, use DH_MultiFilter2 with gain compensation turned off and manage the gain yourself, or choose a filter with different gain characteristics.

Filter Stages: The results of this setting are the same as you would get if you were to cascade the same number of 2-pole resonant filters in series.

Safety Warning! Multiple filter stages with high Q or resonance levels can create extreme gain levels! If you are not careful, it is quite easy to create sound and signal levels that will damage your ears, as well as your audio equipment, using DH_Multifilter2. Be aware of what you are doing, and take adequate precautions, like turning speaker volumes down whenever you make changes while working with multiple stages and Q levels greater than 1.0, or Res levels greater than 5. I cannot be held responsible for any damage that may result from your failure to protect yourself or your equipment adequately against the high dB levels that will occur if you process an audio signal through multiple filter stages at a setting that creates extreme resonance.

Enjoy the module, and please be careful!

Version History: 1.0.14 - May 20, 2007 - Fixed problem that caused module to go into sleep mode too quickly in certain situations, causing clicks.

1.0.13 - May 16, 2006 - Fixed denormals problem in idle mode. Fixed bug that caused clicks in certain situations.

1.0.12 - May 15, 2006 - beta version not publicly released.

1.0.11 - May 7, 2006 - Fixed a bug in idle mode that was causing artifacts in FruityLoops, and possibly other hosts.

1.0.10 - May 4, 2006 - Added idle mode to save CPU when the input is 0 but the input status prevents the module from entering sleep mode.

1.0.9 - April 4, 2006 - Changed internal indexing of Filter Stages pin to make the list compatible with those of standard SE modules such as Switch (1->Many) and Switch (Many->1).

1.0.8 - March 26, 2006 - Increased size of sine/cosine lookup table to improve accuracy of response to Q input at low frequencies.

1.0.7 - January 11, 2006 - Fixed instability between 30 - 40 Hz.

1.0.6 - August 24, 2005 - Initial public release.