-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdefault.py
More file actions
20 lines (16 loc) · 628 Bytes
/
Copy pathdefault.py
File metadata and controls
20 lines (16 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This is the default program that comes on the Big Honking Button.
# It makes a honk sound when the button is pressed (or the gate
# is triggered) and you can change the honk sound's pitch using
# the CV input.
import winterbloom_bhb
bhb = winterbloom_bhb.BigHonkingButton()
sample = bhb.load_sample("samples/honk.wav")
while bhb.update():
if bhb.triggered:
bhb.gate_out = True
bhb.play(sample, pitch_cv=bhb.pitch_in)
if bhb.released:
bhb.gate_out = False
# Uncomment the call to stop to make the sample
# stop playing as soon as you release the button.
# bhb.stop()