[Please fill in during the registration stage↓] This work uses the method of WaveTable Synthesis to play the music score. It uses the Cortex M0+ MCU to highly optimize the program, reaching 20 polyphony, 32khz sampling rate, and 16bit wavetable. Sample performance.
[Please fill in during the competition stage↓] * 1. Details of the work;
Wavetable synthesis means sampling and storing it as a wavetable file. During replay, instructions are issued to the wavetable based on the music information recorded in the music file. The corresponding sound information is found one by one from the table and passed through the microprocessor or the CPU of the PC system. It is synthesized and released after processing. Traditionally, this operation is implemented on high-performance platforms, such as ASIC, DSP, PC, etc. The work aims to realize extremely real-time wavetable synthesis function on a low-performance MCU, so key parts of the program are completed using assembly to achieve optimal execution speed. The work has the timbre of a traditional music box, and uses segmented sampling to better express the sounds of different pitches. The onboard MCU has 128K FLASH, which can store nearly 25 songs with an average length of 10 minutes in addition to programs and wave tables. At the same time, it provides a tool for converting midi files into music images, so that the music content can be customized at will. The work also has volume adjustment, song navigation and audio visualization functions, making it highly practical. The hardware supports USB interface to update the internal score image.
* 2. Describe the challenges faced by the work and the problems it solves;
Wavetable synthesis has a high real-time nature, that is, the parameters of 20 pronunciation units need to be updated and mixed every 1/32000s, so the key parts are completed using assembly, making debugging relatively difficult.
* 3. Describe the key points involved in the hardware and software parts of the work;
The core MCU is NV32F100, which has large FLASH capacity and PWM can output high current, which can directly drive the speaker. As a DIY piece SOP16 is also easier to solder. At the same time, the MCU is a 2.7~5.5v wide voltage product and can be directly powered by ordinary AA batteries. The USB interface uses CH330N, which has fewer pins and is easy to use. The firmware uses a front-end and back-end architecture, and timer interrupts are used to perform wavetable synthesis in real time. At the same time, we also designed a special tool software for midi conversion of music score data, which has an intelligent transposition function, so that the range of the instrument may match the range of the music box.
* 4. List of work materials;
For details, please refer to the attached BOM_#4th 立chuang competition#Wave table synthesis music box_20190921170139.csv.
* 5. Upload the picture of the work; (the PCB must have the competition logo and take a photo and upload it, if not, it will be deemed as giving up the competition)
* 6. Demonstrate your work and record it as a video for upload; (The content of the video must include: introduction to the work; functional demonstration; performance test; close-up of the competition logo on the PCB. Failure to do so will be deemed as giving up the competition)
Please see: https://www.bilibili.com/video/av68526732/
7. Open source documents. For firmware, please refer to: https://github.com/eeyrw/music-box-nv32 For midi to music score mirroring tool, please refer to: https://github.com/eeyrw/midi-to-hex/tree/new-midi-to -hex
The attachment has compiled hex and bin files, which can be burned and used directly. Regarding the burning of NV32F100, please refer to: http://bbs.21ic.com/icview-1639052-1-1.html midi-to-hex-example.zip is a music score conversion image tool compiled for the Windows platform. You can refer to the internal readme gets the score image file.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet