public float GetValue(Playable playable, MidiControl control, MidiControlMode mode)
        {
            var t = (float)playable.GetTime() % DurationInSecond;

            if (mode == MidiControlMode.ControlChange)
            {
                return(GetCCValue(control, t));
            }
            else // MonoNote
            {
                return(GetNoteValue(control, t));
            }
        }
Esempio n. 2
0
        public float GetValue(Playable playable, MidiControl control, MidiControlMode mode)
        {
            if (events == null)
            {
                return(0);
            }
            var t = (float)playable.GetTime() % DurationInSecond;

            if (mode == MidiControlMode.Note)
            {
                return(GetNoteValue(control, t));
            }
            else // CC
            {
                return(GetCCValue(control, t));
            }
        }