Overview

If you have an ARM Cortex M4 (or M3) based microcontroller board, and you want to rock out, this mini guide will be music to your ears. With the accompanying library, based off of Helix, you will be able to decode and play stereo MP3 files without the need for an external chip! That's right, no VLSI VS10xx chips required, you can do it on the fly!

MP3 files are very popular because of their widespread availability and small size. MP3 files are compressed, and can be 75 to 95% smaller in size than their original uncompressed form. This small size makes them great for embedded audio projects where storage can be an issue - WAV files are much easier to decode 'cause there is no compression, but that also made them very big.

Previously, the MP3 format was protected under patent, so anybody who wanted to sell products that used MP3 files would have to pay a licensing fee. Now those patents have expired and MP3 is freeeeee and you can embed the decoder into any project or product!

Because of this, we can now show you how to decode and play back MP3 files with just a powerful microcontroller like the Adafruit Metro M4 or Feather M4, Teensy 3.1, Teensy 3.2, and Teensy 3.6!

 This is great news for cosplayers, halloween fans, prop-makers and all other types of DIY enthusiasts who want to add MP3 audio to their projects without the external hardware that was previously required (like the Adafruit Audio FX Sound Board).

TODO

A lot! This code isn't optimized, doesn't use DMA, requires two DACs at this time (doesn't support I2S)... but it is working proof-of-concept!

Compatible Microcontrollers

The Adafruit MP3 library is currently compatible with the Adafruit Feather / Metro M4, Teensy 3.1, Teensy 3.2, and Teensy 3.6 only.

The reason we like these is because all boards have a powerful ARM Cortex M4 at the heart and 1 or 2 12 bit DAC outputs (teensy 3.6 and feather/metro M4 have 2). This combo of processing power and 2 analog outputs is perfect for stereo audio processing with decent resolution, and no additional cost. They also have plenty of RAM for buffering data.

If you have a favorite Cortex M3/M4 chip, and you'd like to add support, please submit a pull request! (We only had these two boards on-hand.) You'll need about 32KB of RAM available and about 32KB of FLASH.

This code will never work on an 8-bit microcontroller such as the Arduino UNO/Mega. And the 32KB of RAM requirement shuts out many other smaller Cortex chips!

Adafruit Metro M4 feat. Microchip ATSAMD51

PRODUCT ID: 3382
Are you ready? Really ready? Cause here comes the fastest, most powerful Metro ever. The Adafruit Metro M4 featuring the Microchip ATSAMD51. This...
$27.50
IN STOCK

Teensy 3.6 without headers

PRODUCT ID: 3266
The awesome new Teensy 3.6 is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.6 brings a low-cost 32-bit ARM...
$29.95
IN STOCK

Teensy 3.2 + header

PRODUCT ID: 2756
Teensy 3.2 is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.2 brings a...
$19.95
IN STOCK

Basis

The Adafruit_MP3 library is a wrapper around the excellent Helix mp3 decoder, modified for ease of use.

This guide was first published on Nov 09, 2017. It was last updated on Oct 19, 2018. This page (Overview) was last updated on Nov 14, 2017.