- I wanted to try another effect before starting with pitch detection algorithms. The one I chose was guitar distortion effect.
I stumbled upon a very good link: www.musicdsp.org
There you can find an archive on analysis, effects and some more. It seems that most of the coding is done in C or C#. The distortion effect I tried here is translated to Matlab code.
function [x]=gdist(a,x)I also tried another one:
%[Y] = GDIST(A, X) Guitar Distortion
%
% GDIST creates a distortion effect like that of
% an overdriven guitar amplifier. This is a Matlab
% implementation of an algorithm that was found on
% www.musicdsp.org.
%
% A = The amount of distortion. A
% should be chosen so that -1<A<1.
% X = Input. Should be a column vector
% between -1 and 1.
%
%coded by: Steve McGovern, date: 09.29.04
%URL: http://www.steve-m.us
[x,fs] = wavread(x);
k = 2*a/(1-a);
x = (1+k)*(x)./(1+k*abs(x));
wavplay(x,fs);
function [output]=fuzzy(sound, amount)Both algorithms are to be found in my folder on ESAT (gdist.m and dist.m)
[sound,fs] = wavread(sound);
norms = norm(sound);
output = sound/norms;
amount = (1- amount)/100;
for i = 1:length(output)
if ( output(i) > amount )
output(i) = amount;
end
if ( output(i) < -amount)
output(i) = -amount;
end
end
output = output*norms;
wavplay(output,fs);
- see above
- I tried to catch a book which was referenced from an article I read (sorry, forgot which one). The book from Roads is called 'the computer music tutorial'. It became a real quest to find it. I didn't yet succeed. I'll keep trying.
- Order of the day. I'll experiment with pitch extraction: see the rest of this post
- NARGIN; this is used as an indicator of number of input arguments: 'Number ARGuments IN'
- Different methods:
- Pitch determination and voice quality analysis using subharmonic-to-harmonic ratio (http://www.ling.northwestern.edu/~jbp/sun/sun02pitch.pdf )
- Zero crossings
- Autocorrelation
- Maximum likelihood (time or frequency)
- Adaptive filter (more than one)
- Super resolution pitch determination
- Harmonic product spectrum
- Cepstrum
- Perceptual pitch detector (http://www-ccrma.stanford.edu/%7Epdelac/154/m154paper.htm )
- Worked awhile on the PDA described in another post. I don't really understand how to interpret the resulting output.
This is two times the result f0_values (resp of x2.wav and x1.wav from my thesis folder on ESAT). I have no idea how to interpret it... help me? - Some other links on pitch detection:
- http://ccrma.stanford.edu/~eberdahl/Projects/Grundfrequenzanalyse/index.html (contains on the first sight a very good tutorial in german )
- http://www.dsprelated.com/showmessage/35165/1.php (a discussion on pitch detection for singing voices)
- http://cnx.org/content/m11716/latest/ (m-files on autocorrelation and HPS method)
- http://www.soundmathtech.com/pitch/download/terez_icassp02.pdf (robust pitch determination using non-linear state-space embedding)
- I was hoping to be able to try out some m-files. I even did try the one called fastauto.m, but again I didn't understand the results. More on these tomorrow!
2 comments:
jongens,
als ik het goed voorheb zijn deze resultaten geproduceerd met het PDA algoritme dat beschreven wordt in de post http://idafx.blogspot.com/2006/12/matlab-exchange-server-examples.html ?
de plots tonen de gedetecteerde pitch (in Hz) op de y-as, versus de tijd (in samples) op de x-as. de voornaamste oorzaak waarom de plots niet zo duidelijk zijn, lijkt me te zijn dat er nogal veel uitschieters op staan. je zou kunnen proberen om het algoritme zodanig aan te passen dat de gedetecteerde pitch nog wat meer wordt uitgemiddeld over de tijd, bijvoorbeeld met een mediaanfilter of een 1e orde laagdoorlaatfilter.
anderzijds merk ik uit de beschrijving van het PDA algoritme op http://idafx.blogspot.com/2006/12/matlab-exchange-server-examples.html op dat dit algoritme blijkbaar ontworpen is voor pitchdetectie bij spraaksignalen. ik weet niet of het uberhaupt wel geschikt is voor muziek.
groetjes
toon
The book on computer music is lost. The search for it is stopped. Now considering whether to buy it or not.
Post a Comment