Finding multiple fundamental frequencies using the pitch function
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Heeje Lee
el 11 de Jul. de 2021
Respondida: jibrahim
el 12 de Jul. de 2021
I'm trying to find multiple fundamental frequencies in one audio signal. I'm currently trying to use the pitch function because I think I could use the windowlength value in the command to split up the signal into multiple frames as said in this link: https://www.mathworks.com/help/audio/ref/pitch.html
I'm currently trying the code but I keep getting an error that says "Unrecogniezed property 'windowlength' for class 'audio.internal.pitchvalidator'" and more errors that prevent it from running. I provided my code down below. If there is another method to do this other than pitch please also let me know. Thanks!
wsize = min(size(audioIn,1),192000); % 33 (I want around 10 FFs)
olength = 0;
f2 = pitch(audioIn,fs, ...
'Windowlength', size(1, wsize), ...
'Overlaplength', 0);
f0 = [f0;f2] %display purposes
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de Jul. de 2021
WindowLength and OverlapLength turn out to be case-sensitive !
(This is a bug.)
2 comentarios
Image Analyst
el 12 de Jul. de 2021
WindowLength needs to be a sigle number. I'm not sure what size(1, wsize) gives, unless it's an error. Normally the first argument to size is the name of the variable (array), NOT 1. And the second argument is the dimension (like 1 or 2). Maybe you meant 'Windowlength', numel(wsize)
Más respuestas (1)
jibrahim
el 12 de Jul. de 2021
Hi Heeje,
You've specified WindowLength as size(1,wsize). I suspect you mean wsize.
The pitch function accepts a Range property-value pair. You have not specified it, so the default applies. the default is [50,400] (values in Hertz). The error is complaining that fs/50 is not larger than the window length. I think the error will go away once you use the right window length
0 comentarios
Ver también
Categorías
Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!