Skip to content

Commit

Permalink
Fix missing drum samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Oct 16, 2018
1 parent b8ee4e8 commit ec5db83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/simple-piano.py
Expand Up @@ -66,7 +66,9 @@ def load_samples(patch):


def handle_note(channel, pressed):
channel = channel + (12 * octave) + NOTE_OFFSET
channel = channel + (12 * octave)
if len(samples) > 13:
channel += NOTE_OFFSET
if channel < len(samples) and pressed:
print('Playing Sound: {}'.format(files[channel]))
samples[channel].play(loops=0)
Expand Down

0 comments on commit ec5db83

Please sign in to comment.