Beispiel #1
0
 private void StopOneNote()
 {
     if (NotePlaying != null)
     {
         //Debug.Log("Stop note");
         // Stop the note (method to simulate a real human on a keyboard : duration is not known when note is triggered)
         midiStreamPlayer.MPTK_StopEvent(NotePlaying);
         NotePlaying = null;
     }
 }
 //has to be called to stop the note after playing
 private void StopOneNote()
 {
     if (notePlaying != null)
     {
         //Debug.Log("Stop note");
         midiStreamPlayer.MPTK_StopEvent(notePlaying);
         notePlaying = null;
     }
 }
Beispiel #3
0
        IEnumerator StopFade(int note_num)
        {
            float fade = 0.0f;

            while (fade < 1.0f)
            {
                fade += 0.1f;
                yield return(new WaitForSeconds(0.01f));
            }
            midiStreamPlayer.MPTK_StopEvent(NotePlaying[note_num]);
        }
Beispiel #4
0
 private void StopOneNote(int val)
 {
     midiStreamPlayer.MPTK_StopEvent(NotePlaying);
 }