I've been experimenting with PYO recently, a Python module for sound synthesis and audio processing. This is really my first foray into this topic, so I have what is probably a very basic question.
There are a few alternative mechanisms available for creating periodic waveforms such as a sawtooth or triangle wave:
Using additive synthesis (via SawTable, which internally calls HarmTable)
This approximates a waveform through successive addition of sine waves. E.g.,
from pyo import * table = SawTable(order=20)
Which gets me:
Using a "linear" table (LinTable)
This allows one to construct a waveform as a series of straight line segments. E.g.,
from pyo import * table = pyo.LinTable([(0, -1), (8191, 1)])
Which gets me:
These two waveforms sound similar, of course, but they are qualitatively different. What is the technical difference between the two? Is there a reason to prefer one mechanism over the other?