# CircuitPython MIDI to CV Skull

## Overview

https://www.youtube.com/watch?v=gBTJpAjKV9w

![](https://cdn-learn.adafruit.com/assets/assets/000/113/844/medium800/projects_edited_P1380483.jpg?1659454818)

What do you do if you want the convenience of MIDI but the warm tones of analog synths? Build a MIDI to CV converter, of course! In this project, you'll use a QT Py RP2040 running CircuitPython with an MCP4725 DAC to convert MIDI messages to a gate output and 1V/oct output.&nbsp;

The build is housed in a snazzy 3D printed skull adorned enclosure. The output jacks are located in the skull's eyes.

![projects_edited_P1380540.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/891/medium640/projects_edited_P1380540.jpg?1659466487)

The CircuitPython code converts MIDI `NoteOn` and `NoteOff` messages to gate out and 1V/oct signals that are sent through the two mono audio jacks. This lets you play your CV controlled synths with a MIDI keyboard or a MIDI song file from your DAW.

![projects_edited_P1380543.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/892/medium640/projects_edited_P1380543.jpg?1659466556)

The MCP4725 DAC is a digital to analog converter and outputs the voltages to correspond with the expected 1V/oct value.

![projects_edited_P1380478.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/893/medium640/projects_edited_P1380478.jpg?1659467257)

## What is 1V/oct?

[1V/oct](https://learningmodular.com/glossary/1-voct/#:~:text=by%20Chris%20Meyer%20%7C%20Nov%2016,its%20pitch%20by%20one%20octave.) is a standard for controlling pitch in modular synthesis. A volt is divided to correspond with the twelve pitches in western music. For example, 0.333V is pitch E-2 and 0.917V is pitch B-2. When the voltage is increased by 1V, the octave increases by 1. For example, 1.333V is pitch E-3 (an increase of 1V and 1 octave) and 2.917V is pitch B-4 (an increase of 2V and 2 octaves).

However, these pitches are approximate and depend on a variety of factors, such as your oscillator's tuning and any electrical interference. But that's half the fun of synthesis!

## Prerequisite Guides
[Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040)
[MCP4725 12-Bit DAC Tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial)
[MIDI for Makers](https://learn.adafruit.com/midi-for-makers)
## Parts
### 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)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Vertical Breadboard-Friendly 3.5mm Mono Headphone Jack

[Vertical Breadboard-Friendly 3.5mm Mono Headphone Jack](https://www.adafruit.com/product/4031)
Pipe audio in or out of your project with this very handy breadboard-friendly audio jack. It's a mono jack with a disconnect pin so you'll get a ground sleeve pin, a left tip pin and a pin that will be disconnected when a jack is inserted. You can use any **3.5mm audio...**

In Stock
[Buy Now](https://www.adafruit.com/product/4031)
[Related Guides to the Product](https://learn.adafruit.com/products/4031/guides)
![Vertical Breadboard-Friendly 3.5mm Mono Headphone Jack with audio cable plugged in](https://cdn-shop.adafruit.com/640x480/4031-05.jpg)

### MCP4725 Breakout Board - 12-Bit DAC with I2C Interface

[MCP4725 Breakout Board - 12-Bit DAC with I2C Interface](https://www.adafruit.com/product/935)
Your microcontroller probably has an ADC (analog -\> digital converter) but does it have a DAC (digital -\> analog converter)??? Now it can! This breakout board features the easy-to-use MCP4725 12-bit DAC. Control it via I2C and send it the value you want it to output, and the VOUT pin...

In Stock
[Buy Now](https://www.adafruit.com/product/935)
[Related Guides to the Product](https://learn.adafruit.com/products/935/guides)
![Angled shot of MCP4725 Breakout Board - 12-Bit DAC w/I2C Interface.](https://cdn-shop.adafruit.com/640x480/935-11.jpg)

### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/guides)
![Angled Shot of the Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single.](https://cdn-shop.adafruit.com/640x480/1608-03.jpg)

### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
![Silicone Cover Stranded-Core Wire - 30AWG in Various Colors laid out beside each other. ](https://cdn-shop.adafruit.com/640x480/2051-01.jpg)

### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
![Angled shot of coiled pink and purple USB cable with USB A and USB C connectors.](https://cdn-shop.adafruit.com/640x480/5153-02.jpg)

### Part: Short Break-away Male Header
quantity: 1
36-pin 0.1" Short Break-away Male Header - Pack of 10
[Short Break-away Male Header](https://www.adafruit.com/product/3009)

### Part: Short Female Header
quantity: 1
36-pin 0.1" Short Female Header - Pack of 5
[Short Female Header](https://www.adafruit.com/product/3008)

### Part: M2.5 screws
quantity: 1
M2.5 screws and stand-offs
[M2.5 screws](https://www.adafruit.com/product/3299)

# CircuitPython MIDI to CV Skull

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/113/974/medium800/projects_midiToCVrp2040_bb.png?1659568124)

 **MCP4725 DAC**

- **VIN** to **board 5V**
- **GND** to **board GND**
- **SCL** to **board SCL with 2K resistor**
- **SDA** to **board SDA with 2K resistor**
- **VOUT** to **left mono jack tip**

**QT Py RP2040**

- **GND** to **left mono jack sleeve**
- **GND** to **right mono jack sleeve**
- **A1** to **right mono jack tip**

The 2K resistors for SCL and SDA keep the incoming logic level at 3.3V, rather than 5V.

## Why Not Use a STEMMA QT Cable?

The DAC is using the QT Py RP2040's 5V output for power so that the 1V/oct signals have a range of 0 to 5V. If you do not need a range of 5V, then you can use a STEMMA QT cable to power the DAC with 3.3V and make the GND and I2C connections.

# CircuitPython MIDI to CV Skull

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/113/897/medium800/projects_edited_P1380532.jpg?1659470687)

The MIDI to CV Skull may be assembled with 3D printed plates, described below. The top of the case can utilize a color swap to make the skull art pop. The pieces could also be milled or laser cut from other materials, such as wood or acrylic.

The STL files can be downloaded directly here or from Thingiverse.

[midiToCvSkullSTLs.zip](https://cdn-learn.adafruit.com/assets/assets/000/113/896/original/midiToCvSkullSTLs.zip?1659470656)
[Thingiverse download](https://www.thingiverse.com/thing:5447172)
The skull art is achieved with different depths in the .STL file that can be accentuated by using a color swap at the **1mm height** of the model in your slicer software.

![projects_edited_P1380534.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/842/medium640/projects_edited_P1380534.jpg?1659454662)

The top and bottom plate have mounting holes for the 1/4 size perma proto and the DAC STEMMA board. Stand-offs are used to create a circuit sandwich.

![projects_edited_P1380493.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/843/medium640/projects_edited_P1380493.jpg?1659454795)

# CircuitPython MIDI to CV Skull

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_qtpy_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# CircuitPython MIDI to CV Skull

## Code the MIDI to CV Skull

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/MIDI_to_CV_Skull/code.py

## Upload the Code and Libraries to the QT Py RP2040

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **volts.py**
- **code.py**

Your QT Py RP2040&nbsp; **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder,&nbsp; **volts.py** &nbsp;file and the&nbsp; **code.py&nbsp;** file.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/MIDI_to_CV_Skull.png )

## **volts.py** &nbsp;File

The&nbsp; **volts.py&nbsp;** file is a helper file that contains a dictionary (`volts[]`) with the phenetic note name, the MIDI note number and the 1V/oct voltage. The range of notes are C2 to C7, or 0V to 5V.&nbsp;

```auto
volts = [
    {'label':"C-2",'midi':36,'1vOct':0.000},
    {'label':"C♯2",'midi':37,'1vOct':0.083},
    {'label':"D-2",'midi':38,'1vOct':0.167},
    ...
    {'label':"B-6",'midi':95,'1vOct':4.917},
    {'label':"C-7",'midi':96,'1vOct':5.000},
]
```

## How the CircuitPython Code Works

First, USB MIDI, the digital output for the gate signal, I2C and the DAC are setup. Note that `board.I2C()` is being used rather than `STEMMA_I2C()`.

```python
#  midi channel setup
midi_in_channel = 1
midi_out_channel = 1

#  USB midi setup
midi = adafruit_midi.MIDI(
    midi_in=usb_midi.ports[0], in_channel=0, midi_out=usb_midi.ports[1], out_channel=0
)

# gate output pin
gate = DigitalInOut(board.A1)
gate.direction = Direction.OUTPUT

#  i2c setup
i2c = board.I2C()
#  dac setup over i2c
dac = adafruit_mcp4725.MCP4725(i2c)

#  dac raw value (12 bit)
dac.raw_value = 4095
```

## Mapping Voltages

Two arrays are created: `midi_notes[]` and `pitches[]`. `midi_notes[]` will hold the MIDI note numbers as defined in **volts.py**. `pitches[]` will hold the 12-bit DAC values that correspond with the 1V/oct values in **volts.py**.

```python
#  array for midi note numbers
midi_notes = []
#  array for 12 bit 1v/oct values
pitches = []
```

The `map_volts()` function, uses **simpleio**'s `map_range()` function to map the 1V/oct values from **volts.py** to 12-bit values for the MCP4725 DAC. These 12-bit values are then added to the `pitches[]` array.

```python
#  function to map 1v/oct voltages to 12 bit values
#  these values are added to the pitches[] array
def map_volts(n, volt, vref, bits):
    n = simpleio.map_range(volt, 0, vref, 0, bits)
    pitches.append(n)
```

A `for` statement iterates through the dictionary in **volts.py** and uses `map_volts()` to map the 1V/oct values to 12-bit values. Then, the MIDI note numbers in **volts.py** are added to the `midi_notes[]` array.

The indexes of each array correspond with each other for the same note and will be used in the loop. For example, `midi_notes[0]` equals MIDI note `36` and `pitches[0]` equals `0`, which are two different ways of saying note C2.

```python
#  brings values from volts.py into individual arrays
for v in volts:
    #  map_volts function to map 1v/oct values to 12 bit
    #  and append to pitches[]
    map_volts(v['label'], v['1vOct'], 5, 4095)
    #  append midi note numbers to midi_notes[] array
    midi_notes.append(v['midi'])
```

## The Loop

The loop begins by listening to incoming MIDI messages. In this instance of the code, the specific messages being listened for are `NoteOn` and `NoteOff` messages.

If a `NoteOn` message is received, the message's note number is checked against the `midi_notes` array and the matching index is defined as `z`. The DAC's value is set to `pitches[z]`, sending the corresponding 1V/oct voltage as a 12-bit value. `gate`'s value is set to `True`.

If a `NoteOff` message is received, the DAC's value is set to `0` and `gate`'s value is set to `False`.&nbsp;

```python
while True:
    #  read incoming midi messages
    msg = midi.receive()
    #  if a midi msg comes in...
    if msg is not None:
        #  if it's noteoff...
        if isinstance(msg, NoteOff):
            #  send 0 volts on dac
            dac.raw_value = 0
            #  turn off gate pin
            gate.value = False
        #  if it's noteon...
        if isinstance(msg, NoteOn):
            #  compare incoming note number to midi_notes[]
            z = midi_notes.index(msg.note)
            #  limit note range to defined notes in volts.py
            if msg.note &lt; 36:
                msg.note = 36
            if msg.note &gt; 96:
                msg.note = 96
            #  send corresponding 1v/oct value
            dac.raw_value = int(pitches[z])
            #  turn on gate pin
            gate.value = True
```

# CircuitPython MIDI to CV Skull

## Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/113/845/medium800/projects_edited_P1380440.jpg?1659454841)

## Components
Solder short plug headers to the QT Py RP2040.

![projects_edited_P1380446.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/846/medium640/projects_edited_P1380446.jpg?1659454857)

Solder short socket headers to the 1/4 perma proto board. Solder one stack of headers in **column D** , **rows 9-15**. Solder the other stack in **column H** , **rows 9-15**.

![projects_edited_P1380449.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/847/medium640/projects_edited_P1380449.jpg?1659454886)

Solder one audio jack's **sleeve pin** to **column C** , **row 6** and its **tip** to **column C** , **row 2**.

Solder the second audio jack's **sleeve pin** to **column H, row 6** and its **tip** to **column H, row 2**.

![projects_edited_P1380454.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/848/medium640/projects_edited_P1380454.jpg?1659455157)

## Ground Rail
Solder **one wire** from the **ground rail** to **column A, row 14**. This will connect the QT Py RP2040's **GND** connection to the ground rail.

Solder **one wire** from the **ground rail** to **column A, row 6**. Then, a **second wire** from **column E, row 6** to **column F, row 6**. This connects the audio jacks' **sleeve pins** to **GND**.

![projects_edited_P1380455.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/849/medium640/projects_edited_P1380455.jpg?1659455578)

## Power Rail
Solder **one wire** from the **power rail** to **column A, row 15** (red wire). This connects the QT Py RP2040's **5V** pin to the power rail.

![projects_edited_P1380457.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/850/medium640/projects_edited_P1380457.jpg?1659455812)

## Gate Out Signal
Solder a **wire** from **column J, row 2** to **column J, row 14** (green wire). This connects the gate signal audio jack's **tip** to the QT Py RP2040's pin **A1**.

![projects_edited_P1380460.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/851/medium640/projects_edited_P1380460.jpg?1659455870)

## The MCP4725 DAC
The MCP4725 DAC is wired to the 1/4 perma proto via its header pins. You can use the bottom plate as a guide for how long the wires need to be.

![projects_edited_P1380462.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/852/medium640/projects_edited_P1380462.jpg?1659456047)

## DAC Power
Solder the DAC's **VIN** pin to the **power rail** (red wire). This allows the DAC to have a 0 to 5V range.

![projects_edited_P1380463.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/853/medium640/projects_edited_P1380463.jpg?1659456146)

## DAC Ground
Solder the DAC's **GND** pin to the **ground rail** (black wire).

![projects_edited_P1380465.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/854/medium640/projects_edited_P1380465.jpg?1659456168)

## DAC I2C
Solder the DAC's **SCL** pin to **column I, row 10** (yellow wire).

![projects_edited_P1380466.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/855/medium640/projects_edited_P1380466.jpg?1659456192)

Solder the DAC's **SDA** pin to **column J, row 11** (blue wire).

![projects_edited_P1380469.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/856/medium640/projects_edited_P1380469.jpg?1659456383)

## DAC Output
Solder the DAC's **VOUT** pin to the left audio jack's **tip** at **column A, row 2** (white wire).

![projects_edited_P1380471.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/875/medium640/projects_edited_P1380471.jpg?1659461962)

And that completes the wiring!

![](https://cdn-learn.adafruit.com/assets/assets/000/113/876/medium800/projects_edited_P1380478.jpg?1659462329)

# CircuitPython MIDI to CV Skull

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/113/878/medium800/projects_edited_P1380523.jpg?1659462393)

## Prepare the Skull
Attach five 12mm M2.5 stand-offs with M2.5 screws into the skull's mounting holes in its nose and mouth.

![projects_edited_P1380520.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/879/medium640/projects_edited_P1380520.jpg?1659462414)

![projects_edited_P1380516.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/880/medium640/projects_edited_P1380516.jpg?1659462435)

![projects_edited_P1380513.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/881/medium640/projects_edited_P1380513.jpg?1659462446)

## Prepare the Boards
Attach an 8mm M2.5 stand-off with an M2.5 screw into the 1/4 perma proto's mounting hole located between the socket headers.

Then, plug the QT Py RP2040 into the socket headers.

![projects_edited_P1380502.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/882/medium640/projects_edited_P1380502.jpg?1659462591)

![projects_edited_P1380503.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/883/medium640/projects_edited_P1380503.jpg?1659462600)

![projects_edited_P1380504.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/884/medium640/projects_edited_P1380504.jpg?1659462608)

## Attach the Boards
Slot the 1/4 perma proto and MCP4725 STEMMA board onto the mounted stand-offs. The two audio jacks will slot into the skull's eyes.

![projects_edited_P1380500.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/885/medium640/projects_edited_P1380500.jpg?1659462703)

Secure the boards to the stand-offs with five 8mm M2.5 stand-offs.

![projects_edited_P1380498.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/886/medium640/projects_edited_P1380498.jpg?1659462793)

## Finish
Secure the back plate to the stand-offs with M2.5 screws. That completes the assembly!

![projects_edited_P1380495.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/887/medium640/projects_edited_P1380495.jpg?1659462820)

# CircuitPython MIDI to CV Skull

## Usage

![](https://cdn-learn.adafruit.com/assets/assets/000/113/888/medium800/projects_edited_P1380543.jpg?1659462953)

Connect the QT Py RP2040 via USB to a USB MIDI host or a computer running your favorite DAW (digital audio workstation).&nbsp;

Use the skull's left eye jack for a gate out signal. Use the skull's right eye jack for a 1V/oct output.&nbsp;

When you send a MIDI `NoteOn` message, a gate and 1V/oct voltage will be sent out of the audio jacks. A `NoteOff` message stops the gate signal.

You can change up the **code.py** file to utilize different MIDI messages or different CV values depending on your needs and synth gear.

![projects_edited_P1380551.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/889/medium640/projects_edited_P1380551.jpg?1659464077)

## Going Further - Winterbloom's CircuitPython Eurorack Modules
![](https://cdn-learn.adafruit.com/assets/assets/000/113/890/medium800/projects_IMG_6115.jpg?1659465367)

If you're interested in seeing how far you can go with Eurorack/CV controlled synths and CircuitPython, be sure to check out [Winterbloom](https://winterbloom.com/about). Winterbloom is an open source synthesizer company with hardware and software designed by [Thea Flowers](https://thea.codes/).

She designed two modules that utilize CircuitPython: [Big Honking Button](https://winterbloom.com/shop/big-honking-button) and [Sol](https://winterbloom.com/shop/sol). Both modules allow you to [modify the CircuitPython code](https://github.com/wntrblm/Big_Honking_Button/tree/main/examples) running onboard for custom firmware. [Sol](https://github.com/wntrblm/Sol) is also very similar to this skull project, since it is a MIDI to CV converter, but with four gate outputs and four CV outputs.


## Featured Products

### 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)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Vertical Breadboard-Friendly 3.5mm Mono Headphone Jack

[Vertical Breadboard-Friendly 3.5mm Mono Headphone Jack](https://www.adafruit.com/product/4031)
Pipe audio in or out of your project with this very handy breadboard-friendly audio jack. It's a mono jack with a disconnect pin so you'll get a ground sleeve pin, a left tip pin and a pin that will be disconnected when a jack is inserted. You can use any **3.5mm audio...**

In Stock
[Buy Now](https://www.adafruit.com/product/4031)
[Related Guides to the Product](https://learn.adafruit.com/products/4031/guides)
### MCP4725 Breakout Board - 12-Bit DAC with I2C Interface

[MCP4725 Breakout Board - 12-Bit DAC with I2C Interface](https://www.adafruit.com/product/935)
Your microcontroller probably has an ADC (analog -\> digital converter) but does it have a DAC (digital -\> analog converter)??? Now it can! This breakout board features the easy-to-use MCP4725 12-bit DAC. Control it via I2C and send it the value you want it to output, and the VOUT pin...

In Stock
[Buy Now](https://www.adafruit.com/product/935)
[Related Guides to the Product](https://learn.adafruit.com/products/935/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/guides)
### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
### Male Header 36-pin 0.1" Short Break-away Type - Pack of 10

[Male Header 36-pin 0.1" Short Break-away Type - Pack of 10](https://www.adafruit.com/product/3009)
In this world nothing can be said to be certain, except we need headers, headers, and more headers!

**Each pack contains ten 36-pin short break-away male headers, 0.1" pitch. These headers are very short for [matching with our...](https://www.adafruit.com/products/3008)**

Out of Stock
[Buy Now](https://www.adafruit.com/product/3009)
[Related Guides to the Product](https://learn.adafruit.com/products/3009/guides)
### 36-pin 0.1" Short Female Header - Pack of 5

[36-pin 0.1" Short Female Header - Pack of 5](https://www.adafruit.com/product/3008)
In this world nothing can be said to be certain, except we need headers, headers, and more headers!

**Each pack contains five 36-pin short female&nbsp;headers, 0.1" pitch. These headers are very short for fitting into tight spaces with a height of&nbsp;just 5mm instead of...**

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [How to Make Animated Graphics for Hologram Displays](https://learn.adafruit.com/how-to-make-animated-graphics-for-hologram-displays.md)
- [Mystery Box: Crypto Countdown Case](https://learn.adafruit.com/mystery-box-crypto-countdown-case.md)
- [Monitor Your Greenhouse with a No-Code Environmental Sensor](https://learn.adafruit.com/monitor-your-greenhouse-with-a-no-code-environmental-sensor.md)
- [PowerWash Simulator Nozzle Controller](https://learn.adafruit.com/powerwash-simulator-nozzle-controller.md)
- [MCP4725 12-Bit DAC with Raspberry Pi](https://learn.adafruit.com/mcp4725-12-bit-dac-with-raspberry-pi.md)
- [32x32 Square Pixel Art Animation Display](https://learn.adafruit.com/32x32-square-pixel-display.md)
- [4x4 Rotary Encoder MIDI Messenger](https://learn.adafruit.com/4x4-rotary-encoder-midi-messenger.md)
- [Adabot Toy Robot Friend](https://learn.adafruit.com/adabot-rp2040.md)
- [Pulse Room](https://learn.adafruit.com/pulse-room.md)
- [Severance Portable Macrodata Refinement Terminal](https://learn.adafruit.com/portable-macrodata-refinement-terminal.md)
- [QT Py Snap Fit Case](https://learn.adafruit.com/qt-py-snap-fit-case.md)
- [Owl IR TV Remote](https://learn.adafruit.com/owl-ir-tv-remote.md)
- [NeoKey Emoji Keyboard](https://learn.adafruit.com/neokey-emoji-keyboard.md)
- [QT Py CH32V203 eInk / ePaper Daily Calendar and Clock](https://learn.adafruit.com/ch32v203-eink-epaper-calendar-and-clock.md)
- [RP2040 RunCPM Emulator with USB Keyboard & HDMI screen](https://learn.adafruit.com/rp2040-runcpm-emulator-with-usb-keyboard-hdmi-screen.md)
