![]() And square waves have many high frequency harmonics. The smaller the resoultion of your signal the more "square-ish" it looks. This high frequency hiss is known as quantization noise and it's very unpleasant. The problem of 8 bit audio is that even though it's good enough to hear most of the details, it's always accompanied by a high frequency hiss. My first attempt was to use 8 bit resolution audio samples and fit everything into a MCU with smaller flash memory. These sounds were converted from mp3 to raw audio data using Audacity. The drum sounds were downloaded from the Internet as mp3 files. The sound that is outputted by the DAC is connected to an audio jack through a potentiometer that adjusts the amplitude of the output signal. I chose this MCU for this project, specifically for its 512KB flash size and because it incorporates a DAC. We also need to store the program besides the drum sounds and this is why I chose a 512KB flash MCU. Sounds * sample_rate * resolution_bytes * average_sound_duration_seconds = Some napkin math for how much flash memory we need to store the 6 sounds would be: The duration of each sample is less than 2s. ![]() Press multiple buttons in short time and the MCU will mix the sounds and play them into the DAC.Įach of the 6 drum sounds is sampled at 22050 Hz sample rate with 16 bits resolution. ![]() When you press a button, a drum sound is played by the MCU using its 12bit DAC. There are 6 push buttons, one for each drum sound. The star of the show is the STM32F100VET6B MCU. It's this natural behavior that I tried to incorporate into this project. When you hit multiple drums one after the other, the sounds from multiple drums will mix. When you push a button, a sound will play, but immediately pushing another button will stop the currently playing sound and start playing the new one. There are toys/devices with inputs that trigger sound playing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |