clear; clc; figure;

[data Fs] = wavread('instr_piano.wav');
sound(data, Fs)
t = (1:length(data)) ./ Fs;
subplot(1,2,1)
plot(t, data)
xlabel('Time domain (sec)')

Y = fft(data);
df = Fs / length(data);
f = (1:length(Y)) * df;
Ns = length(data) / 6;
subplot(1,2,2)
plot( f(1:Ns), abs(Y(1:Ns)) )
xlabel('Frequency domain (Hz)')

