I am trying to generate a sum of sines with Sinewave function and compute its fft to see if i can get back the magnitude of each harmonic. This is aiming at, later, getting a real signal and computing its fft. But for the moment I'm testing the code on virtual signals (square, triangle etc).
However, I fail at plotting the sum of 3 sines. I don"t understand how i can generate a first sine (fundamental) and then sines with a frequency multiple of the fundamental. (f, 3f and 5f).
Ah. This was one of those simple mistakes that takes forever to find. For the Frequency parameter you have specified "1/512", but since that is integer division, it evaluates to 0. Instead do "1.0/512".