urock @ jserv course final
TRANSCRIPT
![Page 1: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/1.jpg)
uRockMusic On MCU
by Sonicyang Anarchih KK Hirokiht
![Page 2: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/2.jpg)
Outline● Project Target● Circuit Design● How community helped us● How Effect works and Implementation● Wav Playing and Recoder● UI● Challanges & Obstacles● Housing
![Page 3: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/3.jpg)
Project Target - InspirationAt the beginning, we want to try out audio signal processing on microcontrollers, insteads of traditional method, DSPs.
As we are Guitar players, the Product we choose is Guitar Effect Pedal.
![Page 4: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/4.jpg)
What is Effect Pedal
![Page 5: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/5.jpg)
Circuit DesignOn our Design we want most of the work done digitally.
The analog Circuit mainly contains some amplifiers and voltage regulators only.
![Page 6: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/6.jpg)
Amplifiers and Level Shifters
![Page 7: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/7.jpg)
Voltages RegulatorsThe on board Switching regulators are noisy, thus we use external voltage regulators.
● We are using TI’s TPS7A4700, RF Rating
Through, QFN20 is hard to solder,the result is Outstanding.
![Page 8: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/8.jpg)
How Communities helped us
Libraries and Firmware we are using● STM32 Cube● FATFS● uGFX● ARM DSP Lib
OSS and sharing have make our way to the goal much more easier
![Page 9: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/9.jpg)
STM32 Cube
New HAL Firmware means fewer bugs.Handy STM32 Cube MX software, Generate Hardware related Initializing code.
Comes with multiple Middlewares.● FreeRTOS● FATFS
![Page 10: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/10.jpg)
uGFX
Ported to base on Cube Firmware and FreeRTOS
Very Flexible and portable, eased our pain on UI designing.
![Page 11: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/11.jpg)
ARM DSP Lib
Utiliztiing ARM’s SIMD instructions to speed up signal processing.
support Fix point and floating point, but SIMD is only available to fix point numbers.
![Page 12: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/12.jpg)
Effect
● Distortion● Overdrive● Equalizer● Compressor● Delay● Reverb
![Page 13: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/13.jpg)
For coding the effects, we use the ARM DSP Library to help us.
We also use Q12 numbers(fix points) to enable the possibility to use ARM Cortex-M4F DSP & SIMD
By using the Above 2 technicals, the speed gain is LARGE.
![Page 14: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/14.jpg)
Aid of Python and MATLAB
To simulate the Effects and visualize before hands. we use python and MATLAB to test the algorithms.
![Page 15: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/15.jpg)
Effect - Overdrive & Distortion
![Page 16: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/16.jpg)
Effect - Compressor
![Page 17: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/17.jpg)
Effect - Delay
The internal SRAM is not deep enough, thus we store the delay data on external SDRAM.
![Page 18: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/18.jpg)
Effect - Equalizer
Use IIR Filter to filter the audio.Coefficient designing base on MATLAB’s aid.
![Page 19: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/19.jpg)
Wav Player and Recorder
Implemented Wav player and Recoder which plays 16bits 44100k files
The purpose is to let user recode clips to accompany himself playings
![Page 20: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/20.jpg)
UI
![Page 21: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/21.jpg)
Challange & Obstacles
1. HAL Firmware is still new, lots libraries are still not compatiable.
2. Efficiently process audio siginals and preserve accuracy
3. The Digital Siginal Processing requires lost of MATH and base knowledge
![Page 22: uRock @ Jserv Course Final](https://reader030.vdocument.in/reader030/viewer/2022032618/55b9e019bb61ebc03d8b4745/html5/thumbnails/22.jpg)
Housing