210 likes | 586 Vues
Chorus Effect through Audio DSP. Presented by Leo Aksu University of Utah Dep. of Electrical Eng. Spring 2007 Project sponsored by Harman Music Group A Harman International Company. Chorus Effect. Widely used audio effect
E N D
Chorus Effect through Audio DSP Presented by Leo Aksu University of Utah Dep. of Electrical Eng. Spring 2007 Project sponsored by Harman Music Group A Harman International Company
Chorus Effect • Widely used audio effect • Makes a single instrument sound like several instruments are being played • Models what happens when 2 or more artists play instruments in unison: • artists are not perfectly synchronized • the pitch of the instruments deviates despite precise tuning
DSP Hardware • Analog Devices ADSP-21364: 32-bit floating point DSP optimized for pro-audio applications • Analog Devices AD1835: 24-bit audio CODEC capable up to 96 kHz A/D and 192 kHz D/A conversion • USB interface to development software
Development Software VisualDSP++ 4.5: C/C++ compiler, assembler, linker
Audio I/O Modified the software template to accomplish the following: • establish audio traffic by correctly initializing the CODEC to do the A/D and D/A conversions • change sampling rate from 48 to 96 kHz • convert audio from unsigned int to float and back to unsigned int • route digitized audio through the DSP chip in a “output = 0.54321 * input” fashion • separate left and right channels
Circular Buffer / Fixed Delay • Created a circular delay buffer to write past audio samples to the internal memory of the DSP chip • Read samples off the delay line using a circular index • Made any sample between 0 (current sample) and 24,576 (256 ms. delayed sample) available • Mixed the original signal with its delayed copy • Kept the delay time constant
Delay Time Modulation • Created a 1Hz sine wave (Low Frequency Oscillator) with 96,000 discrete values per second • Modulated the delay amount with the sine wave where: • sine = +1 => delay time = 32.5 ms • sine = -1 => delay time = 27.5 ms • Created the desired pitch shift as a result of the ever varying delay amount
Linear Interpolation 96,000 samples per second is not enough, need infinite samples! Intermediate samples can be created using linear interpolation: “sample 2” “sample 3” “sample 2.7” = 0.7 x “sample 3” + (1-0.7) x “sample 2”
Results • Simplest form of the chorus effect is implemented • Audio is free of artifacts, pops and clicks • Meets (and exceeds) current pro-audio standards with 24-bit A/D and D/A conversions at 96 kHz • Algorithm is professional grade and could be used in a pro-audio effects processor
Room for Improvement • The C code is inefficient: • Precise sine value is calculated for every sample • Most loops and conditionals used to separate left and right channels could be avoided • Algorithm can be optimized • Internal DSP memory is used to store audio samples! Internal memory is very expensive and should only be used to store coefficients. Audio samples should be stored in DRAM.
Audio Demo • Dry acoustic guitar track - “Lexicon Dry Tracks” • Dance track - “Time is Now” by Moloko
Acknowledgements • Michael Carnes, Harman Principal DSP Engineer • Paul Howard, Harman Engineering Manager • Jim Lambrick, Harman DSP Engineer • Chris Belcher, Harman DSP Engineer • Analog Devices Tech Support and Sales Staff