Beispiel #1
0
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
Beispiel #2
0
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")
Beispiel #3
0
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")
Beispiel #4
0
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()
Beispiel #5
0
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))
Beispiel #6
0
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))
Beispiel #7
0
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
Beispiel #8
0
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))
Beispiel #9
0
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)
Beispiel #10
0
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)