# Audio Synthesis with CircuitPython synthio

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/124/368/medium800/circuitpython_fundamental_synthio.jpg?1694572924)

https://youtu.be/q4MBm8w-dTM

![](https://cdn-learn.adafruit.com/assets/assets/000/124/652/medium800/circuitpython_propmaker_4692.jpg?1695225352)

You can create your own polyphonic audio synthesizer on a microcontroller board using CircuitPython. The `synthio` module makes it sound great and it's easy to use.

This guide covers the fundamentals of audio synthesis using `synthio`, including practical examples. You'll be building your own small-but-powerful synths in no time.&nbsp;

### synthio History

The `synthio` library was originally created as single-voice, monophonic square wave player for MIDI files.

As of CircuitPython 8.1, `synthio` received significant development effort from [Jeff Epler](https://learn.adafruit.com/u/jepler) to turn it into a 12-voice, polyphonic synthesizer that uses a wide variety of waveforms, while adding filters, envelopes, modulation control, and a ring-modulation effect.

Check out the full `synthio` [documentation here](https://docs.circuitpython.org/en/latest/shared-bindings/synthio/index.html#).

Warning: 

### Hardware Requirements

While `synthio` is built into CircuitPython, this doesn't mean that every CircuitPython-capable board can run synthio effectively. Some chips to use for the best results are:

- RP2040/RP2350 -- e.g., Raspberry Pi Pico, QT Py RP2040, Feather RP2350
- EPS32-S2
- EPS32-S3
- iMX RT1011 -- e.g., Metro M7
- SAMD51 "M4" (N.B., a bit hard to find these days)
- nRF52 -- e.g., Feather nRF52840, CLUE

Your chosen board will also need to to support one of the three audio output methods:

- `audioio.AudioOut` -- output to a built-in Digital to Analog Converter (DAC)
- `audiobusio.I2SOut` -- output to I2S DAC amplifier board
- `audiopwmio.PWMAudioOut` -- output of pulse-width modulated square waves that will go through an external resistor-capacitor (RC) circuit to convert to audio

We'll cover these in more depth later in the guide.

### Board Check

You can check to see which modules are supported on any given board by checking the [CircuitPython.org](circuitpython.org/downloads) download page for that board.

In this example, the Feather RP2040 has `synthio` listed, as well as two different audio output modules that will work: `audiobusio` and `audiopwmio`.

![circuitpython_frp2040_4-3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/939/medium640/circuitpython_frp2040_4-3.jpg?1692919601)

## Parts

You can run `synthio` on a wide variety of boards, as noted above.

The simplest hardware to get up and running quickly is the PropMaker Feather RP2040, thanks to its on-board I2S amplifier and terminal blocks to screw in your speaker wires.

### Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier

[Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier](https://www.adafruit.com/product/5768)
The Adafruit Feather series gives you lots of options for a small, portable, rechargeable microcontroller board. By picking a feather and stacking on a FeatherWing you can create advanced projects quickly. One popular combo is our [Feather M4](https://www.adafruit.com/product/3857)...

In Stock
[Buy Now](https://www.adafruit.com/product/5768)
[Related Guides to the Product](https://learn.adafruit.com/products/5768/guides)
![Video of a white hand pressing a button to briefly turn an LED strip into white lights. Also wired up to the microcontroller are a servo motor and a speaker.](https://cdn-shop.adafruit.com/product-videos/640x480/5768-09.jpg)

### Mono Enclosed Speaker with Plain Wires - 3W 4 Ohm

[Mono Enclosed Speaker with Plain Wires - 3W 4 Ohm](https://www.adafruit.com/product/4445)
Listen up! This single&nbsp; 2.8" x 1.2" speaker&nbsp;is&nbsp;the perfect addition to any audio project where you need 4 ohm impedance and 3W or less of power. We particularly like these speakers as they are small and enclosed for good audio volume and quality. This speaker _does..._

In Stock
[Buy Now](https://www.adafruit.com/product/4445)
[Related Guides to the Product](https://learn.adafruit.com/products/4445/guides)
![Enclosed Speaker with wires](https://cdn-shop.adafruit.com/640x480/4445-01.jpg)

For the example videos in this guide we used the parts listed below. Note: any QT Py ESP32-S2, QT Py ESP32-S3, or QT Py RP2040 will work the same for the examples in this guide.

### Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT

[Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT](https://www.adafruit.com/product/5325)
What has your favorite Espressif WiFi microcontroller, comes with&nbsp;[our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, and has lots of Flash and RAM memory for your next IoT project? What will make your next IoT project flyyyyy? What a...

In Stock
[Buy Now](https://www.adafruit.com/product/5325)
[Related Guides to the Product](https://learn.adafruit.com/products/5325/guides)
![Angled shot of small square purple dev board.](https://cdn-shop.adafruit.com/640x480/5325-12.jpg)

### Adafruit Audio BFF Add-on for QT Py and Xiao

[Adafruit Audio BFF Add-on for QT Py and Xiao](https://www.adafruit.com/product/5769)
Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to turn many QT Py boards into powerful audio play projects that are super small!

This BFF comes with a MicroSD card slot that can address up to 64 GB of...

In Stock
[Buy Now](https://www.adafruit.com/product/5769)
[Related Guides to the Product](https://learn.adafruit.com/products/5769/guides)
![Angled shot of small square audio breakout board.](https://cdn-shop.adafruit.com/640x480/5769-00.jpg)

### or
### Adafruit I2S Amplifier BFF Add-On for QT Py and Xiao

[Adafruit I2S Amplifier BFF Add-On for QT Py and Xiao](https://www.adafruit.com/product/5770)
Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to add an I2S 3 Watt amplifier, for high quality audio playback,&nbsp;that can fit on the back of your miniature dev board. It uses just three GPIO pins that do...

In Stock
[Buy Now](https://www.adafruit.com/product/5770)
[Related Guides to the Product](https://learn.adafruit.com/products/5770/guides)
![Adafruit I2S Amplifier BFF Add-On for QT Py and Xiao.](https://cdn-shop.adafruit.com/640x480/5770-00.jpg)

### Molex PicoBlade 2-pin Cable - 200mm

[Molex PicoBlade 2-pin Cable - 200mm](https://www.adafruit.com/product/3922)
When 0.1" is too big, and JST PH's too chunky, the ultra-slim "PicoBlade" is a reliable alternative. These are only 1.25mm pitch, but have a nice clicky connection.

This cable is nice and long, 200mm in fact. It's got both small form factor (won't take up a lot...

In Stock
[Buy Now](https://www.adafruit.com/product/3922)
[Related Guides to the Product](https://learn.adafruit.com/products/3922/guides)
![Molex Pico Blade 2-pin Cable pigtail ](https://cdn-shop.adafruit.com/640x480/3922-05.jpg)

### Also:
### Mini Oval Speaker - 8 Ohm 1 Watt

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
![Small, black, oval speaker with Pico Blade connector.](https://cdn-shop.adafruit.com/640x480/3923-06.jpg)

### Short Male Header Kit for ItsyBitsy

[Short Male Header Kit for ItsyBitsy](https://www.adafruit.com/product/4173)
These three&nbsp; **Short** &nbsp; **Male&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with&nbsp;our [ItsyBitsy boards](https://www.adafruit.com/?q=itsybitsy), and you're in business!

These 2.54mm / 0.1" pitch headers are...

In Stock
[Buy Now](https://www.adafruit.com/product/4173)
[Related Guides to the Product](https://learn.adafruit.com/products/4173/guides)
![Angled shot of two short 14-pin plug headers and one short 5-pin plug header.](https://cdn-shop.adafruit.com/640x480/4173-00.jpg)

### Short Female Header Kit for ItsyBitsy

[Short Female Header Kit for ItsyBitsy](https://www.adafruit.com/product/4174)
These three **Short** &nbsp; **Female&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with any of our&nbsp;[ItsyBitsy](https://www.adafruit.com/?q=itsybitsy)&nbsp;boards, and you're in business!

These headers are particularly cute and...

In Stock
[Buy Now](https://www.adafruit.com/product/4174)
[Related Guides to the Product](https://learn.adafruit.com/products/4174/guides)
![Angled shot of two short 14-pin socket headers and one short 5-pin socket headers.](https://cdn-shop.adafruit.com/640x480/4174-00.jpg)

- [Next Page](https://learn.adafruit.com/audio-synthesis-with-circuitpython-synthio/synthesizer-fundamentals.md)

## Featured Products

### Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier

[Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier](https://www.adafruit.com/product/5768)
The Adafruit Feather series gives you lots of options for a small, portable, rechargeable microcontroller board. By picking a feather and stacking on a FeatherWing you can create advanced projects quickly. One popular combo is our [Feather M4](https://www.adafruit.com/product/3857)...

In Stock
[Buy Now](https://www.adafruit.com/product/5768)
[Related Guides to the Product](https://learn.adafruit.com/products/5768/guides)
### Mono Enclosed Speaker with Plain Wires - 3W 4 Ohm

[Mono Enclosed Speaker with Plain Wires - 3W 4 Ohm](https://www.adafruit.com/product/4445)
Listen up! This single&nbsp; 2.8" x 1.2" speaker&nbsp;is&nbsp;the perfect addition to any audio project where you need 4 ohm impedance and 3W or less of power. We particularly like these speakers as they are small and enclosed for good audio volume and quality. This speaker _does..._

In Stock
[Buy Now](https://www.adafruit.com/product/4445)
[Related Guides to the Product](https://learn.adafruit.com/products/4445/guides)
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Adafruit Audio BFF Add-on for QT Py and Xiao

[Adafruit Audio BFF Add-on for QT Py and Xiao](https://www.adafruit.com/product/5769)
Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to turn many QT Py boards into powerful audio play projects that are super small!

This BFF comes with a MicroSD card slot that can address up to 64 GB of...

In Stock
[Buy Now](https://www.adafruit.com/product/5769)
[Related Guides to the Product](https://learn.adafruit.com/products/5769/guides)
### Adafruit I2S Amplifier BFF Add-On for QT Py and Xiao

[Adafruit I2S Amplifier BFF Add-On for QT Py and Xiao](https://www.adafruit.com/product/5770)
Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to add an I2S 3 Watt amplifier, for high quality audio playback,&nbsp;that can fit on the back of your miniature dev board. It uses just three GPIO pins that do...

In Stock
[Buy Now](https://www.adafruit.com/product/5770)
[Related Guides to the Product](https://learn.adafruit.com/products/5770/guides)
### Molex PicoBlade 2-pin Cable - 200mm

[Molex PicoBlade 2-pin Cable - 200mm](https://www.adafruit.com/product/3922)
When 0.1" is too big, and JST PH's too chunky, the ultra-slim "PicoBlade" is a reliable alternative. These are only 1.25mm pitch, but have a nice clicky connection.

This cable is nice and long, 200mm in fact. It's got both small form factor (won't take up a lot...

In Stock
[Buy Now](https://www.adafruit.com/product/3922)
[Related Guides to the Product](https://learn.adafruit.com/products/3922/guides)
### Short Male Header Kit for ItsyBitsy

[Short Male Header Kit for ItsyBitsy](https://www.adafruit.com/product/4173)
These three&nbsp; **Short** &nbsp; **Male&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with&nbsp;our [ItsyBitsy boards](https://www.adafruit.com/?q=itsybitsy), and you're in business!

These 2.54mm / 0.1" pitch headers are...

In Stock
[Buy Now](https://www.adafruit.com/product/4173)
[Related Guides to the Product](https://learn.adafruit.com/products/4173/guides)
### Short Female Header Kit for ItsyBitsy

[Short Female Header Kit for ItsyBitsy](https://www.adafruit.com/product/4174)
These three **Short** &nbsp; **Female&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with any of our&nbsp;[ItsyBitsy](https://www.adafruit.com/?q=itsybitsy)&nbsp;boards, and you're in business!

These headers are particularly cute and...

In Stock
[Buy Now](https://www.adafruit.com/product/4174)
[Related Guides to the Product](https://learn.adafruit.com/products/4174/guides)

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Adafruit RP2040 Prop-Maker Feather](https://learn.adafruit.com/adafruit-rp2040-prop-maker-feather.md)
- [Adafruit I2S Amplifier BFF](https://learn.adafruit.com/i2s-amplifier-bff.md)
- [Adafruit Audio BFF](https://learn.adafruit.com/adafruit-audio-bff.md)
- ["Mother of all Demos" USB Keyset](https://learn.adafruit.com/usb-keyset.md)
- [Halloween Neon LED Signs](https://learn.adafruit.com/halloween-neon-led-signs.md)
- [LED Noodle Lantern](https://learn.adafruit.com/led-noodle-lantern.md)
- [Motion Sensor Bat](https://learn.adafruit.com/motion-sensor-bat.md)
- [Kitty Toe Bean Keypad with Color TFT](https://learn.adafruit.com/kitty-toe-bean-paw-keypad-color-tct.md)
- [IBM PC Keyboard to USB HID with CircuitPython](https://learn.adafruit.com/ibm-pc-keyboard-to-usb-hid-with-circuitpython.md)
- [Tyrell Desktop Synthesizer](https://learn.adafruit.com/tyrell-desktop-synthesizer.md)
- [Zelda Echoes Of Wisdom Tri Rod](https://learn.adafruit.com/zelda-tri-rod.md)
- [Dune Worm Thumper](https://learn.adafruit.com/dune-worm-thumper.md)
- [PlayStation Spinner Controller](https://learn.adafruit.com/playstation-spinner-controller.md)
- [LED Matrix Alarm Clock](https://learn.adafruit.com/led-matrix-alarm-clock.md)
- [Lemon Mechanical Keypad](https://learn.adafruit.com/qtpy-lemon-mechanical-keypad-macropad.md)
- [NeoPixel Mini VU Meter](https://learn.adafruit.com/neopixel-mini-vu-meter.md)
- [Lightsaber Prop-Maker RP2040](https://learn.adafruit.com/lightsaber-rp2040.md)
- [Talking HAL 9000 with RP2040 Prop Maker Feather](https://learn.adafruit.com/hal-9000-rp2040-prop-maker.md)
