Timbre is the qualitative character that makes sounds with similar pitch and loudness feel different. A practical shortcut is to shape signals with different waveforms rather than study overtones first. section 10.1.2
Figure 10.2 Four standard waveforms
Compare sine, square, sawtooth, and triangle waveforms as four standard starting points for creating different sound qualities. section 10.1.2
Represent timbre through a small Haskell signal pipeline:
- Define a Wave as a function from a normalized position between 0 and 1 to a sample value. section 10.1.2
- Implement sine, square, sawtooth, and triangle waves as mathematical functions returning sample values from -1 to 1. section 10.1.2
- Repeat period samples according to frequency, then fill the requested duration to produce a tone. section 10.1.2
Exporting four timbres
Generate five-second, 220 Hz tones with each waveform, concatenate them, clamp the signal, and write the result to a WAV file. section 10.1.2
