I am a computer science student and want to do some stuff with audio data. I want to use the DFT to analyze and synthesize some sounds. Before going to the more complex stuff I experimented with basic tones and found some issues I do not understand - therefore I want to ask for help in this physics forum.
I created a single sinus wave function with an audioprogram of $440\textrm{ Hz}$. From this I take the DFT and want to recreate the original signal from this. While doing so, first I emit the negative frequencies, thus take only the first $n/2$ frequencies. $N$ is my blocksize (I divide the signal into blocks of length $n$). The sampling rate of my audio signal is $44100\textrm{ Hz}$. So when I do this, and take the IFT from the resulting data, I can perfectly reconstruct my signal.
Now to my issues and questions:
- When I set the phase to $0$ in the Fourier space (the imaginary part), with different $n$, I recover a sinus signal with some periodic noise.
- I assume this is the phase difference which can be heard between the blocks?
- When I set $n$ to $44100$ (the sampling frequency), I get complete noise.
- Why is that?
- Now I want to take only the strongest frequency amplitude wise (which in my opinion should perfectly work) - thus I set all other frequencies in the Fourier space to $0$ and then do the IFT. For different $n$ this kind of works, I get a sinus signal with some periodic noise.
- Why the noise?
- Moreover, the frequency of the resulting tone changes with $n$. Why is that?
- With $n = 44100$ I get complete silence. Why?
- When I set the phases to $0$ again I get the same results.
I hope it's somewhat interesting for you too. Could you explain to me these "phenomena"?