Beispiel #1
0
 public void SetEncoderLed(XTouchMiniMcEncoder encoder, McEncoderRingStyle ringStyle, byte value)
 {
     if (State != ConnectionState.Open)
     {
         throw new InvalidOperationException($"SetEncoderLed is only possible if the state is {ConnectionState.Open}.");
     }
     if (value > 0x0F)
     {
         throw new ArgumentOutOfRangeException(nameof(value), value, "Maximum value for Encoder LEDs is 0xF");
     }
     _midiOut?.Send(MidiEventStatusType.CC, encoder.LedMidiCode, (byte)((byte)ringStyle + value));
 }
Beispiel #2
0
 protected virtual void OnEncoderTurned(XTouchMiniMcEncoder encoder, int ticks) => EncoderTurned?.Invoke(this, new XTouchMiniMcModeEncoderTurnedEventArgs(encoder, ticks));