Last active
June 28, 2023 02:07
-
-
Save todbot/53bfa7333ac7c1fcff8eaf0f547556ff to your computer and use it in GitHub Desktop.
Got a Pico and two pots? Now you got a drone synth. In CircuitPython of course
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# synthio_two_knob_drone_synth.py -- Got a Pico and two pots? Now you got a drone synth | |
# 5 Jun 2023 - @todbot / Tod Kurt | |
# video demo: https://www.youtube.com/watch?v=KsSRaKjhmHg | |
import time, random, board, analogio, audiopwmio, synthio | |
knob1 = analogio.AnalogIn(board.GP26) | |
knob2 = analogio.AnalogIn(board.GP27) | |
audio = audiopwmio.PWMAudioOut(board.GP10) | |
synth = synthio.Synthesizer(sample_rate=22050) | |
audio.play(synth) | |
note1 = synthio.Note(frequency=100) | |
note2 = synthio.Note(frequency=200) | |
synth.press((note1,note2)) | |
while True: | |
note1.frequency = synthio.midi_to_hz( knob1.value / 512 ) | |
note2.frequency = synthio.midi_to_hz( knob2.value / 512 ) |
Can you share the design - such as it is :-) - of that low-pass filter? Looks so much simpler than the RP2040 reference design. I can't quite make out the cap and resistor's values in the video.
Sure!, It's 100n & 1k. It's super janky as it doesn't remove the DC offset (but most all line ins have that too so it's usually not a problem)
But also, I'm slowly coalescing all these gists into a single repo, with wiring diagrams: https://github.com/todbot/circuitpython-synthio-tricks/tree/main/examples
Thank you! I kinda remembered seeing that somewhere in your stuff, so my apologies for not remembering where that was. But then I’ve gotten so much good info from your various projects… :-]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
video demo:
synthio_two_voice_drone_synth.mp4