+tony, ronny+
- 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)
%[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);
        I also tried another one: 
function [output]=fuzzy(sound, amount)
 [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);
 
         Both algorithms are to be found in my folder on ESAT (gdist.m and dist.m)
- 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:
- 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:
- 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