I feel like I am having a brainfart over here and can't seem to remember what's going on with STFT outputs.
Consider these two lines of code from the Python library Librosa:
# Window the time series.
y_frames = util.frame(y, frame_length=n_fft, hop_length=hop_length)
# Pre-allocate the STFT matrix
stft_matrix = np.empty((int(1 + n_fft // 2), y_frames.shape[1]),
dtype=dtype,
order='F')
In the first line, we have a function that creates a matrix with a window length of n_fft (2048).
Then in the next line, we pre-allocate our STFT, but our window length is now 1025 instead of 1024 as dictated by the 1+n_fft // 2? Where does this extra frequency bin come from? Why is not just 1024?