public void PlayNote(Channel channel, Pitch pitch, int velocity, TimeSpan end) { NoteOn(channel, pitch, velocity); var timeOut = new NoteTimeOut() { Channel = channel, End = end - TimeSpan.FromMilliseconds(10), // subtract 10 ms to prevent errors with turning off notes Pitch = pitch, Velocity = velocity }; timeOuts.Add(timeOut); }