SignalProcessing.Compute.Generate.Wave

This node generates different types of waveforms (cosine, sine, sawtooth, square, constant). The type of waveform can be selected via the input slot named type:

  • Type = 0: cosine wave
  • Type = 1: sine wave
  • Type = 2: sawtooth wave
  • Type = 3: square wave
  • Type = 4: constant

Cosine Wave

wave_cos
The generated signal is computed by:
$\mathrm{x}[n] = A \cos\left(2\pi\frac{n+M}{W}\right) \quad \forall \,\, n \in [0;N-1]$
where $N$ denotes the length of the signal, $A$ the amplitude, $W$ the wavelength, and $M$ the offset.

Sine Wave

wave_sin
The generated signal is computed by:
$\mathrm{x}[n] = A \sin\left(2\pi\frac{n+M}{W}\right) \quad \forall \,\, n \in [0;N-1]$
where $N$ denotes the length of the signal, $A$ the amplitude, $W$ the wavelength, and $M$ the offset.

Sawtooth Wave

wave_saw
The generated signal is computed by:
$\mathrm{x}[n] = A \left(2.0 \frac{(n+M) \, \bmod \, W}{W} - 1.0\right) \quad \forall \quad n \in [0;N-1]$
where $N$ denotes the length of the signal, $A$ the amplitude, $W$ the wavelength, and $M$ the offset.

Square Wave

wave_square
The generated signal is computed by:
$\mathrm{x}[n] = \begin{cases} A & :\quad 2.0 \, \left((n+M) \, \bmod \, W \right) \ge W \\ -A & :\quad 2.0 \, \left((n+M) \, \bmod \, W \right) < W \\ \end{cases}$
$\forall \,\, n \in [0;N-1]$,
where $N$ denotes the length of the signal, $A$ the amplitude, $W$ the wavelength, and $M$ the offset.

Constant

wave_constant
The generated signal is a constant:
$\mathrm{x}[n] = A \quad \forall \quad n \in [0;N-1]$
where $N$ denotes the length of the signal and $A$ the amplitude.