What do you get applying FFT to Music? I am trying to take a section of a song (approx 1.5 seconds)  44100 sample rate equals sample size of 65536 which is 2**16.

I want to find the frequency of the piano note that is played in the window of time.

I have implemented the four1 function - real data starting at array pos 1 and I data at 2 ...

four1 uses are rewritten fortran function so the array does not start at index 0.

My I data is all 0.0.

I have verified that input data looks good ... small sample:  Idx is index into data array

Idx 22023   R -1876.000000   I 0.000000 
Idx 22025   R -1720.000000   I 0.000000 
Idx 22027   R -1453.000000   I 0.000000 
Idx 22029   R -1203.000000   I 0.000000 
Idx 22031   R -1017.000000   I 0.000000 
Idx 22033   R -799.000000   I 0.000000 
Idx 22035   R -386.000000   I 0.000000 
Idx 22037   R 75.000000   I 0.000000 
Idx 22039   R 243.000000   I 0.000000 
Idx 22041   R 327.000000   I 0.000000 
Idx 22043   R 759.000000   I 0.000000 
Idx 22045   R 1238.000000   I 0.000000 
Idx 22047   R 1317.000000   I 0.000000 
Idx 22049   R 1335.000000   I 0.000000 
Idx 22051   R 1639.000000   I 0.000000 


Upon return -- the array contains the R and I of the freq component.

Looking at the first half (real frequency half) -- I get a range of different R and I values but when I calculate the Magnitude (srq of sum sqrs) --- the magnitudes are almost constant the complete real half of the freq range 

Sample of output -- I normalized the Magnitude to the Max Magnitude found

Idx 13841   R -605090688.000000   I -74311704.000000    M 0.958672 
Idx 13843   R -605982336.000000   I -74471496.000000    M 0.960094 
Idx 13845   R -605715712.000000   I -74230088.000000    M 0.959632 
Idx 13847   R -605639744.000000   I -74081136.000000    M 0.959485 
Idx 13849   R -605420992.000000   I -74552360.000000    M 0.959234 
Idx 13851   R -606319744.000000   I -73444392.000000    M 0.960425 
Idx 13853   R -605728512.000000   I -73858336.000000    M 0.959581 
Idx 13855   R -605823424.000000   I -73527352.000000    M 0.959666 
Idx 13857   R -605311424.000000   I -73650440.000000    M 0.958890 
Idx 13859   R -606479360.000000   I -73952432.000000    M 0.960771 
Idx 13861   R -606198336.000000   I -74041552.000000    M 0.960349 
Idx 13863   R -605836544.000000   I -74178936.000000    M 0.959811 
Idx 13865   R -605548864.000000   I -73529936.000000    M 0.959238 
Idx 13867   R -605573312.000000   I -73070880.000000    M 0.959189 


There is little to no change in Magnitude across freq bins.

Should I not be able to detect the frequency of that piano note played in that time window?

Am I misusing the FFT?

Thanks in advance for any reply.
Yes, you should be able to see the component of the piano note. But there are quite a few pitfalls on the way. I would suggest you experiment a little to get a 'feel' on how fft works first. Use GNU Octave or Matlab to do simple experiments, and then you can plug in your real data, and see if it works. For example, in Octave I can easily generate a sine wave of 440 Hz and do the FFT:

t = linspace(0, 2*pi, 44100);
s = sin(440.0 * t)              % This is the 440 Hz tone
f = abs(fft(s))                 % Take the fft (magnitude)
plot(f)
xlim([0,1000])                  % Show only the 1000 first bins


Then you can read your samples and do the same. At least, this way you
exclude insecurity about the fft function you're using. You could also
save the generated sine, and feed it to your four1 function, and check
if the result is correct.