Godtone
Joined 17 December 2020
m →Novation Launchpad Pro MK3 isomorphic keyboard code: missing space |
→Novation Launchpad Pro MK3 isomorphic keyboard code: make default output as .scl file when the implied range of notes is too big |
||
| Line 1,440: | Line 1,440: | ||
# these are for if you want or need to keep the colour mapping distinct from the midi notes EG in large EDO subsets | # these are for if you want or need to keep the colour mapping distinct from the midi notes EG in large EDO subsets | ||
large = args.get('large') or max(x*9+y*8,x*8+y*9) > 127 or False | large = args.get('large') or max(x*9+y*8,x*8+y*9) > 127 or False | ||
coverage = | coverage = 10 # for now probably don't mess with the coverage parameter | ||
if large: | if large: | ||
print('WARNING: the midi note range of your layout is too large, so x=1, y='+str(coverage)+'=c=coverage is being used.') | print('WARNING: the midi note range of your layout is too large, so x=1, y='+str(coverage)+'=c=coverage is being used.') | ||
| Line 1,446: | Line 1,446: | ||
print('IMPORTANTLY: the below is a scale of',edo,'EDO corresponding to your chosen layout.') | print('IMPORTANTLY: the below is a scale of',edo,'EDO corresponding to your chosen layout.') | ||
print('IMPORTANTLY: the base note for frequency MUST be midi note 0 so that the notes are placed correctly!') | print('IMPORTANTLY: the base note for frequency MUST be midi note 0 so that the notes are placed correctly!') | ||
print('the .scl file follows:') | |||
print('x='+str(x)+'\\'+str(edo)+', y='+str(y)+'\\'+str(edo)+' launchpad mapping') | |||
print(coverage*(coverage+1)-1) # account for half buttons potentially being used as distinct notes in the future | |||
for j in range(coverage): | for j in range(coverage): | ||
for i in range(coverage): | for i in range(coverage): | ||
if j!=0 or i!=0: | if j!=0 or i!=0: # equiv. if (i,j) != (0,0) (i think) | ||
print( str(i*x + j*y)+'\\'+str(edo) ) | print( int(.5 + 1000 * (i*x + j*y)/edo*1200)/1000 ) | ||
# print( str(i*x + j*y)+'\\'+str(edo) ) | |||
print() | print() | ||
# for the launchpad pro MK3 specifically: | # for the launchpad pro MK3 specifically: | ||