Alex Glow
Published © GPL3+

Synthenada: Empanada Synthesizer

This salty synth uses Vegemite spread as the conductor, and is perfect for Pi Day!

BeginnerFull instructions provided30 minutes1,756

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Pie
×1
Vegemite
×1
Toothpicks
×7

Story

Read more

Code

CPX Code

JavaScript
See tutorial for uploading instructions! Could use a bit of cleaning up... Based on Adafruit's Touch Tone Synth project: https://learn.adafruit.com/touch-tone-for-circuit-playground-express/software
input.pinA6.onEvent(ButtonEvent.Down, function () {
    light.setAll(0x00ffff)
    music.ringTone(294)
})
input.buttonA.onEvent(ButtonEvent.Click, function () {
    control.runInParallel(function () {
        for (let i = 0; i < 4; i++) {
            music.playTone(262, music.beat(BeatFraction.Eighth))
            music.rest(music.beat(BeatFraction.Eighth))
            music.playTone(330, music.beat(BeatFraction.Eighth))
            music.rest(music.beat(BeatFraction.Eighth))
            music.playTone(392, music.beat(BeatFraction.Eighth))
            music.rest(music.beat(BeatFraction.Eighth))
        }
    })
    light.showAnimation(light.sparkleAnimation, 700)
})
input.onSwitchMoved(SwitchDirection.Left, function () {
    music.setVolume(50)
})
input.pinA3.onEvent(ButtonEvent.Down, function () {
    light.setAll(0xffff00)
    music.ringTone(392)
})
input.onSwitchMoved(SwitchDirection.Right, function () {
    music.setVolume(90)
})
input.pinA3.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA7.onEvent(ButtonEvent.Down, function () {
    light.setAll(0x0000ff)
    music.ringTone(262)
})
input.pinA5.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA1.onEvent(ButtonEvent.Down, function () {
    light.setAll(0xff0000)
    music.ringTone(494)
})
input.pinA5.onEvent(ButtonEvent.Down, function () {
    light.setAll(0x7f00ff)
    music.ringTone(330)
})
input.pinA6.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA4.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA2.onEvent(ButtonEvent.Down, function () {
    light.setAll(0xff8000)
    music.ringTone(440)
})
input.pinA1.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA4.onEvent(ButtonEvent.Down, function () {
    light.setAll(0x00ff00)
    music.ringTone(349)
})
input.pinA7.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})
input.pinA2.onEvent(ButtonEvent.Up, function () {
    light.setAll(0x000000)
    music.rest(music.beat(BeatFraction.Sixteenth))
})

circuitplayground-EmpanadaSynth.uf2

JavaScript
The flashable octave-synth file: just save onto the CPX from your computer!
No preview (download only).

Credits

Alex Glow

Alex Glow

145 projects • 1568 followers
The Hackster team's resident Hardware Nerd. I love robots, music, EEG, wearables, and languages. FIRST Robotics kid.

Comments