FFmpeg
|
Go to the source code of this file.
Functions | |
init variable compute | d (tau) x1 |
d2 (1+lag) | |
if (length(mloc)>0) I | |
if (length(I)>0) candf0lag | |
candf0lag-1 | d2 () |
id | f0lag () |
compute candidate frequency in Hz | if (ac > 0.2)%voiced/unvoiced threshold f0=0 |
Variables | |
function | f0 |
function | fs |
function | ws |
function | minf0 |
function | maxf0 |
maximum lag | th = 0.1 |
set threshold | d = zeros(maxlag,1) |
init variable | d2 = zeros(maxlag,1) |
cumsumx = sum(x1.^2) | |
cumsumxl = cumsumx | |
xy = xcorr(x(1:ws*2),x1) | |
for | lag |
end | cumsum = 0 |
end limit the search to the target range | minf0lag = 1+round(fs./minf0) |
compute lag corresponding to minf0 | maxf0lag = 1+round(fs./maxf0) |
compute lag corresponding to maxf0 if(maxf0lag >1 &&maxf0lag< maxlag) d2(1 avoid lags shorter than maxf0lag end if(minf0lag >1 &&minf0lag< maxlag) d2(minf0lag avoid lags larger than minf0lag end find the best candidate | mloc = 1 + find((d2(2:end-1)<d2(3:end)).*(d2(2:end-1)<d2(1:end-2))) |
minima | candf0lag = 0 |
else [Y, I2] = min(d2(mloc)) | |
val = d2(candf0lag) | |
rval = d2(candf0lag+1) | |
end end | ac = min(d2) |
f0lag = candf0lag-1 | |
Function Documentation
init variable compute d | ( | tau | ) |
d2 | ( | 1+ | lag | ) |
|
virtual |
|
virtual |
if | ( | length(I) | , |
0 | |||
) |
Variable Documentation
candf0lag = 0 |
Definition at line 36 of file f0detectionyin.m.
end cumsum = 0 |
Definition at line 18 of file f0detectionyin.m.
cumsumx = sum(x1.^2) |
Definition at line 10 of file f0detectionyin.m.
cumsumxl = cumsumx |
Definition at line 11 of file f0detectionyin.m.
Definition at line 6 of file f0detectionyin.m.
Definition at line 7 of file f0detectionyin.m.
function f0 |
Definition at line 1 of file f0detectionyin.m.
f0lag = candf0lag-1 |
Definition at line 55 of file f0detectionyin.m.
function fs |
Definition at line 1 of file f0detectionyin.m.
for lag |
Definition at line 14 of file f0detectionyin.m.
function maxf0 |
Definition at line 1 of file f0detectionyin.m.
Definition at line 27 of file f0detectionyin.m.
function minf0 |
Definition at line 1 of file f0detectionyin.m.
Definition at line 26 of file f0detectionyin.m.
compute lag corresponding to maxf0 if (maxf0lag>1 && maxf0lag<maxlag) d2(1 avoid lags shorter than maxf0lag end if (minf0lag>1 && minf0lag<maxlag) d2(minf0lag avoid lags larger than minf0lag end find the best candidate mloc = 1 + find((d2(2:end-1)<d2(3:end)).*(d2(2:end-1)<d2(1:end-2))) |
Definition at line 35 of file f0detectionyin.m.
Definition at line 50 of file f0detectionyin.m.
maximum lag th = 0.1 |
Definition at line 5 of file f0detectionyin.m.
Definition at line 49 of file f0detectionyin.m.
function ws |
Definition at line 1 of file f0detectionyin.m.
Definition at line 12 of file f0detectionyin.m.
Generated on Mon Nov 18 2024 06:52:05 for FFmpeg by 1.8.11