コード例 #1
0
 /// <summary>
 /// A sawtooth wave form.
 /// </summary>
 public static W Sawtooth() => (t, f, w, p) => Amplitude.Scale(f * t % 0.9F);
コード例 #2
0
 /// <summary>
 /// A square wave form that can be modulated by the PulseWidth function. Very similar to the pulse waveform.
 /// </summary>
 public static W SquareWave() => (t, f, w, p) => Amplitude.Scale(Sign(Sin(Angle(f, t)) - Sin(PI * w * t)));
コード例 #3
0
 /// <summary>
 /// A triangle wave form.
 /// </summary>
 public static W Triangle() => (t, f, w, p) => Amplitude.Scale(Asin(Sin(Angle(f, t))) / HalfPI);
コード例 #4
0
 /// <summary>
 /// A sinusoidal wave form.
 /// </summary>
 public static W SineWave() => (t, f, w, p) => new Phasor(Amplitude.Scale(Sin(Phase(f, p))), Phase(f, p));