Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }