Ejemplo n.º 1
0
 IEnumerator MidiCoroutine(LoopNote note)
 {
     midiStreamSynthesizer.NoteOn(1, Mathf.RoundToInt(note.pitch), loopNoteVolume, note.instrumentNum);
     StartCoroutine(note.LightFlashCoroutine());
     yield return new WaitForSeconds(1);
     midiStreamSynthesizer.NoteOff(1, Mathf.RoundToInt(note.pitch));
 }
Ejemplo n.º 2
0
 public void PlayLoopNote(LoopNote note)
 {
     if (playMidi) {
         StartCoroutine (MidiCoroutine (note));
     }
     else {
         note.soundLight.GetComponent<AudioSource>().Play ();
         StartCoroutine (note.LightFlashCoroutine ());
     }
 }