synthesis

Generate classic waveforms

There are certain wave types that are historically used in electronic music, known as "classic" waveforms: sine, sawtooth, square, and triangle. These are the four waveforms generated by the classic Moog synthesizer oscillators, and are still quite useful in computer music.

Scale and offset

There’s a simple way to convert one range of values into a corresponding set of values in a different range. The mathematical operations necessary to do that are “scaling” (one multiplication) and “offsetting” (one addition).