Ejemplo n.º 1
0
    void Update()
    {
        var pressure = MidiMaster.GetChannelAfterTouch();

        transform.localScale = new Vector3(0.1f + pressure, 0.1f + pressure * 8.0f, 0.1f + pressure);
        var color = new Color(pressure, 0.0f, 0.0f, 1.0f);

        GetComponent <Renderer>().material.color = color;
    }
Ejemplo n.º 2
0
 // get channel after touch. this API can't indicate what pad is pressed
 public static float GetAfterTouchPressure()
 {
     // TODO: support PolyAfterTouch
     return(MidiMaster.GetChannelAfterTouch());
 }