Skip to content

Commit 418803b

Browse files
committed
Updated device loopback device name and added new icon
1 parent 6d089b3 commit 418803b

File tree

5 files changed

+44
-6
lines changed

5 files changed

+44
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ And since this is experimental, please use it at your own risk and prepare to do
3838

3939
## Setup
4040

41-
- First create a midi loopback device. You can do this easily with LoopMidi on Windows or using "Audio MIDI Setup / MIDI Studio" on Mac. Then set your DAW to use this device instead of the linnstrument. Make sure the virtual device you set up has "loopmidi" in its device name, since this is how its detected by the program.
41+
- First create a midi loopback device. You can do this easily with LoopMidi on Windows or using "Audio MIDI Setup / MIDI Studio" on Mac. Then set your DAW to use this device instead of the linnstrument. Make sure the virtual device you set up has "midimech" in its device name, since this is how its detected by the program.
4242

4343
- Set your LinnStrument to use ChPerRow mode. (Or alternatively, see the section *MPE* for getting the full MPE mode working).
4444

icon.ico

-24.6 KB
Binary file not shown.

icon.png

3.67 KB
Loading

midimech.py

+42-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Options:
122122
show_lowest_note: bool = False
123123
no_overlap: bool = False
124124
hardware_split: bool = False
125-
midi_out: str = "loopmidi"
125+
midi_out: str = "midimech"
126126
split_out: str = "split"
127127
fps: int = 60
128128
split: bool = False
@@ -817,7 +817,8 @@ def __init__(self):
817817
self.keys[pygame.K_RSHIFT] = 47 + i
818818

819819
# self.panel = CHORD_ANALYZER
820-
self.menu_sz = 32 # 64
820+
self.panel_sz = 32 # 64
821+
self.menu_sz = 32 #96 # full
821822
self.max_width = 25 # MAX WIDTH OF LINNSTRUMENT
822823
self.board_h = 8
823824
self.scale = vec2(64.0)
@@ -873,14 +874,15 @@ def __init__(self):
873874
# self.root.protocol("WM_DELETE_WINDOW", self.quit)
874875
pygame.init()
875876
pygame.display.set_caption(TITLE)
877+
pygame.display.set_icon(pygame.image.load('icon.png'))
876878
# if FOCUS:
877879
# pygame.mouse.set_visible(0)
878880
# pygame.event.set_grab(True)
879881
self.screen = Screen(
880882
self, pygame.display.set_mode(self.screen_sz, pygame.DOUBLEBUF)
881883
)
882884

883-
bs = ivec2(self.button_sz, self.menu_sz) # // 2
885+
bs = ivec2(self.button_sz, self.panel_sz) # // 2 double panel
884886
self.gui = pygame_gui.UIManager(self.screen_sz)
885887
y = 0
886888
self.btn_octave_down = pygame_gui.elements.UIButton(
@@ -922,6 +924,42 @@ def __init__(self):
922924
manager=self.gui,
923925
)
924926

927+
# ---
928+
929+
# y = bs.y
930+
# end_pos = 0
931+
# inc = bs.x * 1.5
932+
# self.btn_mode_prev = pygame_gui.elements.UIButton(
933+
# relative_rect=pygame.Rect((2, y), (inc, bs.y)),
934+
# text="< MODE",
935+
# manager=self.gui
936+
# )
937+
# self.btn_mode_next = pygame_gui.elements.UIButton(
938+
# relative_rect=pygame.Rect((inc, y), (inc, bs.y)),
939+
# text="MODE >",
940+
# manager=self.gui
941+
# )
942+
# self.btn_scale_prev = pygame_gui.elements.UIButton(
943+
# relative_rect=pygame.Rect((inc*2, y), (inc, bs.y)),
944+
# text="< SCALE",
945+
# manager=self.gui
946+
# )
947+
# self.btn_scale_prev = pygame_gui.elements.UIButton(
948+
# relative_rect=pygame.Rect((inc*3, y), (inc, bs.y)),
949+
# text="SCALE >",
950+
# manager=self.gui
951+
# )
952+
953+
# y = bs.y * 2
954+
# self.note_buttons = [None] * 12
955+
# for n in range(12):
956+
# end_pos = n*2*bs.x//3 + 2*bs.x//3
957+
# self.note_buttons[n] = pygame_gui.elements.UIButton(
958+
# relative_rect=pygame.Rect((2+n*2*bs.x//3, y), (2*bs.x//3, bs.y)),
959+
# text=NOTES[n],
960+
# manager=self.gui
961+
# )
962+
925963
# self.slider_label = pygame_gui.elements.UILabel(
926964
# relative_rect=pygame.Rect((0,y+bs.y),(bs.x*2,bs.y)),
927965
# text='Velocity Curve',
@@ -947,7 +985,7 @@ def __init__(self):
947985
# out_devs = [
948986
# 'linnstrument',
949987
# self.options.midi_out,
950-
# 'loopmidi'
988+
# 'midimech'
951989
# ]
952990
# for i in range(pygame.midi.get_count()):
953991
# info = pygame.midi.get_device_info(i)

settings.ini.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ max_velocity=127
77
show_lowest_note=false
88
no_overlap=false
99
hardware_split=false
10-
midi_out=loopmidi
10+
midi_out=midimech
1111
split_out=split
1212
fps=60
1313
split=false

0 commit comments

Comments
 (0)