def Unbind_all(): lp_events.unbind_all() # Unbind all events text = [["" for y in range(9)] for x in range(9)] # Reienitialise all scripts to blank kill_all() # stop everything running files.curr_layout = None # There is no current layout files.layout_changed_since_load = False # So mark it as unchanged
def set_as_mode(): global is_active lp_events.mode = "SCALEEDIT" lp_events.unbind_all() bind_grid() bind_function_keys() lp_colors.update() is_active = True lp_instrument.is_active = False print("[LPMM] SCALE EDIT MODE")
def set_as_mode(unbind = True): global is_active lp_events.mode = "INSTRUMENT" if unbind: lp_events.unbind_all() bind_grid() bind_function_keys() lp_colors.update() is_active = True lp_scaleedit.is_active = False print("[LPMM] INSTRUMENT MODE")
def unbind_all(): global threads global text global to_run lp_events.unbind_all() text = [["" for y in range(9)] for x in range(9)] to_run = [] for x in range(9): for y in range(9): if threads[x][y] != None: if threads[x][y].isAlive(): threads[x][y].kill.set()
def octave_set(oct_in, rebind=True): global octave octave = oct_in octave_clip() if rebind: bind_grid() lp_scaleedit.update_active() if lp_events.mode == "SCALEEDIT": lp_events.unbind_all(False) lp_scaleedit.bind_grid() lp_scaleedit.bind_function_keys() lp_colors.update() print("[LPMM] OCTAVE SET, NOW " + str(octave))
def octave_down(rebind=True): global octave octave -= 1 octave_clip() if(rebind): bind_grid() lp_scaleedit.update_active() if lp_events.mode == "SCALEEDIT": lp_events.unbind_all(False) lp_scaleedit.bind_grid() lp_scaleedit.bind_function_keys() lp_colors.update() print("[LPMM] OCTAVE DOWN, NOW " + str(octave))
def unbind_all(): global threads global text global to_run lp_events.unbind_all() text = [["" for y in range(9)] for x in range(9)] to_run = [] for x in range(9): for y in range(9): if threads[x][y] != None: if threads[x][y].isAlive(): threads[x][y].kill.set() files.curr_layout = None files.layout_changed_since_load = False
def scale_set(scale_in, rebind=True, print_mesg=True): global scale scale = globals()["SCALE_" + scale_in] #haha doing this just so I can print the name of the scale... and now it takes a string like the other funcs octave_clip() if rebind: bind_grid() lp_scaleedit.update_active() if lp_events.mode == "SCALEEDIT": lp_events.unbind_all(False) lp_scaleedit.bind_grid() lp_scaleedit.bind_function_keys() lp_colors.update() if print_mesg: print("[LPMM] SCALE SET, NOW " + str(scale_in))
def mode_set(mode_in, rebind=True): global mode global octave mode = mode_in octave_clip() if rebind: bind_grid() lp_scaleedit.update_active() if lp_events.mode == "SCALEEDIT": lp_events.unbind_all(False) lp_scaleedit.bind_grid() lp_scaleedit.bind_function_keys() lp_colors.update() print("[LPMM] MODE SET, NOW " + mode)
def key_set(key_in, rebind=True, print_mesg=True): global key key = key_in octave_clip() if rebind: bind_grid() lp_scaleedit.update_active() if lp_events.mode == "SCALEEDIT": lp_events.unbind_all(False) lp_scaleedit.bind_grid() lp_scaleedit.bind_function_keys() lp_colors.update() if print_mesg: print("[LPMM] KEY SET, NOW " + key)