from Pyper import * celesta = Instrument(9) cello = Instrument(43) beat = 0 def bang(): global beat note = 62 if beat % 16: if beat % 5 < 3: note += 4 if beat % 7 in (1, 4): note -= 2 if beat % 32 >= 16: note += 5 if beat % 64 >= 32: note += 2 if not beat % 16: cello.play(note-12, 70, 120) if (beat % 16) % 7 != 4: celesta.play(note, 80, 10) beat += 1