Пример #1
0
 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();
     }
 }
Пример #2
0
 public override void Process(MidiMessage m)
 {
     if (m.EqualsSimple(SliderMessage))
     {
         Value = m.data2 / 127d; //hardcoded velocity
         base.OnValueChanged();
     }
 }