Godtone (talk | contribs)
Godtone (talk | contribs)
Line 1,157: Line 1,157:
rb30 = rb29[:6] + [126] + rb29[6:] # insert 126 between 61 and 62
rb30 = rb29[:6] + [126] + rb29[6:] # insert 126 between 61 and 62
rb31 = rb30[:4] + [9] + rb30[4:] # insert 9 between 84 and 96
rb31 = rb30[:4] + [9] + rb30[4:] # insert 9 between 84 and 96
rb36 = [120, 5, 60, 84, 96, 61, 126, 62, 99, 97, 13, 74, 98, 85, 75, 17, 122, 21, 25, 29, 33, 37, 78, 41, 79, 45, 80, 69, 49, 81, 94, 53, 82, 95, 57, 58]
# 29 colours is a fairly ideal rainbow; we use it for indexing into, so as to derive a 17-colour palette.
# 29 colours is a fairly ideal rainbow; we use it for indexing into, so as to derive a 17-colour palette.
# note that i chose the +0.4 experimentally based on the colour palette that seemed most distinct to me.
# note that i chose the +0.4 experimentally based on the colour palette that seemed most distinct to me.
rb17v2 = [ rb29[round( k/17*29+0.4 )%29] for k in range(17) ]
rb17v2 = [ rb29[round( k/17*29+0.4 )%29] for k in range(17) ]
rb19 = [ rb29[round( k/19*29+0.4 )%29] for k in range(19) ]
rb19 = [ rb29[round( k/19*29+0.4 )%29] for k in range(19) ]
colmaps = { 12: rb12, 13: rb13, 16: cm16, 17: rb17, 18: rb18, 19: rb19, 29: rb29, 30: rb30, 31: rb31 }
colmaps = { 12: rb12, 13: rb13, 16: cm16, 17: rb17, 18: rb18, 19: rb19, 29: rb29, 30: rb30, 31: rb31, 36: rb36 }
# TODO: add more colmaps
# TODO: add more colmaps
import platform # to check whether we're running Windows, in which case we want to use loopMIDI
import platform # to check whether we're running Windows, in which case we want to use loopMIDI