comparison util/SMALL_swipe.m @ 128:8e660fd14774 ivand_dev

Feature 186
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Mon, 13 Jun 2011 14:55:45 +0100
parents fc395272d53e
children
comparison
equal deleted inserted replaced
126:db5a7fe1a404 128:8e660fd14774
1 function [p,s] = SMALL_swipe(X,fs, f, plim,dlog2p,dERBs,woverlap,sTHR) 1 function [p,s] = SMALL_swipe(X,fs, f, plim,dlog2p,dERBs,woverlap,sTHR)
2 % 2 %% Modified SWIPEP Pitch estimation using SWIPE'.
3 %
4 % Centre for Digital Music, Queen Mary, University of London.
5 % This file copyright 2009 Ivan Damnjanovic.
6 %
7 % This program is free software; you can redistribute it and/or
8 % modify it under the terms of the GNU General Public License as
9 % published by the Free Software Foundation; either version 2 of the
10 % License, or (at your option) any later version. See the file
11 % COPYING included with this distribution for more information.
12 %
13 %
14 % This is modified swipep MATLAB code that is working directly in spectral 3 % This is modified swipep MATLAB code that is working directly in spectral
15 % domain and uses only one window size. The results are suboptimal 4 % domain and uses only one window size. The results are suboptimal
16 % comparing to original code. It is also converted to SWIPE which uses all 5 % comparing to original code. It is also converted to SWIPE which uses all
17 % the harmonics of the signal. 6 % the harmonics of the signal.
7
8 %
9 %
18 % 10 %
19 % SWIPEP Pitch estimation using SWIPE'. 11 % SWIPEP Pitch estimation using SWIPE'.
20 % P = SWIPEP(X,Fs,[PMIN PMAX],DT,DLOG2P,DERBS,STHR) estimates the pitch 12 % P = SWIPEP(X,Fs,[PMIN PMAX],DT,DLOG2P,DERBS,STHR) estimates the pitch
21 % of the vector signal X every DT seconds. The sampling frequency of 13 % of the vector signal X every DT seconds. The sampling frequency of
22 % the signal is Fs (in Hertz). The spectrum is computed using a Hann 14 % the signal is Fs (in Hertz). The spectrum is computed using a Hann
67 % ylabel('Pitch (Hz)') 59 % ylabel('Pitch (Hz)')
68 % 60 %
69 % REFERENCES: Camacho, A., Harris, J.G, (2008) "A sawtooth waveform 61 % REFERENCES: Camacho, A., Harris, J.G, (2008) "A sawtooth waveform
70 % inspired pitch estimator for speech and music," J. Acoust. Soc. Am. 62 % inspired pitch estimator for speech and music," J. Acoust. Soc. Am.
71 % 124, 1638-1652. 63 % 124, 1638-1652.
64
65 %
66 % Centre for Digital Music, Queen Mary, University of London.
67 % This file copyright 2009 Ivan Damnjanovic.
68 %
69 % This program is free software; you can redistribute it and/or
70 % modify it under the terms of the GNU General Public License as
71 % published by the Free Software Foundation; either version 2 of the
72 % License, or (at your option) any later version. See the file
73 % COPYING included with this distribution for more information.
74 %%
72 75
73 if ~ exist( 'plim', 'var' ) || isempty(plim), plim = [30 5000]; end 76 if ~ exist( 'plim', 'var' ) || isempty(plim), plim = [30 5000]; end
74 %if ~ exist( 'dt', 'var' ) || isempty(dt), dt = 0.001; end 77 %if ~ exist( 'dt', 'var' ) || isempty(dt), dt = 0.001; end
75 if ~ exist( 'dlog2p', 'var' ) || isempty(dlog2p), dlog2p = 1/48; end 78 if ~ exist( 'dlog2p', 'var' ) || isempty(dlog2p), dlog2p = 1/48; end
76 if ~ exist( 'dERBs', 'var' ) || isempty(dERBs), dERBs = 0.05; end 79 if ~ exist( 'dERBs', 'var' ) || isempty(dERBs), dERBs = 0.05; end