How to difference a loud sound (playing notes), from a soft noise in spectrum. (Pitch detection with bass) I'm trying a program that outputs the bass line that you are playing.
I have some arrays from a big one with the sound in time domain, that are splited (Hann window).
Later, I do the FFT, then I get the peak of each array and apply the harmonic product spectrum algorithm.

Finally, I'm trying to filter all frequencies bellow 39hz and above 440hz, that include all frec. in the bass in E standart. 
I've tried to eliminate the noise. 

I want to distinguish my FFT output when I play my instrument, from when I don't, taking advantage of the frequency filter, I have made the program assume that when it plays a note that is less than 39hz, it automatically takes it as noise.
The problem appears when the noise is greater than 39hz (it can be from 0hz to 60hz even) and many of the notes I play on the bass are below 60hz, so with this system I cannot know when I make sound because I'am playing, and when the predominant sound is noise and I'm not playing.

So I need to know how to interpret the FFT output to know when I actually play and when I don't.

The FFT output is the energy (I think) of each frequency in the sound wave, and I have tried to eliminate all FFT outputs below 0.5 (The output is normalized from -1 as minimum value to 1 as maximum value of amplitude in the spectrogram), so I really don't know if this works.

Could anyone to tell me how to identify when I play and when I don't?
The intuitive answer is to threshold with respect to the magnitude. 

You are performing a short-time Fourier transform (STFT), that is, segmenting the original into short time windows and performing Fourier transform on each of them. The output of STFT is a frequency-time (t-f) bin table of complex values. 

There is an inherent tradeoff in STFT. The shorter your windows are the higher is your time resolution and the lower is your frequency resolution. If you want a high-frequency resolution you will have to use longer windows at the cost of poor time resolution. This paper gives a clue on window length optimization. otherwise, you can simply use the common music window length from papers or online examples. For bass, the frequencies are low = long wavelength, hence, you will want longer windows. 

Basically, you can get the magnitude and\or the angle of your t-f table. Assuming your bass has much more energy than the noise gathered by the system, you can look at the magnitude of bins in the required frequency range and drop time segments below a certain threshold. Play a bit with the result and present it as an image. It will give you a science of where to cut. This is a MATLAB example of presenting the magnitude as an image (also called spectrogram)