change index i for ip. Removed printed comments on screen
changed ip for i and modified the call of a hann window