STFT - DFT size of the bins Having some trouble understanding this concept, really could do with some advice.

I want my STFT to have the following parameters: NFFT = 256 overlap/hop = 128

Now essentially, the algorithm will work as follows:

1) Split the signal into blocks of 256 


This will result in around 72*265:

2) For each of these blocks, calculate against the Hanning Window 

3) Create a "slider" that does an overlap of 128.. So, in theory it would 
   therefore be: `size = 256 + 128` 


Therefore, when I'm computing the DFT for each of the overlapped blocks, will my FFT remain at size 256 or will the size be 256 + 128 If this is the case, does each block in the resulting vector still have to be of size 256?

Thanks  

EDIT: 

This is now my result:



But, compare this to a spectrogram in matplotlib



Where am I actually going wrong? I cannot make any sense of this. 

I've looked bat through all the data, the blocks are correctly overlapping, Hanning window is being applied correctly.

Could it be to do with the fact I'm using a 1D DFT? I.e. 

std::vector&lt;complex&gt; FFT-&gt;transform(complex_vector[0...n], 256);
The overlap is the way that you walk on your signal to be analyzed, lets go to an simple example, imagine that your signal X has a length = 14, NFFT = 4 and overlap/hop = 2

X = 1 2 3 4 5 6 7 8 9 10 11 12 13 14


To know the number of blocks of analysis you will:

int(n_samples/Overlap) - 1 


Then for this example:

(14/2)-1 = 6


lets get 4 points from X to pass to your FFT

At the first time you get from X

X2 = 1 2 3 4


from now you need overlap by 2

X2 = 3 4 5 6


Third time

X2 = 5 6 7 8


fourth time

X2 = 7 8 9 10


fifth time

X2 = 9 10 11 12


sixth time

X2 = 11 12 13 14