예제 #1
0
 public void stateChanged(ChangeEvent e) {
   JSlider sliderCutoff = (JSlider) e.getSource();
   int cutoff = (int) sliderCutoff.getValue();
   filter.setCutoff((double) cutoff / 4000.0d);
 }
예제 #2
0
 public void stateChanged(ChangeEvent e) {
   JSlider sliderResonance = (JSlider) e.getSource();
   int ripple = (int) sliderResonance.getValue();
   filter.setRipple((double) ripple / 2.0d);
 }
예제 #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);
  }