Exemplo n.º 1
0
 private void SetRealValue(double value, EChangeType changeType)
 {
     if (!DSPFunctions.IsZero(Math.Abs(RealValue - value)))
     {
         RealValue = value;
         OnValueChange?.Invoke(changeType);
     }
 }
Exemplo n.º 2
0
 public FrequencyParameter(string name, string label, string shortLabel, double min = 1, double max = 20000, bool canBeAutomated = true) :
     base(name, label, shortLabel, min, max, 1, canBeAutomated)
 {
     if (Min < 0 ||
         DSPFunctions.IsZero(Min))
     {
         throw new ArgumentException();
     }
 }
Exemplo n.º 3
0
        public double ModifyValue(double currentValue, int sampleNumber)
        {
            var gain = Gain.Value;

            if (DSPFunctions.IsZero(gain))
            {
                return(currentValue);
            }

            var amplitude = GetCurrentAmplitude(sampleNumber);

            gain *= amplitude * Math.Min(currentValue, 1 - currentValue);

            return(DSPFunctions.Clamp01(currentValue + gain));
        }
Exemplo n.º 4
0
 private bool IsRealValueTrue()
 {
     return(!DSPFunctions.IsZero(GetRealValue()));
 }