From 58bff7c4c71614cd78ab6368e3270d50e0e857d5 Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Fri, 3 Aug 2018 20:47:06 +0100 Subject: [PATCH] fixing audioio.AudioOut which now seems to have only one param --- Introducing_CircuitPlaygroundExpress/Playground_808.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Introducing_CircuitPlaygroundExpress/Playground_808.py b/Introducing_CircuitPlaygroundExpress/Playground_808.py index da25ffb6..cc6d5550 100644 --- a/Introducing_CircuitPlaygroundExpress/Playground_808.py +++ b/Introducing_CircuitPlaygroundExpress/Playground_808.py @@ -27,12 +27,13 @@ audiofiles = ["bd_tek.wav", "elec_hi_snare.wav", "elec_cymbal.wav", "elec_blip2.wav", "bd_zome.wav", "bass_hit_c.wav", "drum_cowbell.wav"] +a = audioio.AudioOut(board.A0) def play_file(filename): print("playing file " + filename) f = open(filename, "rb") - a = audioio.AudioOut(board.A0, f) - a.play() + wave = audioio.WaveFile(f) + a.play(wave) time.sleep(bpm / 960) # sixteenthNote delay