Godtone (talk | contribs)
Isomorphic keyboard code for launchpads with programmer mode: ADD APPROXIMATE 6-BIT RGB (2 bits per channel) USING TUPLE INDEXING (R,G,B) in [0,1,2,3]; also add two functions based on it (rb and gencolcube)
Godtone (talk | contribs)
Line 1,606: Line 1,606:
(3,2,1): 108, (2,3,1): 75, (1,3,2): 28, (1,2,3): 92, (2,1,3): 81, (3,1,2): 82 # "pastel"/deeply nontrivial
(3,2,1): 108, (2,3,1): 75, (1,3,2): 28, (1,2,3): 92, (2,1,3): 81, (3,1,2): 82 # "pastel"/deeply nontrivial
}
}
# for the 7-limit JI scale the zil24 colouring is intended to be used with see: https://en.xen.wiki/w/User:Zastari#Zil_.282.3.5.7.29
zil24 = [colcube[( int(s[0]), int(s[1]), int(s[2]) )] for s in '333 020 101 032 213 000 221 002 333 023 100 031 212 003 323 000 331 022 203 033 110 001 322 003'.split()]
# FOR INFO ON THE 24-NOTE COLOURING FOR Zil[24] READ BELOW:
# the coordinates are based on interpreting every note of zil in terms of three families:
# * Duodene*: [6] (R=3), [7] (R=2), [12] (R=1)
# * (bi)hexatonic Zil**: [6] (G=3), [12] (G=2), [15] (G=1)
# * Tas: [9] (B=3), [14] (B=2), [19] (B=1)
# with the following notes:
# * for Duodene, we are merging two scale families that conclude at Duodene[12] into one;
#  we pick Augmented Duodene[6] for the 6-note version and Zarlino Duodene[7] for the 7-note version
#  which works well because the latter is a strict superset of the former with the exception of only one difference:
#  25/16 in Augmented and 27/16 in Zarlino
# ** for (bi)hexatonic Zil, both the 6- and 12-note forms are bihexatonic but the 15-note one is not.
#    the "bi-" means that the same scale is generated using two different traversals of the primes (3,5,7).


# for use with iso(1,8), iso(1,4), iso(8,1), iso(4,1) specifically so that each 4x4 area corresponds to a slice of the 4x4x4 cube
# for use with iso(1,8), iso(1,4), iso(8,1), iso(4,1) specifically so that each 4x4 area corresponds to a slice of the 4x4x4 cube
Line 1,620: Line 1,635:
global rgb
global rgb
return [rgb[coord] for coord in [(h,l,l), (h,m,l), (h,h,l), (m,h,l), (l,h,l), (l,h,m), (l,h,h), (l,m,h), (l,l,h), (m,l,h), (h,l,h), (h,l,m)]]
return [rgb[coord] for coord in [(h,l,l), (h,m,l), (h,h,l), (m,h,l), (l,h,l), (l,h,m), (l,h,h), (l,m,h), (l,l,h), (m,l,h), (h,l,h), (h,l,m)]]