Intro
Small microcontroller audio project like CircuitPython or the Adafruit Wave Shield are designed to play a very specific type of audio. If your music sample is in MP3 format, or 44KHz wav, you'll want to convert it to the right format. This way you will get the best sounding audio, and makes your code easy!
This guide will show how to convert your music of FX into PCM 16-bit Mono Wave files at 22KHz samplerate
Check the file
In Windows 7, if you have a wave file already, you should check to see if it's already in a proper format. That way you will save yourself some time! In Windows, right-click on the file, and select Properties then click on the Summary tab.
Note: This doesn't work under WIndows 10 unfortunately. You'll probably need to put the file into one of the conversion programs and just change it to ensure it works well.
This file is 16KHz, 16-bit, mono PCM. Since thats below the maximum (22KHz, 16-bit, mono PCM) you are good to go. No need to convert the file.
Ok, let's say the file is an MP3 or 44KHz or stereo wave file. Or that you don't know what the file is. We will need to convert it down.
The next two sections of this guide shows two ways in which to convert files. There are also other programs on various platforms that perform the same type of conversion but we don't have a step-by-step for such programs.
Page last edited March 08, 2024
Text editor powered by tinymce.