public void StopNote(object sender, NoteEventArgs e) { char handId = e.GetHandId(); int noteIndex = e.GetNoteIndex(); if (handId == 'R') { isNotePlayingArray[1, noteIndex] = false; if (holdNote) { outputDevice.SendNoteOff(Channel.Channel1, scale[noteIndex], 100); } noteIndexRight = -1; } else if (handId == 'L') { isNotePlayingArray[0, noteIndex] = false; if (holdNote) { outputDevice.SendNoteOff(Channel.Channel1, scale[noteIndex], 100); } noteIndexLeft = -1; } }
public void PlayNote(object sender, NoteEventArgs e) { char handId = e.GetHandId(); int noteIndex = e.GetNoteIndex(); if (handId == 'R') { noteIndexRight = noteIndex; new Thread(() => PlayRightHandNote(noteIndex)).Start(); isNotePlayingArray[1, noteIndexRight] = true; } else if (handId == 'L') { noteIndexLeft = noteIndex; new Thread(() => PlayLeftHandNote(noteIndex)).Start(); isNotePlayingArray[0, noteIndexLeft] = true; } }
public void StopPerformanceNote(object sender, NoteEventArgs e) { char handId = e.GetHandId(); int noteIndex = e.GetNoteIndex(); if (handId == 'R') { isNotePlayingArray[1, noteIndex] = false; new Thread(() => PlayRightHandPerformanceNote(noteIndex, false)).Start(); noteIndexRight = -1; } else if (handId == 'L') { isNotePlayingArray[0, noteIndex] = false; new Thread(() => PlayLeftHandPerformanceNote(noteIndex, false)).Start(); noteIndexLeft = -1; } }
private void PlayLeaveAnimation(object sender, NoteEventArgs e) { handLeaveStoryboards[e.GetNoteIndex()].Begin(this); }
private void PlayStopAnimation(object sender, NoteEventArgs e) { int c = e.GetNoteIndex(); stopPlayingStoryboards[c].Begin(this); }