示例#1
0
def change_note(position, amount):
    note, channel, cc = seq[position]
    note += amount
    if note >= 0 and note <= 127:
        seq[position][0] = note
        set_grid_disp(display_note(note), position)
        print('change_note @', position, 'amount', amount, 'note', note)
示例#2
0
def set_note_playing(note):
    # mixgrid 34
    mixgrid.pop(34)
    noteval = label.Label(font, text=display_note(note),
                          color=0xff9F00)  #initialize text in each box
    noteval.x = 5
    noteval.y = 119
    mixgrid.insert(34, noteval)
示例#3
0
def display_notes_playing(step):
    notes = ''
    for trk in range(0, MAX_TRACKS - 1):
        notes += display_note(seq[trk][step][0]) + ' '
    mixgrid.pop(34)
    noteval = label.Label(font, text=notes, color=0x00FF00)
    noteval.x = 5
    noteval.y = 108
    mixgrid.insert(34, noteval)
示例#4
0
    else:
        return 16 + 25 * 3


def change_note(position, amount):
    note, channel, cc = seq[position]
    note += amount
    if note >= 0 and note <= 127:
        seq[position][0] = note
        set_grid_disp(display_note(note), position)
        print('change_note @', position, 'amount', amount, 'note', note)


print("playing")

print(display_note(10))
x = 0
seq = [[10, 0, 0], [20, 0, 0], [0, 0, 0], [40, 0, 0], [50, 0, 0], [60, 0, 0],
       [70, 0, 0], [80, 0, 0], [0, 0, 0], [20, 0, 0], [30, 0, 0], [40, 0, 0],
       [50, 0, 0], [60, 0, 0], [70, 0, 0], [80, 0, 0]]
# seq array is [note (0-127), channel(0-15), CC ( 0xffff )  ]
# CC value is where first nybble (ff) is message, second nyble is value
# I may or may not need more values to pass, but this was a good start

for step in range(16):
    # we are setting up an initial sequence in this demo program
    set_grid_disp(display_note(seq[step][0]), step)

disp_bpm(bpm)

print("stopped")
示例#5
0
def update_grid():
    for step in range(16):
        set_grid_disp(display_note(seq[current_track][step][0]), step)