A number of signals originally used for analog synthesis, including impulse trains, square, sawtooth, and triangular waveforms as shown in Figs. 6 and 7, are also popular in discrete-time synthesis contexts.
Figure 6:
Square and impulse train waveforms, with their associated frequency magnitude responses.
Figure 7:
Sawtooth and triangular waveforms, with their associated frequency magnitude responses.
These signals are trivial to synthesize with computers using either an iterative, “algorithmic” approach or a wavetable.
For example, a digital sawtooth waveform of fundamental frequency can be generated from
, where is the sample period.
As well, connecting a phasor~ object to [expr~ if($v1 <= 0.5, -1, 1)] in Pd will create a square wave.
Note that these trivial approaches generate time-domain signal discontinuities.