University of Victoria Department of Electrical Engineering Electronics 484 – Audio Signal Processing Assignment #5 Non-Linear Processing and Spatial Effects Overdrive, Distortion, Fuzz, Exciter vs. Shelving Filter Spatial Effects/Stereo Panning Name: Oliver Hung – 02-29696 Report Submitted on: June 23, 2005 PART 1 – Sampling, Aliasing and Oversampling 1.1 – Matlab Waveform View: 1KHz Sine, 8KHz Sampling 1KHz Sine Wave Input, 8KHz Sampling Frequency Time Domain View: Unprocessed, Squared and Cubed 1 0.8 0.6 Amplitude 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 0.005 0.01 0.015 Time (s) Squared 1KHz Sine Wave, 8KHz Fs Cubed 1KHz Sine Wave, 8KHz Fs 1 0.8 0.6 0.8 0.6 0.4 0.7 0.4 0.2 0.6 0.2 0 -0.2 Amplitude 1 0.9 Amplitude Amplitude Unprocessed 1KHz Sine Wave, 8KHz Fs 1 0.8 0.5 0.4 0 -0.2 -0.4 0.3 -0.4 -0.6 0.2 -0.6 -0.8 0.1 -0.8 -1 0 0.005 0.01 0 0 0.015 0.005 Time (s) 0.01 -1 0 0.015 0.005 Time (s) 0.01 0.015 Time (s) 1.2 – Matlab Spectral View: 1KHz Sine, 8KHz Sampling 1KHz Sine Wave Input, 8KHz Sampling Frequency Spectral View: Unprocessed, Squared and Cubed 4 3.5 3 Amplitude 2.5 2 1.5 1 0.5 0 0 500 1000 1500 2000 Frequency (Hz) Unprocessed 1KHz Sine Wave, 8KHz Fs 2500 3000 Squared 1KHz Sine Wave, 8KHz Fs 4 4 3.5 3.5 3 3 2.5 2.5 3500 4000 Cubed 1KHz Sine Wave, 8KHz Fs 2 1.8 1.6 2 Amplitude Amplitude Amplitude 1.4 2 1.5 1.5 1 1 0.5 0.5 1.2 1 0.8 0.6 0.4 0 0 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 0 0 0.2 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 0 0 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 1.3 – Matlab Waveform View: 2.5KHz Sine, 8KHz Sampling 2.5KHz Sine Wave Input, 8KHz Sampling Frequency Time Domain View: Unprocessed, Squared and Cubed 1 0.8 0.6 Amplitude 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 0.005 0.01 0.015 Time (s) Square 2.5KHz Sine Wave, 8KHz Fs Cubed 2.5KHz Sine Wave, 8KHz Fs 1 0.8 0.6 0.8 0.6 0.4 0.7 0.4 0.2 0.6 0.2 0 -0.2 Amplitude 1 0.9 Amplitude Amplitude Unprocessed 2.5KHz Sine Wave, 8KHz Fs 1 0.8 0.5 0.4 0 -0.2 -0.4 0.3 -0.4 -0.6 0.2 -0.6 -0.8 0.1 -1 0 0.005 0.01 -0.8 0 0 0.015 0.005 Time (s) 0.01 -1 0 0.015 0.005 Time (s) 0.01 0.015 Time (s) 1.4 – Matlab Spectral View: 2.5KHz Sine, 8KHz Sampling 2.5KHz Sine Wave Input, 8KHz Sampling Frequency Spectral View: Unprocessed, Squared and Cubed 4 3.5 3 Amplitude 2.5 2 1.5 1 0.5 0 0 500 1000 1500 2000 Frequency (Hz) Unprocessed 2.5KHz Sine Wave, 8KHz Fs 2500 3000 Squared 2.5KHz Sine Wave, 8KHz Fs 4 4 3.5 3.5 3 3 2.5 2.5 3500 4000 Cubed 2.5KHz Sine Wave, 8KHz Fs 2 1.8 1.6 2 Amplitude Amplitude Amplitude 1.4 2 1.5 1.5 1 1 0.5 0.5 1.2 1 0.8 0.6 0.4 0 0 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 0 0 0.2 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 0 0 500 1000 1500 2000 2500 Frequency (Hz) 3000 3500 4000 1.5 – Matlab Waveform View: 2.5KHz Sine, 16KHz Sampling 2.5KHz Sine Wave Input, 16KHz Sampling Frequency Time Domain View: Unprocessed, Squared and Cubed 1 0.8 0.6 Amplitude 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 1 2 3 4 Time (s) 6 Squared 2.5KHz Sine Wave, 16KHz Fs Cubed 2.5KHz Sine Wave, 16KHz Fs 1 0.8 0.6 0.8 0.6 0.4 0.7 0.4 0.2 0.6 0.2 -0.2 Amplitude 1 0.9 0 0.5 0.4 0 -0.2 -0.4 0.3 -0.4 -0.6 0.2 -0.6 -0.8 0.1 1 2 3 4 Time (s) 5 6 7 -0.8 0 0 8 8 -3 1 -1 0 7 x 10 0.8 Amplitude Amplitude Unprocessed 2.5KHz Sine Wave, 16KHz Fs 5 1 2 -3 x 10 3 4 Time (s) 5 6 7 -1 0 8 1 2 -3 x 10 3 4 Time (s) 5 6 7 8 -3 x 10 1.6 – Matlab Spectral View: 2.5KHz Sine, 16KHz Sampling 2.5KHz Sine Wave Input, 16KHz Sampling Frequency Spectral View: Unprocessed, Squared and Cubed 4 3.5 3 Amplitude 2.5 2 1.5 1 0.5 0 0 1000 2000 3000 Cubed 2.5KHz Sine Wave, 16KHz Fs 4000 Frequency (Hz) 5000 6000 Cubed 2.5KHz Sine Wave, 16KHz Fs 4 4 3.5 3.5 3 3 2.5 2.5 7000 8000 Cubed 2.5KHz Sine Wave, 16KHz Fs 2.5 2 1.5 Amplitude Amplitude Amplitude 2 2 1.5 1 1 0.5 0.5 1.5 1 0.5 0 0 1000 2000 3000 4000 5000 Frequency (Hz) 6000 7000 8000 0 0 1000 2000 3000 4000 5000 Frequency (Hz) 6000 7000 8000 0 0 1000 2000 3000 4000 5000 Frequency (Hz) 6000 7000 8000 1.7 – Oversampling Discussion From the above screen shots, we can see that the 1KHz sine wave has no problem even after it has been cubed. However, it is clear that the 2.5 KHz sine wave is experiencing significant aliasing with an 8KHz sampling rate. In fact, from the 2.5KHz power spectra, we can see that the cubed waveform is missing a harmonic, (the graph does not even extend that far!) at about 7500Hz. Once we use 16KHz as a sampling frequency we can see that much of the aliasing disappears, (although the squared and cubed 2.5KHz sine waves are still a little distorted). However, the power spectra of the cubed wave does clearly show the 7500Hz harmonic as expected. PART 2 – Overdrive, Distortion and Fuzz 2.1 – Audigy Waveform View of Unprocessed Guitar.wav 2.2 – Audigy Spectral View of Unprocessed Guitar.wav 2.3 – Audigy Waveform View of Overdriven Guitar.wav 2.4 – Audigy Spectral View of Overdriven Guitar.wav 2.5 – Audigy Waveform View of Distorted Guitar.wav 2.6 – Audigy Spectral View of Distorted Guitar.wav 2.7 – Audigy Waveform View of Fuzzy Guitar.wav 2.8 – Audigy Spectral View of Fuzzy Guitar.wav 2.9 – Discussion of Non-Linear Effects This section was pretty straightforward since the code was based directly on that found in the book. I did however, add a gain to the overdrive effect to make it more prominent/obvious. (There normally is a gain knob on overdrive effects boxes/pedals.) The distortion and fuzz effects turned out pretty much as expected. PART 3 – Exciter versus High-Shelving Filter 3.1 – Audigy Waveform View of Unprocessed Flute.wav 3.2 – Audigy Spectral View of Unprocessed Flute.wav 3.3 – Audigy Waveform View of Excited Flute.wav 3.4 – Audigy Spectral View of Excited Flute.wav 3.5 – Audigy Waveform View of High-Shelved Flute.wav 3.6 – Audigy Spectral View of High-Shelved Flute.wav 3.7 – Discussion of Exciter and High-Shelf Filter The distortion added to the high frequencies produces the exciter effect. The exciter effect serves to brighten up the sound without causing the shrillness that the highfrequency shelving filter causes. (Produces a slightly “metallic” sound as opposed to a sharp/shrill sound.) I set the exciter and high-frequency shelving filter to the same cutoff frequency of 1500Hz since the fundamental and first couple of harmonics were well below that frequency. PART 4 – Spatial Effects (Stereo Positioning) 4.1 – Audigy Waveform – 100% Left Audio – Delay Based 4.2 – Audigy Waveform – 50% Left Audio – Delay Based 4.3 – Audigy Waveform – Centered Audio – Delay Based 4.4 – Audigy Waveform – 50% Right Audio – Delay Based 4.5 – Audigy Waveform – 100% Right Audio – Delay Based 4.6 – Audigy Waveform – 100% Left Audio – Amplitude Based 4.7 – Audigy Waveform – 50% Left Audio – Amplitude Based 4.8 – Audigy Waveform – Center Audio – Amplitude Based 4.9 – Audigy Waveform – 50% Right Audio – Amplitude Based 4.10 – Audigy Waveform – 100% Right Audio – Amplitude Based 4.11 – Discussion of Spatial Effects The two methods for implementing stereo positioning were relatively simple to program. However, identifying what delay or amplitude was required to produce the 50% left or right sound, was very, very difficult. I actually produced delays from 0ms to 1ms in 0.005ms intervals and spent a long time listening to them using speakers, earphones and headphones. I am still uncertain what the “correct” values should be. My best guess is that a 0.3-0.5ms delay is sufficient to create a “completely from the left or right” sound. Increasing the amount of delay continues to move the sound further to the extremes, however, I find that sound begins to “break apart” sounding like there is too much reverb. For the 50% sound placements, my best guess would be somewhere between 0.025ms to about 0.05ms, (the screenshot above is using 0.03ms delay). As for the amplitude based positioning, a drop of 30dB produces a 100% left/right sound. For the 50% sound positioning, a 5dB to 7dB drop is sufficient. These values again, are my “best subjective guesses”.
© Copyright 2026 Paperzz