Before, the synth was hardwired with a band-limited saw wave. I’ve removed this restriction by allowing users to pass a table filled with information about the harmonic spectra. For each overtone, the table stores three bits of information, in this order: frequency ratio, amplitude and phase. For example, the following two lists represent the data for a 3 tone band-limited saw wave and square wave:
1, 1, 0, 2, 0.5, 0, 3, 0.333, 0 ; saw
1, 1, 0, 3, 0.333, 0, 5, 0.2, 0 ; square
Typing all of this is tedious, so I went ahead and created a handful of GEN Instruments to create and fill tables automatically for the saw, square and triangle. I’ll do one for the buzz wave and one that mimics GEN10 down the road. Though my examples are harmonic in nature, the design also allows for inharmonic overtones.
I made one other upgrade, which technically isn’t an upgrade to the synth, and is probably more of a proof-in-concept. In the previous example, I use a table filled with noise for the EQ of the acoustic body. This works really well, though it lacks the resonant peaks and dips one would expect from a real instrument. I created a GEN Instrument, GEN_Multiply, that takes two tables, multiplies their content (with interpolation if necessary), and produces a new table. So now I can create a table with envelope-like shapes to simulate peaks and dips, and multiple that with a noise table, producing a resonant noise table.
Download: add_synth_upgrade.csd
u-p-g-r-a-y-e-d-d