예제 #1
0
 public void PlayNote(int track, TextPlayer.Note note, TimeSpan end)
 {
     PlayNote(
         TrackToChannel(track),
         NoteToPitch(note),
         NoteToVelocity(note),
         end);
 }
예제 #2
0
        private Pitch NoteToPitch(TextPlayer.Note note)
        {
            string type = note.Type.ToString().ToUpperInvariant();

            type += note.Sharp ? "Sharp" : "";
            type += note.Octave;
            return((Midi.Pitch)Enum.Parse(typeof(Midi.Pitch), type));
        }
예제 #3
0
 private int NoteToVelocity(TextPlayer.Note note)
 {
     return((int)(note.Volume * 127));
 }
예제 #4
0
 protected override void PlayNote(TextPlayer.Note note, int _, TimeSpan time)
 {
 }