Example #1
0
 public void stateChanged(ChangeEvent e) {
   JSlider sliderCutoff = (JSlider) e.getSource();
   int cutoff = (int) sliderCutoff.getValue();
   filter.setCutoff((double) cutoff / 4000.0d);
 }
Example #2
0
 public void stateChanged(ChangeEvent e) {
   JSlider sliderResonance = (JSlider) e.getSource();
   int ripple = (int) sliderResonance.getValue();
   filter.setRipple((double) ripple / 2.0d);
 }
Example #3
0
  public void actionPerformed(ActionEvent e) {
    String actionCommand = e.getActionCommand();

    if (actionCommand == "Low-pass") filter.setLowpass(true);
    else if (actionCommand == "High-pass") filter.setLowpass(false);
  }