Exemplo n.º 1
0
  /**
   * Gets a new DataBead filled with the properties "minimum" and "maximum" set to the corresponding
   * UGen controllers, if they exist, or to static values.
   *
   * @return The new parameter DataBead.
   */
  public DataBead getParams() {
    DataBead db = new DataBead();
    if (isMinStatic) {
      db.put("minimum", min);
    } else {
      db.put("minimum", minUGen);
    }

    if (isMaxStatic) {
      db.put("maximum", max);
    } else {
      db.put("maximum", maxUGen);
    }

    return db;
  }
Exemplo n.º 2
0
  /**
   * Sets the Clip parameters according to the properties "maximum" and/or "minimum" in the
   * specified DataBead.
   *
   * @param db The parameter DataBead.
   * @return This DataBeadReceiver instance.
   */
  public DataBeadReceiver sendData(DataBead db) {
    if (db != null) {
      UGen u = db.getUGen("maximum");
      if (u == null) {
        setMaximum(db.getFloat("maximum", max));
      } else {
        setMaximum(u);
      }

      u = db.getUGen("minimum");
      if (u == null) {
        setMinimum(db.getFloat("minimum", min));
      } else {
        setMinimum(u);
      }
    }
    return this;
  }
Exemplo n.º 3
0
 /**
  * Gets a new DataBead filled with the properties "minimum" and "maximum" set to their current
  * values.
  *
  * @return The new DataBead.
  */
 public DataBead getStaticParams() {
   DataBead db = new DataBead();
   db.put("minimum", min);
   db.put("maximum", max);
   return db;
 }