Lab Report 2 Based Modulated Audio Effects (Flanger, , Vibrato)

Sam Johnson #420081870

Digital Audio Systems, DESC9115, Semester 1 2012 Graduate Program in Audio and Acoustics Faculty of Architecture, Design and Planning, The University of Sydney

ABSTRACT width in # samples In my last lab report I discussed the importance of the basic digital delay, how it was created and how it is used in music, if WIDTH>DELAY film, and even in scientific experiments. I explained the use of error('delay greater than basic FIR and IIR comb filters to create feed forward and feed back delay !!!'); loops in order to create a natural sounding delay. In this report return; Im going to take it to the next level and talk about delay based end modulated effects. It is important to replicate these delayed MODFREQ=Modfreq/fs; % modulation sounds in a realistic way and realistic way to let the listener frequency in # samples know what is happening, rather than having an unnatural LEN=length(x); % # of samples sounding output. By using a mix of acoustical phenomena and in WAV-file digital algorithms, a digital system will be able to take an input L=2+DELAY+WIDTH*2; % length of the signal and replicate some of these sounds caused by a “digital entire delay delay” and modulation. Delayline=zeros(L,1); % memory allocation for delay INTRODUCTION y=zeros(size(x)); % memory allocation for output vector Some of the different effects that can be caused by delays are flanger, chorus, slap back and . One of the main differences for n=1:(LEN-1) between these effects is the delay time (t), but the modulation M=MODFREQ; type can alter the output to make a new effect too. These effects are made by “comb filtering”. Comb filtering adds a delayed MOD=sin(M*2*pi*n); signal of the input to itself causing what is known as ZEIGER=1+DELAY+WIDTH*MOD; interference where the waves will either sum or subtract. There i=floor(ZEIGER); are two main types of signal processor comb filters, The feed frac=ZEIGER-i; forward (FIR) and the feedback (IIR). [2] Delayline=[x(n);Delayline(1:L-1)]; %---Linear Interpolation------When a siren is passing by, we hear a pitch deviation due to the ------doppler effect. This is the change in frequency of a wave for an observer moving relative to the source of the wave. It is y(n,1)=Delayline(i+1)*frac+Delayline(i commonly heard when a vehicle sounding a siren or horn )*(1-frac); approaches, passes, and recedes from an observer. The received frequency is higher (compared to the emitted frequency) during the approach, it is identical at the instant of passing by, and it is %---Allpass Interpolation------lower during the recession. Varying the distance is, for our ------application, equivalent to varying the time delay. If we keep on %y(n,1)=(Delayline(i+1)+(1- varying periodically the time delay we will produce a periodical frac)*Delayline(i)-(1-frac)*ya_alt); pitch variation. This is precisely a vibrato effect. For that %ya_alt=ya(n,1); purpose we need a delay line and a low-frequency oscillator to end drive the delay time parameter. We should only listen to the delayed signal. Typical values of the parameters are 5 to 10 ms as average delay-time and 5 to 14 Hz rate for the low frequency oscillator. The vibrato is a good starting point to create the modulation in use for other effects. Delay Based Audio Effects The Vibrato function can be written like this:

% Vibrato By using these two comb-filtering systems one can create function y = vibrato(x, fs, Modfreq, different types of effects to a signal. If only one delay is needed Width) (FIR) a variable on the delay time can be used to achieve our ya_alt=0; desired effect. If an IIR comb filter is used the feedback will Delay=Width; % basic delay of input enhance the effect and cause multiple delays. By using a sample in sec modulation on the input signal the output sound can create a DELAY=round(Delay*fs); % basic delay new effect. For example, a flanger has a time delay of between 0 and 15 milliseconds but also has a modulator varying the in # samples signal with a low frequency (such as 1Hz). [2] WIDTH=round(Width*fs); % modulation

Once you understand how the vibrato effect works you can References: change the modulation and delay times to create other effects. Following the below chart you can see that to get a chorus [1] The Propagation of sound. 2012. The Propagation of effect you change the modulation to sinusoidal, and for a chorus sound. [ONLINE] Available at effect you change the modulation to random. http://www.jhu.edu/virtlab/ray/acoustic.htm . [Accessed 01 April 2012].

[2] Udo Zolzer, 2002. DAFX: Effects. 1 Edition. Wiley, Chapter 3 Delays

[3] Feedforward Comb Filters. 2012. Feedforward Comb Filters. [ONLINE] Available at: https://ccrma.stanford.edu/~jos/waveguide/Feedforward_Comb _Filters.html . [Accessed 25 March 2012].

[4] Feedback Comb Filters. 2012. Feedback Comb Filters. [ONLINE] Available at: https://ccrma.stanford.edu/~jos/waveguide/Feedback_Comb_Fil ters.html . [Accessed 25 March 2012].

Typical Delay Based Effects

The chorus effect naturally occurs when two or more sound waves with the same or similar timbre and similar but not exact pitch are combined. Digitally this uses several samples of the input signal but a variety of time delays between 10 and 25 milliseconds. Combining them all slightly out of time from each other positions them slightly differently on the comb filter frequency axis.

Chorus system

Conclusion

By using different delay times and modulations, you can enhance your delay effect to create new sounding delay modulation techniques such as vibrato, , and chorus. Each effect has its own unique delay time range and modulation type (shown above).