Transcript
#49: Light Pipe Organ An audio processing and visualization experience
Dachuan Xiao, Shiqi Xu
https://www.youtube.com/watch ?v=2PFpgXym4T8
Introduction/Objective: Visualization: • Why: Picture our perception of music • What: Frequency spectrum and peak meter • How: Fast Fourier transform.
Introduction/Objective: • Audio processing: • Why: 1)“ancient church effect” 2) “being a soloist” • What: 1)delay and re‐mix 2) mix the sound from mic with wav. • How: sample the mic_input at 44.1kHz to avoid interpolation Using external SRAM to store input signal for re‐fetching
Design & requirements: • Three inputs: Mic, SD, FM • Three audio analyzer: FFT, Peak meter, NoteFreq • Two audio processer: mixer, delay • Two audio analyzer output: TFT screen, LEDs • Two audio output peripherals: 10w stereo power amp, S/pdif photo transmitter
TFT: thin film transistor LED: light emitting diode S/pdif: Sony Philips digital interface format
Block diagram • Microcontroller unit • Peripheral • FM receiver • Audio codec • Power amplifier
• Input/output • • • • •
Microphone Antenna Speakers RGBW LEDs 3.2’ TFT touch screen
Design: Microcontroller Unit • MK20DX256VLH7 processor (256k on‐chip memory, max of 96 MHz, Acorn RISC Machine Cortex‐M4 Core) • MKL02Z32 32K flash
RISC stands for reduced instruction set computing
Design: Microcontroller Unit • SPI bus(for TFT touch screen, SRAM and SD card) • I2C bus(for FM and audio codec) • Able to run 1024 point Fast Fourier transform in 0.1 seconds • 4 PWM pins (LEDs, TFT touch screen and FM) • 3 analog reads (delay control)
SPI: serial port interface I2C: intel‐integral circuit PWM: pulse width modulation
MCU circuit diagram
PWM SPI I2C
MCU Panel
Peripherals: Audio codec, MicroSD& SRAM • SGTL5000 • Stereo line‐in, one mic‐in • Stereo line‐out
• 23LC1024 1Mbits SRAM • Make it possible to have at most 1.4s delay(44.1kHz, 16bit,mono)
• SanDisk Ultra MicroSD card(8GB) • Driven by SPI bus. • So far the only microSD card can all us stream two wav file simultaneously.
Audio codec pinout
Cite needed
SRAM and MicroSD card pinout
Mic + pre-amp
Frequency sweep test • Amplifier gain is not fixed • 20dB DC gain • Bandwidth 20Hz‐4kHz
HearID® Auditory Diagnostic System
Design: FM receiver • Carrier frequency 89.3MHz – 104.9MHz • digital radio data system(fetch station information)
FM receiver panel
Power amplifier • TDA2005: 20W bridge/stereo amplifier • Gain 54dB • Bandwidth(3dB) 20Hz – 6kHz • Total harmonic distortion: 4% • Signal to noise ratio: 60dB
Power amplifier circuit diagram
Gain and THD (total harmonic distortion) ,
• ,
=0.71% [2]
SNR
575u/1.75 = 0.003%
Audio processing: • 1024 point radix‐4 FFT drives 16 LEDs • Multi‐tap delay, up to 1.2 seconds • Mixing sound from mic with playing wav • Two peak meters indicate instantaneous loudness(ITU‐R BS1770 standard[1]) • Yin’s fundamental frequency detector • Optical fiber audio transmission
1024 point Fast Fourier transform(Radix-4) Specturm resolution:44.1k/1024 = 43Hz Latency: has to be less than 512/44.1k=0.012s Hanning window to avoid frequency leakage. [3] Manually select frequency bins to drive RGBW LEDs. The color of the LED indicate dynamics.
Simply delay 1M SRAM (23LC1024), eight taps delay(up to 1.3s) are created and re‐ mixed. Two knobs control the delay time. Feedbacks are actually allowed to create “infinite” echoes.
Mixer Mix the audio input from microphone and wav file stored in the microSD card. Real time mixture is streamed out. Two peak meter would be shown on the 3.2 inch screen.
Yin’s fundamental frequency detector(not in R&V) Famous fundamental frequency detector based on auto‐correlation theorem. Reason: tight in lower note range. Amazingly accurate, albeit processing power and memory hungry.
S/PDIF --->Toslink(not in R&V) Need photo‐link connector (Digikey 1080‐1434‐ND, $1)
Conclusion: • Successful project as expected • Potential improvement: •
Large power consumption
•
Better heat sink
•
Wood box size
• Future works: •
Speech recognizer (Amazon Echo)
•
Compact PCB with high quality components
•
Fine art design
Citation: [1] ITU‐R, Rec. "ITU‐R BS. 1770‐2, Algorithms to measure audio programme loudness and true‐peak audio level." International Telecommunications Union, Genewa (2011). [2] Shmilovitz, Doron. "On the definition of total harmonic distortion and its effect on measurement interpretation." IEEE Transactions on Power delivery 20.1 (2005): 526‐528. [3] Harris, Fredric J. "On the use of windows for harmonic analysis with the discrete Fourier transform." Proceedings of the IEEE 66.1 (1978): 51‐83.
Acknowledgement Prof. Zhu:precious advices during design review and demo TA:Yuchen He
KurtE
Frank B
Q&A: Critics, concerns, comments?
Thanks for Watching