Skip to content
Snippets Groups Projects
Commit 0d28a282 authored by moon2's avatar moon2 :speech_balloon:
Browse files

audio issue: some weird intermodulation going on here on both p1 and p4...

audio issue: some weird intermodulation going on here on both p1 and p4 badges. need to investigate.
parent bb0ea0c7
No related branches found
No related tags found
No related merge requests found
from synth import tinysynth
from hardware import *
synths = []
notes = [2,5,9,12,16]
drums = [1800,4000,6000,12000,16000]
def run():
global synths
for i in range(10):
if(get_captouch(i)):
if(synths[i][0] == 0):
synths[i][0] = 1
synths[i][1].start()
else:
if(synths[i][0] == 1):
synths[i][0] = 0
synths[i][1].stop()
def init():
global synths
global notes
for i in range(10):
synth = tinysynth(440,0)
synth.attack(1)
if i % 2:
synth.tone(notes[int(i/2)])
synth.waveform(4)
else:
synth.waveform(8)
synth.decay(3)
synth.freq(drums[int(i/2)])
if i == 8:
synth.freq(16000)
synth.decay(50)
synths += [[0, synth]]
def foreground():
display_scope_start()
...@@ -5,10 +5,11 @@ import harmonic_demo ...@@ -5,10 +5,11 @@ import harmonic_demo
import melodic_demo import melodic_demo
import demo_worms import demo_worms
import cap_touch_demo import cap_touch_demo
import drums_and_notes
MODULES = [ MODULES = [
harmonic_demo, harmonic_demo,
melodic_demo, drums_and_notes,
demo_worms, demo_worms,
cap_touch_demo, cap_touch_demo,
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment