Good morning, I'm having trouble with pitch finding and shifting in MATLAB. The program compiles but when i try to sound the shifted track it exits a strange sound and the pitch found isn't correct. What's the problem?
[audioIn,fs] = audioread('Silae.wav');
[f0,idx] = pitch(audioIn,fs);
subplot(3,1,1) %2.1.1
plot(audioIn)
ylabel('Amplitude')
subplot(3,1,2) %2.1.2
plot(idx,f0)
ylabel('Pitch (Hz)')
xlabel('Sample Number')
[f1,idx] = pitch(audioIn,0.3*fs);
subplot(3,1,3)
plot(idx,f1)
ylabel('Pitch n (Hz)')
xlabel('Sample Number n')
[f1,idx] = pitch(audioIn,3*fs); %2 o 4
subplot(3,1,3)
plot(idx,f1)
ylabel('Pitch n (Hz)')
xlabel('Sample Number n')
sound(audioIn);