Raymond Boysel
Published

Synth-O-Matic

A microcontroller panel controlled synthesizer.

BeginnerFull instructions provided2 hours223
Synth-O-Matic

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Alligator Clips
Alligator Clips
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Code

Synth Code

JavaScript
input.pinA6.onEvent(ButtonEvent.Down, function () {
    music.playTone(262, music.beat(BeatFraction.Whole))
    light.setAll(0xff0000)
})
input.pinA6.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
input.pinA5.onEvent(ButtonEvent.Down, function () {
    music.playTone(294, music.beat(BeatFraction.Whole))
    light.setAll(0xff8000)
})
input.pinA5.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
input.pinA4.onEvent(ButtonEvent.Down, function () {
    music.playTone(330, music.beat(BeatFraction.Whole))
    light.setAll(0xffff00)
})
input.pinA4.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
input.pinA3.onEvent(ButtonEvent.Down, function () {
    music.playTone(349, music.beat(BeatFraction.Whole))
    light.setAll(0x00ff00)
})
input.pinA3.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
input.pinA2.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
input.pinA2.onEvent(ButtonEvent.Down, function () {
    music.playTone(392, music.beat(BeatFraction.Whole))
    light.setAll(0x0000ff)
})
input.pinA1.onEvent(ButtonEvent.Down, function () {
    music.playTone(440, music.beat(BeatFraction.Whole))
    light.setAll(0x7f00ff)
})
input.pinA1.onEvent(ButtonEvent.Up, function () {
    music.stopAllSounds()
    light.clear()
})
music.setVolume(255)
music.setTempo(120)

Credits

Raymond Boysel
4 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.