HEnquist / camillagui

GNU General Public License v3.0
9 stars 1 forks source link

Next CamillaDSP version allows more ways to define filters #46

Closed HEnquist closed 3 years ago

HEnquist commented 3 years ago

Peaking/Allpass/Notch/Bandpass will allow giving either bandwidth or q, and High/Lowshelf will allow either slope or q. The question is how to implement this in the gui. Simplest is probably a dropdown to select which definition is used. Other ideas?

Example definitions, both valid:

peak_100_q:
    type: Biquad
    parameters:
      type: Peaking
      freq: 100
      q: 0.5
      gain: -5.0
  peak_100_bw:
    type: Biquad
    parameters:
      type: Peaking
      freq: 100
      bandwidth: 0.7
      gain: -5.0
JWahle commented 3 years ago

I'll try to make the description a select field.

JWahle commented 3 years ago

By Bandpass filters, you mean highpass and lowpass, right? What tooltip and default value should the bandwidth parameter have?

HEnquist commented 3 years ago

Oh the gui is missing the Bandpass type! https://github.com/HEnquist/camilladsp/blob/master/src/biquad.rs#L206 The bandwidth parameter is allowed for Peaking/Allpass/Notch/Bandpass (the ones where it makes sense). 1.0 is a nice and simple default, tooltip "Filter bandwidth in octaves".

JWahle commented 3 years ago

I pushed an implementation to develop. Please have a look. While you're at it, you might want to fix the validation errors :)

HEnquist commented 3 years ago

I'll try it! Which branch of pycamilladsp-plot did you use? I haven't merged the changes to master yet, they are still in "filterspec".

HEnquist commented 3 years ago

Works great! Validations also seem to work fine with the updated branch of pycamilladsp-plot. One thing to think about, now the new dropdown says "q", and for other fiters it's "Q". I have no strong preference for q or Q, but it should be the same everywhere.

JWahle commented 3 years ago

"Q" is now shown consistently. I also did some other cleanup/organizational stuff. It's all in the develop branch.

HEnquist commented 3 years ago

This is working fine, closing