Why do the oscillator objects (cycle~, saw~, rect~, etc.) all have different amplitudes by default?

Aris Schoute's icon

I'm currently working on a subtractive synthesis patch, and I've noticed something strange. When multiplying the signal output from any oscillator by "1", I'd expect them to all have the same -1 to 1 amplitude range. However, it appears that only the cycle~ object has this normalized amplitude... All the others are slightly different in range (they all have a smaller amplitude than the cycle~ object). When working with precise LFO settings, this can be a very annoying problem. Can someone explain why this is and how to avoid/work around it?

Christopher Dobrian's icon

cycle~ produces a true (near-ideal) sinusoid with amplitude 1 by reading from a lookup table. The objects rect~, saw~, and tri~ do not produce true classic waveforms square, sawtooth, and triangle as those are defined in electronic music textbooks; they use special algorithms that produce "band-limited" imitations of those classic waveforms without producing frequencies above the Nyquist frequency. (You can find an attempt to explain/demonstrate this in Example 17: Synthesizing classic waveforms.)

As to why they don't output more normalized amplitudes, I can't say exactly without knowing the exact synthesis algorithms being used internally by each object. Perhaps the rect~ and tri~ objects could be improved to produce default amplitudes closer to 1. Until that happens, though, I suggest just amplifying each one by an appropriate factor to normalize it, or you could use the normalize~ object.

Here's a little patch to see the discrepancies.

Max Patch
Copy patch and select New From Clipboard in Max.