Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Modeling flange in Matlab


Flanging is performed by taking the original copy of the signal and adding it to a time delayed version of itself. However, this effect differs from reverb, which is just adding a signal to a time-delayed version of itself with a set delay, because the delay gradually changes and is usually determined with a low frequency oscillator. Flanging is a type of phasing, which is where a signal is filtered with an all-pass filter with a non-linear phase responce. The phasing effect can be easily observed in the spectrogram of the signal.
Figure 1: The spectrogram of a guitar chord being played
Spectrogram of a Guitar Chord
Spectrogram of a Guitar Chord (specgram.png)
Figure 2: The spectrogram of a guitar chord after flanging
Spectrogram of a Guitar Chord after Flanging
Spectrogram of a Guitar Chord after Flanging (flangedspec.png)
As for the actual Matlab implementation of flanging, Stephen G. McGovern had already created an implementation, and because the main point of this project is not to create guitar effects, but to implement adaptive guitar effects.
This is Stephen G. McGovern's (slightly modified) code:
function [y]=flanger(fs, y, wet) v = 0.002; r = 0.5; orig = y;  %[y] = flange(fs, v, x, r) % %   This is a basic flanging effect. % %      fs = Sample rate %      v = Variation. %      x = Input audio signal. This should be a column  %          vector. %      r = Rate. % %   Example: %      %      >>y = flange(fs,0.002,x,0.5); % % %   See also WAVREAD and SOUND % %Version 1.0 %Coded by: Stephen G. McGovern, date: 08.03.03  md= ceil(v*fs); n=1:length(y)+md; v=round(v*fs); z=zeros(md,1); m=max(abs(y)); y=[z;y;z]; rr=2*pi/round(fs*r); b=round((v/2)*(1-cos(rr.*n))); y=y(n+md)+y(n+md-b); m=m/max(abs(y)); y=m*y;  y = y(1:length(orig));  y = wet * y + (1 - wet) * orig; 
This is the only thing that cannot be immediately converted into real time. In order to do that, another implementation using circular buffer would be needed.

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.