GetKey() public static method

public static GetKey ( MidiChannel channel, int noteNumber ) : float
channel MidiChannel
noteNumber int
return float
Esempio n. 1
0
    public void checkDials(bool refresh)
    {
        int q = -1;

        for (int i = 0; i < 3; i++)
        {
            for (int j = 0; j < 9; j++)
            {
                ++q;
                if (refresh || !(MidiInput.GetKnob(dialID [q], MidiInput.Filter.Realtime) * mult).Equals(prevDials [i, j]))
                {
                    dials [i, j]     = (prevDials[i, j] * 10 + MidiInput.GetKnob(dialID [q], MidiInput.Filter.Realtime) * mult) / 11;
                    prevDials [i, j] = dials[i, j];
                }
                if (refresh || !(MidiInput.GetKnob(knobID [q], MidiInput.Filter.Realtime) * mult).Equals(prevKnobs [i, j]))
                {
                    knobs [i, j]     = (prevKnobs[i, j] * 10 + MidiInput.GetKnob(knobID [q], MidiInput.Filter.Realtime) * mult) / 11;
                    prevKnobs [i, j] = knobs[i, j];
                }
                if (i < 2)
                {
                    buttons [i, j] =
                        MidiInput.GetKey(buttonID[q]);
                }
            }
        }
    }
Esempio n. 2
0
    void objSwitcher()
    {
        for (int i = 0; i < things.Length; i++)
        {
            if (MidiInput.GetKey(i + 23) > .5f)
            {
                switch3DObject(i);
            }
//			print (MidiInput.GetKey (i + 23)+" , " +  (i+ 23));
        }
    }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     Debug.Log(MidiInput.GetKey(54));
 }
Esempio n. 4
0
 void Update()
 {
     transform.localScale    = Vector3.one * (0.1f + MidiInput.GetKey(channel, noteNumber));
     renderer.material.color = MidiInput.GetKeyDown(channel, noteNumber) ? Color.red : Color.white;
 }
Esempio n. 5
0
 void Update()
 {
     transform.localScale = Vector3.one * (0.1f + MidiInput.GetKey(noteNumber));
     GetComponent <Renderer>().material.color = MidiInput.GetKeyDown(noteNumber) ? Color.red : Color.white;
 }