[PD] Rounding errors in osc~?
Mathieu Bouchard
matju at sympatico.ca
Fri Aug 20 08:14:28 CEST 2004
On Thu, 19 Aug 2004 acabrera at teleset.com.co wrote:
> I'm wondering why I'm not getting the expected behaviour when trying
> to add several osc~ together to get things like a saw wave with
> additive synthesis. I've made this patch that compares the result
> using osc~ and using a table to generate the sine waves. Is it a known
> rounding error somewhere, or is it (as usual) me?
well, the amplitudes of your harmonics are not correct. They shouldn't be
like pow(2,-N), but rather, like 1/N.
and then, it only gives a sawtooth when using certain phases... using all
sines gives a sawtooth. There are sine/cosine combinations that work, but
you can't use all cosines because the sawtooth is never an "even"
function: it doesn't have a reflection symmetry.
________________________________________________________________
Mathieu Bouchard http://artengine.ca/matju
More information about the Pd-list
mailing list