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