From 2a7f732410b50b0493637b8839a86012e12aed3b Mon Sep 17 00:00:00 2001 From: Brian Hrebec Date: Sat, 21 Mar 2026 23:48:31 -0500 Subject: [PATCH] Added output option selection --- main.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/main.py b/main.py index 1c094ed..e8c5d90 100644 --- a/main.py +++ b/main.py @@ -702,6 +702,10 @@ class Mixer(App): ('j', 'change_focus(0, 1)'), ('k', 'change_focus(0, -1)'), ('l', 'change_focus(1, 0)'), + ('I', 'change_clock_internal'), + ('O', 'change_clock_optical'), + ('S', 'change_out_spdif'), + ('A', 'change_out_adat'), ] def __init__(self): @@ -730,6 +734,7 @@ class Mixer(App): def compose(self) -> ComposeResult: yield Header() + yield Static('optical', id='info') yield InputChannelRow(channels=range(0, self.INPUTS)) yield PlaybackChannelRow(channels=range(self.INPUTS, self.PLAYBACKS + self.INPUTS)) yield OutputChannelRow(channels=range(0, self.OUTPUTS)) @@ -742,6 +747,22 @@ class Mixer(App): self.current_mix_out = (self.current_mix_out + n) % self.OUTPUTS self.update_mixer_display() + def action_change_clock_internal(self): + self.out_port.send(encode_message(encoding.SUBID_OPTIONS, [0x00010001])) + self.query_one('#info').update('internal') + + def action_change_clock_optical(self): + self.out_port.send(encode_message(encoding.SUBID_OPTIONS, [0x00020001])) + self.query_one('#info').update('optical') + + def action_change_out_spdif(self): + self.out_port.send(encode_message(encoding.SUBID_OPTIONS, [0x04000400])) + self.query_one('#info').update('spdif') + + def action_change_out_adat(self): + self.out_port.send(encode_message(encoding.SUBID_OPTIONS, [0x0400])) + self.query_one('#info').update('adat') + """ Update focused channel. Mix output follows focus. """