This is more of a general dsp question, but I thought I’d ask it here as I am using dsp::FFT (and this is a pretty responsive community).
I’m playing around with band limiting single cycle waveforms for a wavetable synth. As part of this, I’m running them through a fft/ifft cycle where I do some processing in the frequency domain before the ifft. I have a set of simple waveforms I’m testing on and a unity test where I just do a fft/ifft with no processing for baseline verification. In the unity case, I would expect the wave I put in would not be transformed after the fft/ifft.
I notice that of my simple waveforms (sine, square, triangle, saw, 1/8 pulse width, 1/4 pulse width), the pulse width waves get attenuated in the fft/ifft unity process. It seems functional - the 1/8 width wave comes back with a normalized amplitude of .25. The 1/4 width wave is .5. In both cases, the lower part of the wave is still -1.
I’d like to understand why this is happening. I’ve done all kinds of searches as well as read up on the DFT in detail and just haven’t connected the dots on what the property is on the pulse wave that makes this happen. I’ve also tried other fft implementations but get the same results so I know it’s not related to dsp::FFT. Does anybody have any thoughts on this?