Convert MP3s

CircuitPython works best with stereo or mono MP3 files from 32kbit/s to 128kbit/s, with sample rates from 16kHz to 44.1kHz. If your files are different, you can convert them using the free software Audacity. See MP3 Export Options in the Audacity docs for more details.

Copy Music to micro SDCard

Circuitpython supports FAT and FAT32 filesystems. If your micro SDCard is not already formatted with one of those filesystems, then use a PC to format it.

Once formatted, connect it to your PC and copy your MP3 song files onto it. You can sort them into different directories if you want, using any organization that you want. Or you can put them all in the root of the micro SDCard. Just make sure the paths in the playlist.json file match the paths to the files on your micro SDcard.

If you want the artist's name to be shown, then you'll need to include it in the filename. For example:

FavoriteBand - Amazing Song of Awesome.mp3

Prepare Playlist JSON

The PyPortal Winamp player reads the playlist from the file playlist.json stored on your CIRCUITPY drive. If you'd like, you can create extra playlist_[something].json files on your drive and switch between them by renaming the one you want to use to playlist.json. This allows you to set up as many playlists as you want so you have appropriate jams for any occasion.

A sample playlist.json file is shown below. You can use it as a starting point. Modify the file names and paths to match your songs you copied onto the micro SDCard in the previous step.

  "playlist": {
    "files": [
      "/sd/FavoriteBand - Advertime.mp3",
      "/sd/FavoriteBand - Beat Thee.mp3",
      "/sd/FavoriteBand - From Page to Practice.mp3",
      "/sd/FavoriteBand - Study and Relax.mp3",
      "/sd/FavoriteBand - The Celebrated Minuet.mp3"

Once you've got your song files listed, save a copy as playlist.json on your CIRCUITPY drive. You can have additional playlist_[something].json files if you'd like, but you must have exactly one named playlist.json if your using the default configuration inside of

This guide was first published on Feb 18, 2022. It was last updated on 2022-02-18 13:43:13 -0500.

This page (Prepare Playlists) was last updated on May 15, 2022.

Text editor powered by tinymce.