Godtone (talk | contribs)
m →Novation Launchpad Pro MK3 isomorphic keyboard code: (hopefully) fixed highlighting for subsets with periods not equal to a positive integer multiple of len(colmap)
Godtone (talk | contribs)
→Novation Launchpad Pro MK3 isomorphic keyboard code: remove erroneous brackets and circumvent need to duplicate highlight up to more periods by using i%len(highlight) to check if highlighted by highlight
Line 1,286: Line 1,286:
highlight = sorted(list(set(highlight)))
highlight = sorted(list(set(highlight)))
mul = math.lcm(len(colmap),len(highlight))
mul = math.lcm(len(colmap),len(highlight))
colmap = [( colmap*mul )[i%len(colmap)] if i in [[0]+highlight]*mul else 3 for i in range(mul)]
colmap = [( colmap*mul )[i%len(colmap)] if i%len(highlight) in [0]+highlight else 3 for i in range(mul)]
# get arguments with default values
# get arguments with default values
bottomleftnote = args.get('bottomleftnote') or args.get('blnote') or args.get('bl') or args.get('b') or min(x,y)
bottomleftnote = args.get('bottomleftnote') or args.get('blnote') or args.get('bl') or args.get('b') or min(x,y)