public void PlayNote(int track, TextPlayer.Note note, TimeSpan end) { PlayNote( TrackToChannel(track), NoteToPitch(note), NoteToVelocity(note), end); }
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)); }
private int NoteToVelocity(TextPlayer.Note note) { return((int)(note.Volume * 127)); }
protected override void PlayNote(TextPlayer.Note note, int _, TimeSpan time) { }