Skip to content

Commit ca67696

Browse files
committed
new default colors, hardware split fixes
1 parent 987d416 commit ca67696

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

src/core.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def note_on(self, data, timestamp, width=None, curve=True, mpe=None, force_chann
571571
if note:
572572
if note.location is None:
573573
note.location = ivec2(0)
574-
note.location.x = col
574+
note.location.x = col_full
575575
note.location.y = row
576576
note.pressure = vel
577577
note.midinote = data[1]
@@ -870,6 +870,7 @@ def cb_midi_in(self, data, timestamp, force_channel=None):
870870
note.y_bend = 0.0
871871
data[1], data[2] = compose_pitch_bend(note.bend + note.y_bend / pb_range)
872872

873+
873874
if skip:
874875
pass
875876
elif msg == 11 and data[1] == 64: # sustain pedal
@@ -879,13 +880,23 @@ def cb_midi_in(self, data, timestamp, force_channel=None):
879880
else:
880881
self.midi_write(self.midi_out, data, timestamp)
881882
elif self.is_split(): # everything else (if split)...
882-
note = self.notes[ch]
883+
# print('ch', ch)
884+
try:
885+
note = self.notes[ch]
886+
except:
887+
note = None
883888
if ch == 0:
884889
self.midi_write(self.midi_out, data, timestamp)
885890
self.midi_write(self.split_out, data, timestamp)
886-
elif note.location is not None:
887-
col = self.notes[ch].location.x
888-
row = self.notes[ch].location.y
891+
# else:
892+
# split_chan = 1 if ch >= 8 else 0
893+
# if split_chan:
894+
# self.midi_write(self.split_out, data, timestamp)
895+
# else:
896+
# self.midi_write(self.midi_out, data, timestamp)
897+
elif note and note.location is not None:
898+
col = note.location.x
899+
row = note.location.y
889900
split_chan = self.channel_from_split(col, row)
890901
if split_chan:
891902
self.midi_write(self.split_out, data, timestamp)
@@ -1659,13 +1670,14 @@ def setup_rpn(self, on=True):
16591670
def split_rpn(self, on=True):
16601671
"""Sets up RPN for hardware split (used on LinnStrument 200)"""
16611672
if self.options.hardware_split:
1662-
self.rpn(200, 1 if on else 0)
1673+
self.rpn(200, 1 if on else 0) # split active
16631674

1675+
# lights
16641676
self.send_cc(0, 20, 0)
16651677
self.send_cc(0, 21, 1)
16661678
self.send_cc(0, 22, 7 if on else 0)
16671679
else:
1668-
self.rpn(200, 7)
1680+
self.rpn(200, 0)
16691681

16701682
def rpn(self, num, value):
16711683
if not self.linn_out:

src/options.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ class Options:
66
# lights: str = "4,7,3,7,3,3,7,3,7,3,7,3"
77

88
# LinnStrument light numbers
9-
lights: str = "4,7,3,7,3,3,7,3,7,3,7,3"
9+
# lights: str = "4,7,3,7,3,3,7,3,7,3,7,3"
10+
lights: str = "1,9,9,2,2,3,3,5,8,8,11,11"
1011
# Same as above, for split
1112
split_lights: str = "4,7,5,7,5,5,7,5,7,5,7,5"
1213

@@ -17,7 +18,9 @@ class Options:
1718
mark_color: str = "red"
1819

1920
# Color scheme using webcolors
20-
colors: str = "cyan,green,green,green,green,green,green,green,green,green,green,green"
21+
# colors: str = "cyan,green,green,green,green,green,green,green,green,green,green,green"
22+
# split_colors: str = "cyan,blue,blue,blue,blue,blue,blue,blue,blue,blue,blue,blue"
23+
colors: str = "red,darkred,orange,goldenrod,yellow,green,darkolivegreen,blue,darkslateblue,indigo,darkorchid,pink"
2124
split_colors: str = "cyan,blue,blue,blue,blue,blue,blue,blue,blue,blue,blue,blue"
2225

2326
# MPE Settings

0 commit comments

Comments
 (0)