                       # 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]

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

      when Filter.APF       # H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1)
        @b0 =   1 - alpha
        @b1 =  -2*cosw0
        @b2 =   1 + alpha

    #

    switch @type
      when Filter.LOW_PASS       # H(s) = 1 / (s^2 + s/Q + 1)
        @b0 =  (1 - cosw0)/2
        @b1 =   1 - cosw0
        @b2 =  (1 - cosw0)/2
