Compare commits

...

5 Commits

Author SHA1 Message Date
Onyx and Iris
66baab1a7a set dual_stream key according to bus enum 2026-01-12 17:27:02 +00:00
Onyx and Iris
0218579ba8 upd bus enum 2026-01-12 17:26:36 +00:00
Onyx and Iris
775455e618 upd bus labels 2026-01-12 15:27:48 +00:00
Onyx and Iris
ebe9af8e56 update outputs for inputs 2026-01-12 15:24:07 +00:00
Onyx and Iris
530fa2ff34 implement gain staging configurations 2026-01-12 15:23:33 +00:00
5 changed files with 63 additions and 42 deletions

View File

@ -39,8 +39,8 @@ label = "Onyx Pc"
A1 = false A1 = false
A2 = false A2 = false
A3 = false A3 = false
A4 = false A4 = true
A5 = true A5 = false
B1 = false B1 = false
B2 = false B2 = false
B3 = false B3 = false
@ -57,8 +57,8 @@ label = "Iris Pc"
A1 = false A1 = false
A2 = false A2 = false
A3 = false A3 = false
A4 = false A4 = true
A5 = true A5 = false
B1 = false B1 = false
B2 = false B2 = false
B3 = false B3 = false
@ -90,8 +90,8 @@ gate.knob = 0
[strip-5] [strip-5]
label = "System" label = "System"
A1 = false A1 = true
A2 = true A2 = false
A3 = false A3 = false
A4 = false A4 = false
A5 = false A5 = false
@ -107,8 +107,8 @@ limit = 0
[strip-6] [strip-6]
label = "Comms" label = "Comms"
A1 = false A1 = false
A2 = false A2 = true
A3 = true A3 = false
A4 = false A4 = false
A5 = false A5 = false
B1 = false B1 = false
@ -125,8 +125,8 @@ k = 0
label = "Pretzel" label = "Pretzel"
A1 = false A1 = false
A2 = false A2 = false
A3 = false A3 = true
A4 = true A4 = false
A5 = false A5 = false
B1 = false B1 = false
B2 = false B2 = false
@ -138,14 +138,6 @@ gain = 0.0
limit = 0 limit = 0
[bus-0] [bus-0]
label = "MR18"
mono = false
eq.on = false
mute = false
gain = 0.0
mode = "normal"
[bus-1]
label = "System" label = "System"
mono = false mono = false
eq.on = false eq.on = false
@ -153,7 +145,7 @@ mute = false
gain = 0.0 gain = 0.0
mode = "normal" mode = "normal"
[bus-2] [bus-1]
label = "Comms" label = "Comms"
mono = false mono = false
eq.on = false eq.on = false
@ -161,7 +153,7 @@ mute = false
gain = 0.0 gain = 0.0
mode = "normal" mode = "normal"
[bus-3] [bus-2]
label = "Pretzel" label = "Pretzel"
mono = false mono = false
eq.on = false eq.on = false
@ -169,7 +161,7 @@ mute = false
gain = 0.0 gain = 0.0
mode = "normal" mode = "normal"
[bus-4] [bus-3]
label = "GAME PCs" label = "GAME PCs"
mono = false mono = false
eq.on = false eq.on = false
@ -177,6 +169,14 @@ mute = false
gain = 0.0 gain = 0.0
mode = "normal" mode = "normal"
[bus-4]
label = ""
mono = false
eq.on = false
mute = false
gain = 0.0
mode = "normal"
[bus-5] [bus-5]
label = "Onyx Mic" label = "Onyx Mic"
mono = false mono = false

View File

@ -15,9 +15,6 @@ logger = logging.getLogger(__name__)
class Audio(ILayer): class Audio(ILayer):
"""Audio concrete class""" """Audio concrete class"""
DCM8_MAX_GAIN = 20 # SE Electronics DCM8 max gain
TLM102_MAX_GAIN = 30 # Neumann TLM102 max gain
def __init__(self, duckypad, **kwargs): def __init__(self, duckypad, **kwargs):
super().__init__(duckypad) super().__init__(duckypad)
for attr, val in kwargs.items(): for attr, val in kwargs.items():
@ -186,37 +183,51 @@ class Audio(ILayer):
@ensure_mixer_fadeout @ensure_mixer_fadeout
def stage_onyx_mic(self): def stage_onyx_mic(self):
"""Gain stage SE Electronics DCM8 with phantom power""" """Gain stage onyx mic"""
self.mixer.headamp[XAirStrips.onyx_mic].phantom = True config = configuration.mic('onyx')
for i in range(Audio.DCM8_MAX_GAIN + 1):
self.mixer.headamp[XAirStrips.onyx_mic].phantom = config['phantom']
for i in range(config['gain'] + 1):
self.mixer.headamp[XAirStrips.onyx_mic].gain = i self.mixer.headamp[XAirStrips.onyx_mic].gain = i
time.sleep(0.1) time.sleep(0.1)
self.logger.info('Onyx Mic Staged with Phantom Power') self.logger.info('Onyx Mic Staged with Phantom Power')
@ensure_mixer_fadeout @ensure_mixer_fadeout
def stage_iris_mic(self): def stage_iris_mic(self):
"""Gain stage TLM102 with phantom power""" """Gain stage iris mic"""
self.mixer.headamp[XAirStrips.iris_mic].phantom = True config = configuration.mic('iris')
for i in range(Audio.TLM102_MAX_GAIN + 1):
self.mixer.headamp[XAirStrips.iris_mic].phantom = config['phantom']
for i in range(config['gain'] + 1):
self.mixer.headamp[XAirStrips.iris_mic].gain = i self.mixer.headamp[XAirStrips.iris_mic].gain = i
time.sleep(0.1) time.sleep(0.1)
self.logger.info('Iris Mic Staged with Phantom Power') self.logger.info('Iris Mic Staged with Phantom Power')
def unstage_onyx_mic(self): def unstage_onyx_mic(self):
"""Unstage SE Electronics DCM8 and disable phantom power""" """Unstage onyx mic, if phantom power was enabled, disable it"""
for i in reversed(range(Audio.DCM8_MAX_GAIN + 1)): config = configuration.mic('onyx')
for i in reversed(range(config['gain'] + 1)):
self.mixer.headamp[XAirStrips.onyx_mic].gain = i self.mixer.headamp[XAirStrips.onyx_mic].gain = i
time.sleep(0.1) time.sleep(0.1)
self.mixer.headamp[XAirStrips.onyx_mic].phantom = False if config['phantom']:
self.logger.info('Onyx Mic Unstaged and Phantom Power Disabled') self.mixer.headamp[XAirStrips.onyx_mic].phantom = False
self.logger.info('Onyx Mic Unstaged and Phantom Power Disabled')
else:
self.logger.info('Onyx Mic Unstaged')
def unstage_iris_mic(self): def unstage_iris_mic(self):
"""Unstage TLM102 and disable phantom power""" """Unstage iris mic, if phantom power was enabled, disable it"""
for i in reversed(range(Audio.TLM102_MAX_GAIN + 1)): config = configuration.mic('iris')
for i in reversed(range(config['gain'] + 1)):
self.mixer.headamp[XAirStrips.iris_mic].gain = i self.mixer.headamp[XAirStrips.iris_mic].gain = i
time.sleep(0.1) time.sleep(0.1)
self.mixer.headamp[XAirStrips.iris_mic].phantom = False if config['phantom']:
self.logger.info('Iris Mic Unstaged and Phantom Power Disabled') self.mixer.headamp[XAirStrips.iris_mic].phantom = False
self.logger.info('Iris Mic Unstaged and Phantom Power Disabled')
else:
self.logger.info('Iris Mic Unstaged')
def patch_onyx(self): def patch_onyx(self):
self.state.patch_onyx = not self.state.patch_onyx self.state.patch_onyx = not self.state.patch_onyx

View File

@ -18,3 +18,14 @@ with open(configpath, 'rb') as f:
def get(name): def get(name):
if name in configuration: if name in configuration:
return configuration[name] return configuration[name]
def mic(name):
assert 'microphones' in configuration, 'No microphones defined in configuration'
try:
mic_key = configuration['microphones'][name]
mic_cfg = configuration['microphone'][mic_key]
return mic_cfg
except KeyError as e:
raise KeyError(f'Microphone configuration for "{name}" not found') from e

View File

@ -6,7 +6,7 @@ Buttons = IntEnum(
# Voicemeeter Channels # Voicemeeter Channels
VMStrips = IntEnum('Strips', 'onyx_mic iris_mic onyx_pc iris_pc st_input_5 system comms pretzel', start=0) VMStrips = IntEnum('Strips', 'onyx_mic iris_mic onyx_pc iris_pc st_input_5 system comms pretzel', start=0)
VMBuses = IntEnum('Buses', 'system comms pretzel game_pcs onyx_mic iris_mic both_mics', start=1) VMBuses = IntEnum('Buses', 'system comms pretzel game_pcs output_5 onyx_mic iris_mic both_mics', start=0)
# VBAN Channels # VBAN Channels
VBANChannels = IntEnum('VBANChannels', 'onyx_mic iris_mic comms workstation', start=0) VBANChannels = IntEnum('VBANChannels', 'onyx_mic iris_mic comms workstation', start=0)

View File

@ -1,6 +1,6 @@
import logging import logging
from .enums import VMStrips from .enums import VMBuses, VMStrips
from .layer import ILayer from .layer import ILayer
from .states import SceneState from .states import SceneState
@ -40,8 +40,7 @@ class Scene(ILayer):
def dual_stream(self): def dual_stream(self):
ENABLE_PC = { ENABLE_PC = {
'mute': False, 'mute': False,
'A5': True, f'A{VMBuses.game_pcs + 1}': True, # Voicemeeter A output is 1-indexed
'gain': 0,
} }
self.vm.strip[VMStrips.onyx_pc].apply(ENABLE_PC) self.vm.strip[VMStrips.onyx_pc].apply(ENABLE_PC)
self.vm.strip[VMStrips.iris_pc].apply(ENABLE_PC) self.vm.strip[VMStrips.iris_pc].apply(ENABLE_PC)