 
   setFilterType: (type) ->
     @type = type
-    @recalculateCoefficients()
-
-  setQ: (q) ->
-    @parameterType = Filter.Q
-    @Q = Math.max(Math.min(q, 115.0), 0.001)
     @recalculateCoefficients()
 
   setBW: (bw) ->

        @a1 =  -2 * cosw0
        @a2 =   1 - alpha

      when Filter.BPF_CONSTANT_SKIRT       # H(s) = s / (s^2 + s/Q + 1)  (constant skirt gain, peak gain = Q)
        @b0 =   sinw0/2
        @b1 =   0
        @b2 =  -sinw0/2

                      # dB/octave, remains proportional to S for all other values for a
                      # fixed f0/Fs and dBgain.

  #
  # Basic filter parameters
  setCutoffFrequency: (freq) ->
    @setF0(freq)

  setQ: (q) ->
    @parameterType = Filter.Q
    @Q = Math.max(Math.min(q, 115.0), 0.001)
    @recalculateCoefficients()

  #
  # Advanced filter parameters
  coefficients: ->
    b = [@b0, @b1, @b2]
    a = [@a0, @a1, @a2]
