def volume_reset(direction): sequencer.interpret_command("volume_reset")
def volume_change(direction): if direction == 1: sequencer.interpret_command("volume_up") else: sequencer.interpret_command("volume_down")
def bpm_change(direction): if direction == 1: sequencer.interpret_command("bpm_up") else: sequencer.interpret_command("bpm_down")
def bpm_reset(direction): sequencer.interpret_command("bpm_reset")
while True: # control bluetooth input with commandline #print("INFO - You can type some keywords to control the sequencer via cmd.") #print("'play' - starts/pauses sequencer, 'reset' - to delete saved sequence for current channel") #print("'show' - displays current configuration, 'metro' - toggles metronome on/off") #print("'beat_reset', 'beat_up' & 'beat_down'") #print("'bpm_reset', 'bpm_up', 'bpm_down'") #print("'volume_reset', 'volume_up', 'volume_down'") #command = input() #if '#' in command or '%' in command: # queue.put(str(command, 'utf-8')) #else: # sequencer_loop.interpret_command(command) play_button = GPIO.input(play_gpio) reset_button = GPIO.input(reset_gpio) record_button = GPIO.input(record_gpio) metro_button = GPIO.input(metro_gpio) if not play_button: sequencer.interpret_command("play") time.sleep(0.2) if not reset_button: sequencer.interpret_command("reset") time.sleep(0.2) if not record_button: sequencer.interpret_command("record") time.sleep(0.2) if not metro_button: sequencer.interpret_command("metro") time.sleep(0.2)