Audio processing: Writing a pitch shifting echo effect
Mostrar comentarios más antiguos
Hi everyone,
I'm extremely new to programming but I'm trying to write an echo audio effect that pitch-shifts each repeat by a specified amount (e.g. 1 semitone). This would mean it preserves the original signal and only shifts the repeats. So far I've sourced some code for a reliable echo effect, but I'm lost on how to implement the pitch shift within the feedback loop. Here is the code for the echo as it is now.
function [delayed] = delay(sound, feedback, delaytime, fs)
if nargin == 4
delay_samples = floor(delaytime./1000.*fs);
else
delay_samples = floor(delaytime);
end
delayed = sound;
for sample = delay_samples + 1: length(sound)
if(sample - delay_samples > 0)
delayed(sample) = sound(sample) + feedback*(delayed(sample-delay_samples));
end
end
Any help would be appreciated,
Thanks
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Audio Processing Algorithm Design en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!