/* @brief Method to change the value of a param in the dsp
  * @param value Value of the param in the dsp
  * @param newvalue Current value of the param in the inspector */
 private void changeValueParam(float value, float newvalue, int param)
 {
     if (newvalue != value)
     {
         _dsp.setParameter(param, newvalue);
     }
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        //karplus.setParameter(param, x);
        //karplus.setParameter(param1, 1f);


        //if (Input.GetKeyDown (KeyCode.Space)) {
        //x += 10f;
        //karplus.setParameter(param, x);
        //x1 = 1; ALL NOT USED
        karplus.setParameter(param1, startstop);                 //1
        //}
        //karplus.setParameter(param1, x1);
        //else if (Input.GetKeyUp(KeyCode.Space)){
        //x1 = 0; NOT USED
        //	karplus.setParameter(param1, 0); //0
        //}



        x1 = (trans_cube.localScale.x) * multiply;         //get the local scale

        x = scale(100, 1000, 1000, 100, x1);

        karplus.setParameter(param, x);          //x1

        /*
         * if (Input.GetKeyDown ("a")) {
         *      //x += 100;
         *      karplus.setParameter (param, 600);
         * } else if(Input.GetKeyUp ("a")) {
         *      karplus.setParameter (param, 200);
         * }
         */

        //else if (Input.GetKeyUp(KeyCode.UpArrow)){
        //x1 = 320f;
        //}

        //transform.localScale.x
        //public Transform
    }