Filtering

Parameter alias Brief description Typical range
cutoff lpf Low-pass filter: cutoff freq (hertz) 0 - > x
resonance lpq res Low-pass resonance Q 0.0 - 1.0
hcutoff hpf High-pass filter: cutoff freq (hertz) 0 -> x
hresonance hpq High-pass resonance Q 0.0 - 1.0
bandf bpf Bandpass filter - cutoff freq (hertz) 0 -> x
bandq bpq Bandpass resonance Q 1 - 100+
djf djf DJ Filter: Low pass: 0 - 0.5, High pass: 0.5 - 1.0 0.0 - 1.0
hbrick Spectral high pass Mads Kjeldgaard 0.0 - 1.0
lbrick Spectral low pass Mads Kjeldgaard 0.0 - 1.0

Filter resonance

  • Take caution with filter resonance for lpf and hpf. Values > 0.5 can be harsh!
  • Resonance for bandpass filter bandq is different and often needs higher values (over 10) to be perceived.

This example shows a band pass filter cycling through the harmonic series. Notice the high resonance setting. With bandq=1 the filtering effect is too small to be heard.

# fire is a SuperDirt sample with a spectrum like colored noise
Pa * d('fire', legato=1.5, bandf='100 200 400 600 700 800 900', bandq='100')

Other filter examples:

# low pass randomized
@swim
def test_fx(p=0.25):
    D('jvbass',
        midinote='C|C|Eb|G|Bb',
        cutoff='rand*7000', resonance='rand/2', amp=1
    )
    again(test_fx, p=0.5)

# djf
@swim
def djf(p=1, i=0):
    D('supersaw', n='40 52 64 52',
    djf=random(), i=i)
    again(djf, p=1, i=i+1)

Spectral comb filter

Included in Superdirt, engineered by Mads Kjeldgaard. Width and number of teeth are controlled by one floating point number. Note that as you increase the comb, more frequencies will be filtered out, resulting in reduced gain.

Parameter Brief description Typical range
comb Spectral comb filter 0.0 - 1.0
@swim
def test_fx(p=0.25):
    D('jvbass',
        midinote='C|C|Eb|G|Bb',
        cutoff='rand*7000', resonance='rand/2', amp=1
    )
    again(test_fx, p=0.5)