def spank_me_play_question(self): t1 = utils.new_percussion_track() t1.note(8, 71) t2 = utils.new_track() t2.notelen_time(4) t2.note(4, mpd.notename_to_int(self.m_question) + self.m_octave * 12) soundcard.synth.play_track(t1, t2)
def entry_changed(self, widget, value): self.set_int(self.m_name, value + soundcard.first_percussion_int_value) self.set_label(soundcard.percussion_names[value]) t = utils.new_percussion_track() t.note(8, value + soundcard.first_percussion_int_value) t.note(16, value + soundcard.first_percussion_int_value) t.note(16, value + soundcard.first_percussion_int_value) t.note(4, value + soundcard.first_percussion_int_value) soundcard.synth.play_track(t)