Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008.

Similar presentations


Presentation on theme: "Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008."— Presentation transcript:

1 Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008

2 He’s Brought Sexy Back With Sound Distortion. In today’s music industry, many songs contain distorted tunes and melodies. Popular songs such as “Sexy Back” by Justin Timberlake & “Technologic” by Daft Punk are examples.

3 What Does This Have To Do With EE113D? We’ve learned how to apply different filters to digital signals and map them in Experiments 1 & 2. Using a song as our input source, we wanted to apply these filters and play back the distorted song. Initial Dilemmas- We know how to filter them, but how do we distort them?

4 Theoretical Algorithm 1.We first applied a Low Pass Filter to filter out audio frequencies above the Piano Frequency Range of 27.5- 4186 Hz along, which includes the Human Voice Frequency Range of 300-3400 Hz. 2.We then ran that output into an Amplitude Modulation block where we convolved the signal to a sinusoidal wave to generate a distorted signal. 3.Lastly we ran our AM output through another Low Pass Filter in order to filter out any added noise that was produced in the AM block that ran above the piano range in order to preserve our ears!

5 What did we use? Texas Instruments TMS320C542 Chip Assembly Code Mp3 player, Speakers & Audio-Audio Cables Oscilloscope & Function Generator MATLAB

6 MATLAB Coding In order to make sure our idea was feasible, we created a MATLAB program modeling our idea. Using Filter Design and Analysis Tool in MATLAB, we created our Low Pass filter –Fpass= 4500 Hz =.583pi –Fstop= 4800 Hz =.622pi –Apass= 1 db –Astop= 20 db Example Sound: Undistorted: Distorted:

7 Fast Fourier Transforms A FFT is of great importance in digital signal processing for quick multiplication of large integers. Each of the following figures shows 7 plots: –1. FFT of the original signal –2. FFT of first low pass filter –3. FFT of the first low pass filter applied to original signal –4. FFT of amplitude modulator –5. FFT of amplitude modulator applied to original signal after it has gone through the first low pass filter –6. FFT of second low pass filter –7. FFT of final distorted output

8 Input: Sine Wave VS Sound File Sine WaveSound Clip

9 Assembly Coding Due to Assembly coding parameters, we applied circular addressing and the application of filter taps in order to implement the usage of Low Pass Filters and Amplitude Modulation. Low Pass Filter Design was something we had done previously in Experiment 2, however Amplitude Modulation was something we had to learn.

10 Low Pass Filter Design Using the Low Pass Filter we designed in MATLAB, we exported the filter coefficients to create an Assembly lookup table with a total of 45 taps. Ex: –L0.word -683 –L1.word -711 –L2.word 956 –L3.word -678 –L4.word -28 –L5.word 412 –L6.word -43 –… –L45.word -683 We have a total number of 45 taps because when we created our LPF in MATLAB, the order number was 45.

11 Filter Taps & Circular Addressing Filter Taps –These values are essentially what we’re mapping our signal to. –We have a certain number of taps according to the order of the filter designed. –In our case, # taps=45 Circular Addressing –We use the “%” sign as a modifier –When the pointer reaches the end of the taps, circular addressing code tells us to repeat the instructions starting at the beginning.

12 Whoops! When we first created our Low Pass filter, we made one of 186 order, so it had 186 taps. We tried our first filter we weren’t receiving an output that sounded anything like our song. So we tested our filter and saw that it responded like a Comb Filter. This was a big mistake that we went back and fixed our Low Pass Filter with an order of 45.

13 Assembly In order to verify that our Low Pass Filter worked, we ran a frequency sweep from 200- 7000 Hz ( 200Hz) and generated a normalized plot. It works!

14 Assembly Using the same idea as in Experiment 2, we took the digitized sound file, and ran it through the Low Pass Filter of 45 taps, at a sampling frequency (Fs) of 15432 Hz. In our ACInit File, we set our A & B Registers both to 18, or 112h and 212h respectively.

15 Assembly Amplitude Modulation- Convolving the original signal by the carrier signal. In the AM Demo files provided to us, it convolved the file with a sine wave generated using the difference equation, however because we had generated a sine wave file using circular addressing of a lookup table of length 4 in Experiment 1, we decided to use that instead. Lookup Table.word 0,16384,0,-16384 ;;; AModulation ;;;.sect "data1" length.set 4 ; length of table (will be used ; in circular addressing) ;; A = #0 AR2 = #OUTPUT1 a = *AR2*(*AR3) ;multiply our Output1 from LPF1 ;with SineWav B = *AR3+% ;circular addressing so it ;continues multiplying. Our carrier frequency Fc, is equal to Fs/N.

16 Assembly Second Low Pass Filter- We ran our AM signal through another Low Pass Filter with the same constraints in order to filter out any extra high frequency noise. We did this because when played into the speaker, we don’t want to hear ALL noise. Output Amplitude - A = @OUTPUT << 3 ; Reload A with output & amplify the volume of the output 2^3 times

17 Testing Our Assembly We ran our assembly program onto the TI Chip. To show you what’s happening, we passed a sine wave generated on the function generator through the program and out to an oscilloscope.

18 Audio Distortion Today As far as practical application goes, what we have performed in our project is the foundation for how to implement song distortion through digital signal processing. Now, there are more feasible and faster methods of distorting old melodies and beats for a new product. Dexster Audio Editor provides a user- friendly interface that allows the user to edit a file visually, as shown below. –The filtering of noise and amplitude modulation is done quickly in order for the user to get their output efficiently and successfully. However, we must remember that although this is a quicker way of getting to the same end result, it is through digital signal processing that we ultimately achieve this result.

19 Now On to the Demo! We’re going to play you a distorted song clip, and we want you to guess and see if you can recognize it!


Download ppt "Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008."

Similar presentations


Ads by Google