Hello.
My question concerns the wavetables other than sine-table, saw-table and tri-table*.In the case of a creation of a wavetable by the user, the principle is it the following one:
Take in a sample (a sound of trumpet for exemple) a quite small fragment (a period of the sound wave).
Example: In the “square-wav” function, a waveform “wave” is built (line 35) using “build-harmonic”, and then converted to a wavetable and used to generate the tone in line 36.
(Line 37 just applies a bit of filtering to reduce overshoot of the waveform to make it look more “square”,
Line 38 trims the start so that the tone starts cleanly.
Line 39 Normalizes and amplifies to the required peak level.)