momentary osc 1.0 added - lock preset default on start up
This commit is contained in:
@@ -101,7 +101,7 @@ midi_in_port = None
|
||||
fader_show_hide_config = False
|
||||
transport_show_hide_config = False
|
||||
toggle_show_hide_config = False
|
||||
preset_switch_locked = False
|
||||
preset_switch_locked = True
|
||||
|
||||
uuid_presets_matched = []
|
||||
uuid_presets_received_values = []
|
||||
@@ -167,7 +167,7 @@ buttonImport.clicked.connect(lambda: import_preset())
|
||||
|
||||
checkbox_lock_preset = QCheckBox("Lock Preset")
|
||||
checkbox_lock_preset.setStyleSheet("color: #aaa; font-size: 11px;")
|
||||
checkbox_lock_preset.setChecked(False)
|
||||
checkbox_lock_preset.setChecked(True)
|
||||
def on_lock_preset_toggled(checked):
|
||||
global preset_switch_locked
|
||||
preset_switch_locked = checked
|
||||
@@ -2163,14 +2163,29 @@ def midi_message_route_hw_to_output_cc(fader_uid, value):
|
||||
return
|
||||
for t in transports:
|
||||
if t.uid == fader_uid:
|
||||
t.cc_input_lbl.setText(f"CC{t.hw_cc} [{value}]")
|
||||
if t.output_mode == "osc":
|
||||
if value > 0:
|
||||
addr = t.osc_addr_edit.text().strip() or "/play"
|
||||
send_osc_message(addr, 1.0)
|
||||
t.cc_output_lbl.setText(f"{addr} [1.0]")
|
||||
t.led_dot.setStyleSheet("background-color: #00e676; border-radius: 3px;")
|
||||
QTimer.singleShot(150, lambda: t.led_dot.setStyleSheet("background-color: #3c3c3c; border-radius: 3px;"))
|
||||
else:
|
||||
out_cc = t.cc_spin.value()
|
||||
if t.trigger_mode == "momentary":
|
||||
if value > 0:
|
||||
send_transport_cc(out_cc, 127)
|
||||
t.cc_output_lbl.setText(f"CC{out_cc} [127]")
|
||||
t.led_dot.setStyleSheet("background-color: #00e676; border-radius: 3px;")
|
||||
QTimer.singleShot(150, lambda: t.led_dot.setStyleSheet("background-color: #3c3c3c; border-radius: 3px;"))
|
||||
else:
|
||||
should_be_on = value > 63
|
||||
if t.toggle_state != should_be_on:
|
||||
t.toggle_state = should_be_on
|
||||
out_val = 127 if should_be_on else 0
|
||||
send_transport_cc(out_cc, out_val)
|
||||
t.cc_input_lbl.setText(f"In CC{t.hw_cc} [{value}]")
|
||||
t.cc_output_lbl.setText(f"Out CC{out_cc} [{out_val}]")
|
||||
t.cc_output_lbl.setText(f"CC{out_cc} [{out_val}]")
|
||||
t._update_btn_style()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user