public override void Process(MidiMessage m) { if (this.State) { if (this.IsToggle) { if (m.EqualsSimple(this.EnableMessage)) { this.State = false; } base.OnValueChanged(); } else { if (m.EqualsSimple(this.DisableMessage)) { this.State = false; } base.OnValueChanged(); } } else { if (m.EqualsSimple(this.EnableMessage) && m.data2 > this.Treshold) { this.State = true; } base.OnValueChanged(); } }
public override void Process(MidiMessage m) { if (m.EqualsSimple(SliderMessage)) { Value = m.data2 / 127d; //hardcoded velocity base.OnValueChanged(); } }