/// <summary> /// Control level /// </summary> /// <param name="analogFeedbackJoin">Analog feedback join to level</param> /// <param name="analogTouchJoin">Analog touch join from level</param> /// <param name="channel">The mixer channel for the soundweb to follow</param> /// <param name="gainMin">Value from -280617 to 100000</param> /// <param name="gainMax">Value from -280617 to 100000</param> /// <remarks>-100000 to 100000 = -10dB to +10dB, values below -100000 are log scaled down to -80dB /// -160204 is -20dB /// </remarks> public SoundWebChannelUILevel(UShortInputSig analogFeedbackJoin, UShortOutputSig analogTouchJoin, SoundWebChannel channel, int gainMin, int gainMax) : base(analogFeedbackJoin, analogTouchJoin) { this.Channel = channel; if (gainMin >= -280617 && gainMin <= 100000) { this.GainMinValue = gainMin; } else { this.GainMinValue = -280617; } if (gainMax >= -280617 && gainMax <= 100000) { this.GainMaxValue = gainMax; } else { this.GainMaxValue = 100000; } this.Channel.ChangeEvent += new SoundWebChannelEventHandler(Channel_ChangeEvent); this.Channel.Owner.Device.Socket.SocketConnectionEvent += new UXLib.Sockets.SimpleClientSocketConnectionEventHandler(Socket_SocketConnectionEvent); if (this.Channel.Owner.Device.Socket.Connected) { Channel.Subscribe(SoundWebChannelParamType.Gain); } }
object ValueRampThread(object sigObject) { UShortOutputSig sig = sigObject as UShortOutputSig; while (sig.IsRamping) { OnValueChange(sig.UShortValue); Thread.Sleep(10); } return(null); }
/// <summary> /// Create a level that is touch settable /// </summary> /// <param name="analogFeedbackJoin">The analog input signal join</param> /// <param name="analogTouchJoin">The analog 'touch' output signal join</param> /// <param name="enableDigitalJoin">The digital enable join</param> /// <param name="visibleDigitalJoin">The digital visible join</param> public UILevel(UShortInputSig analogFeedbackJoin, UShortOutputSig analogTouchJoin, BoolInputSig enableDigitalJoin, BoolInputSig visibleDigitalJoin) : this(analogFeedbackJoin, analogTouchJoin) { this.EnableDigitalJoin = enableDigitalJoin; this.VisibleDigitalJoin = visibleDigitalJoin; }
/// <summary> /// Create a level that is touch settable /// </summary> /// <param name="analogFeedbackJoin">The analog input signal join</param> /// <param name="analogTouchJoin">The analog 'touch' output signal join</param> public UILevel(UShortInputSig analogFeedbackJoin, UShortOutputSig analogTouchJoin) : this(analogFeedbackJoin) { this.AnalogTouchJoin = analogTouchJoin; this.PressDigitalJoin = this.Device.BooleanOutput[analogTouchJoin.Number]; }
public static void DetachSigEventHandler(this UShortOutputSig cue, UnifiedSigEventHandler handler) { cue.DetachSigEventHandler(handler, eSigEvent.UShortChange); }
/// <summary> /// /// </summary> /// <param name="sig"></param> /// <param name="a"></param> /// <returns>The Sig</returns> public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action <ushort> a) { sig.UserObject = a; return(sig); }