Exemple #1
0
  protected void recalcOutFreq() {
    if (inRate == 0f) return;

    double omegaIn, omegaOut, warp;
    ParamField ggOutFreq;

    omegaIn = pr.para[PR_INFREQ].val / inRate * Constants.PI2;
    warp = Math.max(-0.98, Math.min(0.98, pr.para[PR_WARP].val / 100)); // DAFx2000 'b'
    omegaOut = omegaIn + 2 * Math.atan2(warp * Math.sin(omegaIn), 1.0 - warp * Math.cos(omegaIn));

    ggOutFreq = (ParamField) gui.getItemObj(GG_OUTFREQ);
    if (ggOutFreq != null) {
      ggOutFreq.setParam(new Param(omegaOut / Constants.PI2 * inRate, Param.ABS_HZ));
    }
  }