// @Override
    public void run() {
      try {
        keepRunning = true;
        boolean isRising = true;
        while (keepRunning) {

          Thread.sleep(10); // decrease or remove to speed up the refresh rate.
          phase++;
          if (sinAmp >= MAX_AMP_SEED) {
            isRising = false;
          } else if (sinAmp <= MIN_AMP_SEED) {
            isRising = true;
          }

          if (isRising) {
            sinAmp += AMP_STEP;
          } else {
            sinAmp -= AMP_STEP;
          }
          notifier.notifyObservers();
        }
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
 public void removeObserver(Observer observer) {
   notifier.deleteObserver(observer);
 }
 public void addObserver(Observer observer) {
   notifier.addObserver(observer);
 }