public void OnPointerDown(PointerEventData eventData) { if (midiNote > -1) { midiManager.PlayMidiNote(midiNote); } }
private void StartMidiSoundForEnteredNotes(double positionInSongInMillis) { int newlyEnteredNoteCount = 0; foreach (Note note in upcomingSortedNotes) { double startMillis = BpmUtils.BeatToMillisecondsInSong(songMeta, note.StartBeat); if (positionInSongInMillis < startMillis) { // The list is sorted, thus we did not reach any of the following notes in the list as well. break; } else { newlyEnteredNoteCount++; midiManager.PlayMidiNote(note.MidiNote); currentlyPlayingNotes.Add(note); } } if (newlyEnteredNoteCount > 0) { upcomingSortedNotes.RemoveRange(0, newlyEnteredNoteCount); } }
private void PlayMidiNote() { StopMidiNote(); if (midiNote > -1) { midiManager.PlayMidiNote(midiNote); } }
public void OnPointerDown(PointerEventData eventData) { // Play midi sound via Ctrl if (!isPlayingMidiSound && InputUtils.IsKeyboardControlPressed()) { isPlayingMidiSound = true; midiManager.PlayMidiNote(Note.MidiNote); } }