Non-negative matrix factorization(NMF) has shown positive results in learning musical notes in the last decade. The magnitude short time Fourier transform (STFT) is typically fed for learning to the NMF algorithm. Fixed length windowing might not be effective in capturing the stationarity within a note. Improving the stationarity characteristics of the signal within the STFT is expected to improve the qualitative performance of note extraction by the NMF algorithm. To this extent, we propose a signal dependent variable length window based STFT to effectively capture the stationarity of the signal within each frame of the magnitude STFT. We also explore automatic detection of note onsets in music signals. Many reduction techniques have been developed in literature for reducing the time-frequency representation of the signal to a one dimension detection function to detect note onsets. We propose using the Itakura-Satio divergence for estimating the location of note onsets.