I'm trying to understand Csound's gen09, and I tried this line:
gigen ftgen 1, 0, 16384, 9, 1, 1, 0, 1, 1, 180
The way I understood how gen09 works, the second partial in this case is supposed to cancel the first, because they are both at the fundamental frequency (1), and the phase is inverted (0 and 180). But instead of silence, I get a wave that looks like this:
What exactly is happening here to create this waveform?
What is happening here is that because rescaling is on (positive GEN number), the
small errors in the calculation are amplified (so the max value is 1). If you constructed the table with -9, you will see that the result is what you expected.
a1 oscili 0dbfs,A4,1
f1 0 16384 -9 1 1 0 1 1 180
i1 0 1
The result should be
new alloc for instr 1:
B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0
Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score. overall amps: 0.0
overall samples out of range: 0