Finding multiple fundamental frequencies using the pitch function
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Heeje Lee
am 11 Jul. 2021
Beantwortet: jibrahim
am 12 Jul. 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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 11 Jul. 2021
WindowLength and OverlapLength turn out to be case-sensitive !
(This is a bug.)
2 Kommentare
Image Analyst
am 12 Jul. 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)
Weitere Antworten (1)
jibrahim
am 12 Jul. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Measurements and Spatial Audio finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!