private void ChangeValue(ControlStateCollection sender, MidiValue[] values, int index, byte newValue) { var oldValue = values[index]; var _newValue = new MidiValue(newValue); values[index] = _newValue; if (OnControlChanged != null) { OnControlChanged(sender, new ControlEventArgs(index, oldValue, _newValue)); } }
public ControlEventArgs(int index, MidiValue previousValue, MidiValue newValue) { Index = index; PreviousValue = previousValue; NewValue = newValue; }