Files
maikandClaude Opus 4.8 a7c93fa266 Erster Commit: nativer Linux-Port aus macOS-Bytecode
Läuft die Voice Acoustic VA-Remotecontrol (AllDSP AllControl) nativ unter Linux
auf echtem wxGTK 3.0 — ohne Wine und ohne dekompilierten App-Code. Ausgeführt wird
das unveränderte Python-2.7-Bytecode aus dem macOS-.app; C-Extensions (wxGTK/numpy/
scipy/PortAudio) kommen nativ aus Debian stretch.

Enthält: va/ (Original-.pyc + pure-Python-Libs + Assets + launch.py mit den drei
Linux-Fixes), Dockerfile/run.sh/entrypoint.sh, reference/ (dekompilierter Quellcode
zum Debuggen) und README/STATUS. img.cache (378 MB, regenerierbar) ist per
.gitignore ausgeschlossen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-20 19:57:01 +02:00

943 lines
42 KiB
Python

# uncompyle6 version 3.9.3
# Python bytecode version base 2.6 (62161)
# Decompiled from: Python 3.9.25 (main, Oct 31 2025, 23:16:49)
# [GCC 14.2.0]
# Embedded file name: user_config_vu.pyc
# Compiled at: 2024-11-13 09:37:24
import wx, os, data_model, traceback, one_unit, ConfigParser, protocol, sys, select_keys, select_units, d_protocol, mytime, string
from user_config_helpers import *
from user_config_leds import *
vuLedFunctions = {0: 'Signal',
1: '-6 dB',
2: 'Limit',
3: 'Peak Level',
4: 'Peak Limit',
5: 'Mute',
6: '-12 dB',
7: '-18 dB',
8: '-24 dB',
9: '-30 dB',
10: '-3 dB',
11: '+3 dB',
12: '+6 dB',
13: 'AES/EBU Signal',
14: 'AES/EBU -6dB',
15: 'AES/EBU Peak',
16: 'AES/EBU CLIP',
17: '0 dB',
18: 'AES/EBU -12 dB',
19: 'AES/EBU -24 dB',
20: 'AES/EBU 0 dB',
21: 'User 1',
22: 'User 2',
23: 'User 3',
24: 'User 4',
25: 'User 5',
26: 'User 6',
27: 'User 7',
28: 'User 8',
29: 'User 9',
30: 'User 10',
31: 'User 11'}
class vuMeterLeds(wx.Panel):
def __init__(self, parent, frame, uiNumber, panelName, mainVuPanel):
self.frame = frame
self.name = panelName
self.mainVuPanel = mainVuPanel
self.ledIndex = uiNumber
uiNumber = 187
self.uiNumber = uiNumber
self.page = uiNumber
self.parent = parent
wx.Panel.__init__(self, parent, size=(964, 500))
self.lines = {}
self.initFinished = False
self.Show(True)
return
def initMe(self, force=False):
if self.IsShown() == False and force == False:
return
if self.initFinished == True:
return 0
print mytime.displayTime(), 'ucv.initMe vuMeterLeds', self.name
frame = self.frame
uiNumber = self.uiNumber
self.struct_id_choices = ['Selected']
for strID in (3, 4, 5, 7, 8):
self.struct_id_choices.append(protocol.get_strid_text(strID))
self.member_id_choices = [
'Selected']
for membID in (0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15, 24, 27):
self.member_id_choices.append(protocol.get_member_text(membID))
self.channels = {127: 'All Inputs', 255: 'All Outputs'}
for c in self.frame.frame.parent.unit_channels:
if c < 128:
s = 'Input ' + str(c + 1)
else:
s = 'Output ' + str(c - 127)
self.channels[c] = s
self.strFunction = wx.StaticText(self, -1, 'Function', pos=(80, 20))
self.strItem = wx.StaticText(self, -1, 'Process', pos=(220, 20))
self.strSubItem = wx.StaticText(self, -1, 'Parameter', pos=(330, 20))
self.strIndex = wx.StaticText(self, -1, 'Index', pos=(550, 20))
self.strComparison = wx.StaticText(self, -1, 'Comparison', pos=(600, 20))
self.strBlnkWhenChanged = wx.StaticText(self, -1, 'BwC HdS', pos=(820, 20))
self.uiKeys = getKeys(frame, uiNumber, self.ledIndex)
i = 0
self.factoryItems = 0
for uiIndex in self.uiKeys:
(key, val) = self.uiKeys[uiIndex]
print mytime.displayTime(), 'ucl.key:', key, val
if key.channel != 1 or key.index < 128:
continue
self.createLine(i)
self.lines[i].key = key
self.lines[i].checkBox.Enable(False)
self.lines[i].checkBox.SetLabel('Factory')
self.lines[i].struct_id_choice.Enable(False)
self.lines[i].member_id_choice.Enable(False)
self.lines[i].index_choice.Enable(False)
self.lines[i].keyComparisonChoice.Enable(False)
self.lines[i].checkBox.SetValue(True)
try:
self.lines[i].struct_id_choice.SetStringSelection(protocol.get_strid_text(val[1] & 15))
except:
pass
try:
self.lines[i].member_id_choice.SetStringSelection(protocol.get_member_text(0))
except:
pass
channel = val[3]
if channel == 255:
channel = 'All Outputs'
elif channel == 127:
channel = 'All Inputs'
elif channel < 128:
channel = 'Input ' + str(channel + 1)
else:
channel = 'Output ' + str(channel - 128 + 1)
self.lines[i].channel_choice.SetStringSelection(channel)
self.lines[i].index_choice.SetStringSelection(str((val[6] >> 4 & 15) + 1))
ledFunction = val[4]
self.lines[i].ledFunctionChoice.SetStringSelection(ledFunctions[ledFunction])
self.lines[i].keyComparisonChoice.SetStringSelection(keyComparisonOptions[val[6] & 15])
if ledFunction in (ledFunctionSignal, ledFunctionGainReduction, ledFunctionAutoIndicatePeakInput):
self.lines[i].value.SetValue(str(val[5] - 128) + 'dBu')
else:
self.lines[i].value.SetValue(str(val[5]))
self.enable(i)
self.lines[i].channel_choice.Enable(False)
self.lines[i].ledFunctionChoice.Enable(False)
self.lines[i].struct_id_choice.Enable(False)
self.lines[i].member_id_choice.Enable(False)
self.lines[i].index_choice.Enable(False)
self.lines[i].keyComparisonChoice.Enable(False)
self.lines[i].value.Enable(False)
i += 1
self.factoryItems += 1
for uiIndex in self.uiKeys:
(key, val) = self.uiKeys[uiIndex]
if key.channel == 1 and key.index >= 128:
continue
self.createLine(i)
self.lines[i].key = key
self.lines[i].checkBox.SetValue(True)
try:
self.lines[i].struct_id_choice.SetStringSelection(protocol.get_strid_text(val[1] & 15))
except:
pass
try:
self.lines[i].member_id_choice.SetStringSelection(protocol.get_member_text(0))
except:
pass
channel = val[3]
if channel == 255:
channel = 'All Outputs'
elif channel == 127:
channel = 'All Inputs'
elif channel < 128:
channel = 'Input ' + str(channel + 1)
else:
channel = 'Output ' + str(channel - 128 + 1)
self.lines[i].channel_choice.SetStringSelection(channel)
self.lines[i].index_choice.SetStringSelection(str((val[6] >> 4 & 15) + 1))
ledFunction = val[4]
self.lines[i].ledFunctionChoice.SetStringSelection(ledFunctions[ledFunction])
self.lines[i].keyComparisonChoice.SetStringSelection(keyComparisonOptions[val[6] & 15])
if ledFunction == ledFunctionSignal:
self.lines[i].value.SetValue(str(val[5] - 128) + 'dBu')
elif ledFunction in (ledFunctionGainReduction, ledFunctionAutoIndicatePeakInput):
self.lines[i].value.SetValue(str(val[5] - 128) + 'dB')
else:
self.lines[i].value.SetValue(str(val[5]))
if val[7] & 2 == 2:
self.lines[i].blinkBox.SetValue(1)
if val[7] & 1 == 1:
self.lines[i].standbyBox.SetValue(1)
self.enable(i)
i += 1
if i - self.factoryItems < 8:
self.createLine(i)
print mytime.displayTime() + ' Created tab for', self.name
self.Show(True)
self.initFinished = True
return
def createLine(self, i):
p = wx.Panel(self, size=(964, 28))
p.Show(False)
p.checkBox = wx.CheckBox(p, 10 + i, ' User', pos=(10, 2), size=(70, 20))
p.keyComparisonChoice = wx.Choice(p, 80 + i, choices=keyComparisonOptions.values(), style=wx.BORDER_NONE, pos=(600,
0), size=(160,
26))
p.keyComparisonChoice.SetStringSelection(keyComparisonOptions.values()[0])
p.ledFunctionChoice = wx.Choice(p, 30 + i, choices=ledFunctions.values(), style=wx.BORDER_NONE, pos=(80,
0), size=(130,
26))
p.ledFunctionChoice.SetStringSelection(ledFunctions.values()[0])
p.struct_id_choice = wx.Choice(p, 40 + i, choices=self.struct_id_choices, style=wx.BORDER_NONE, pos=(220,
0), size=(100,
26))
p.struct_id_choice.SetStringSelection(self.struct_id_choices[0])
p.member_id_choice = wx.Choice(p, 50 + i, choices=self.member_id_choices, style=wx.BORDER_NONE, pos=(330,
0), size=(100,
26))
p.member_id_choice.SetStringSelection(self.member_id_choices[0])
p.channel_choice = wx.Choice(p, 60 + i, choices=self.channels.values(), style=wx.BORDER_NONE, pos=(440,
0), size=(100,
26))
p.channel_choice.SetStringSelection(self.channels.values()[0])
p.index_choice = wx.Choice(p, 70 + i, choices=[_[1] for j in range(10)], style=wx.BORDER_NONE, pos=(550,
0), size=(40,
26))
p.index_choice.SetStringSelection('1')
p.value = wx.TextCtrl(p, 20 + i, '', pos=(770, 1), size=(40, 20))
p.value.Show(False)
p.additionalLabel = wx.StaticText(p, -1, '', pos=(220, 5))
p.additionalLabel.Show(False)
p.blinkBox = wx.CheckBox(p, 80 + i, '', pos=(830, 2), size=(20, 20))
p.standbyBox = wx.CheckBox(p, 80 + i, '', pos=(860, 2), size=(20, 20))
p.SetPosition((0, 40 + 28 * i))
p.checkBox.SetValue(0)
p.checkBox.Enable(True)
p.key = None
self.Bind(wx.EVT_CHECKBOX, self.OnEnabled, id=10 + i)
self.Bind(wx.EVT_CHOICE, self.OnStructId, id=40 + i)
self.Bind(wx.EVT_CHOICE, self.OnChangeledFunction, id=30 + i)
self.lines[i] = p
self.enable(i)
p.Show(True)
return
def enable(self, i):
val = self.lines[i].checkBox.GetValue()
self.showChoices(i, self.getledFunction(self.lines[i]), val)
return
def showChoices(self, i, ledFunctionInt, enabled):
self.lines[i].ledFunctionChoice.Enable(enabled)
try:
ledFunctionFields = ledSelectOptions[ledFunctionInt]
except:
ledFunctionFields = None
self.lines[i].struct_id_choice.Show(False)
self.lines[i].member_id_choice.Show(False)
self.lines[i].channel_choice.Show(False)
self.lines[i].index_choice.Show(False)
self.lines[i].keyComparisonChoice.Show(enabled)
self.lines[i].struct_id_choice.Enable(enabled)
self.lines[i].member_id_choice.Enable(enabled)
self.lines[i].index_choice.Enable(enabled)
self.lines[i].keyComparisonChoice.Show(enabled)
self.lines[i].value.Show(False)
if ledFunctionFields.find('s') >= 0:
self.lines[i].struct_id_choice.Show(True)
if self.lines[i].struct_id_choice.GetStringSelection() not in ('Selected',
'All'):
if ledFunctionFields.find('m') >= 0:
self.lines[i].member_id_choice.Show(True)
if ledFunctionFields.find('i') >= 0:
self.lines[i].index_choice.Show(True)
elif ledFunctionFields.find('m') >= 0:
self.lines[i].member_id_choice.Show(True)
if ledFunctionFields.find('i') >= 0:
self.lines[i].index_choice.Show(True)
if ledFunctionFields.find('v') >= 0:
self.lines[i].value.Show(True)
if ledFunctionFields == 'sm':
self.lines[i].struct_id_choice.Show(True)
self.lines[i].member_id_choice.Show(True)
if ledAdditionalText[ledFunctionInt] == '':
self.lines[i].additionalLabel.Show(False)
else:
self.lines[i].additionalLabel.SetLabel(ledAdditionalText[ledFunctionInt])
self.lines[i].additionalLabel.Show(True)
return
def OnEnabled(self, e):
i = e.GetId() - 10
if self.mainVuPanel.countLedFunctionKeys() > 32:
print mytime.displayTime(), 'Maximum number of VU LED functions bereikt'
self.lines[i].checkBox.SetValue(False)
return
self.enable(i)
if i == len(self.lines) - 1 and self.lines[i].checkBox.GetValue() == True and i < 7 + self.factoryItems:
self.createLine(i + 1)
return
def OnChangeledFunction(self, e):
i = e.GetId() - 30
self.showChoices(i, self.getledFunction(self.lines[i]), 1)
print mytime.displayTime() + ' on change key function', self.lines[i].ledFunctionChoice.GetStringSelection()
return
def OnStructId(self, e):
print mytime.displayTime() + ' OnStructid'
i = e.GetId() - 40
self.showChoices(i, self.getledFunction(self.lines[i]), True)
return
def getledFunction(self, line):
fName = line.ledFunctionChoice.GetStringSelection()
for k in ledFunctions.keys():
if ledFunctions[k] == fName:
return k
return
def getKeyComparison(self, line):
fName = line.keyComparisonChoice.GetStringSelection()
for k in keyComparisonOptions.keys():
if keyComparisonOptions[k] == fName:
return k
return
def stripValue(self, v):
for s in data_model.validFilenameChars + data_model.forbiddenFilenameChars:
if s in string.digits:
continue
if s in ('-', '.'):
continue
if s == ',':
v = v.replace(s, '.')
continue
v = v.replace(s, '')
try:
return float(v)
except:
traceback.print_exc(file=sys.stdout)
return v
return
def evaluateLine(self, line):
if line.checkBox.GetValue() == False:
return
else:
ledFunction = self.getledFunction(line)
channel = line.channel_choice.GetStringSelection()
if channel == 'All Inputs':
channel = 127
elif channel == 'All Outputs':
channel = 255
elif channel.find('Input ') >= 0:
channel = int(channel.replace('Input ', '')) - 1
elif channel.find('Output ') >= 0:
channel = int(channel.replace('Output ', '')) - 1 + 128
keyComparison = self.getKeyComparison(line)
if ledFunction in (ledFunctionSignal, ledFunctionGainReduction, ledFunctionAutoIndicatePeakInput):
strID = 0
if self.name.find('Analog') >= 0:
strID = 1
if self.name.find('AES/EBU') >= 0:
strID = 2
if self.name.find('Dante') >= 0:
strID = 3
index = ledFunction
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 120:
value = 120
if value < -120:
value = -120
value += 128
except:
traceback.print_exc(file=sys.stdout)
value = 0
elif ledFunction == ledFunctionPresetNumber:
strID = 0
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
elif ledFunction == ledFunctionStandby:
strID = 0
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
elif ledFunction == ledFunctionWink:
strID = 0
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
elif ledFunction == ledFunctionPresetChanged:
strID = 0
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
elif ledFunction == ledFunctionShowValue:
strID = protocol.get_strid_by_text(line.struct_id_choice.GetStringSelection())
index = int(line.index_choice.GetStringSelection()) - 1
keyComparison |= index << 4
flags = 0
try:
value = int(self.stripValue(line.value.GetValue()))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
else:
strID = 0
channel = 0
flags = 0
try:
value = int(line.value.GetValue().replace('dBu', ''))
if value > 250:
value = 250
except:
traceback.print_exc(file=sys.stdout)
value = 1
if line.standbyBox.GetValue() == 1:
flags |= 1
if line.blinkBox.GetValue() == 1:
flags |= 2
try:
sendString = '' + chr(self.uiNumber)
sendString += chr(strID)
sendString += chr(self.ledIndex)
sendString += chr(channel)
sendString += chr(ledFunction)
sendString += chr(value)
sendString += chr(keyComparison)
sendString += chr(flags)
mys = 'String: '
for c in sendString:
mys += hex(ord(c)) + ':'
print mys
return sendString
except:
print mytime.displayTime(), 'ucv.fpk.eL.failed to build string'
traceback.print_exc(file=sys.stdout)
return
return
def countLedFunctionKeys(self):
if self.initFinished == False:
return 0
else:
self.numberOfLedFunctionKeys = 0
lines = 0
for line in self.lines.values():
if line.checkBox.GetValue() == True:
lines += 1
if lines == self.factoryItems:
print self.name, self.factoryItems, 'factory keys'
return self.factoryItems
print self.name, lines - self.factoryItems, 'user keys'
return lines - self.factoryItems
return
class vuMeter(wx.Panel):
def __init__(self, parent, frame, uiNumber, panelName, mainVuPanel):
self.frame = frame
self.name = panelName
self.uiNumber = uiNumber
self.mainVuPanel = mainVuPanel
self.parent = parent
wx.Panel.__init__(self, parent, size=(964, 260))
self.lines = {}
self.Show(True)
self.initFinished = False
return
def initMe(self, force=False):
if self.IsShown() == False and force == False:
return
else:
if self.initFinished == True:
return 0
print mytime.displayTime(), 'ucv.initMe vuMeter', self.name
frame = self.frame
uiNumber = self.uiNumber
if os.name in mac_names:
y = 5
else:
y = 12
self.headerLabel = wx.StaticText(self, -1, 'Select the LED function for each LED in the VU meter:', pos=(10,
11))
self.uiKeys = getKeys(frame, 188, None, uiNumber)
print self.uiKeys
self.channels = {127: 'All Inputs', 255: 'All Outputs'}
for c in self.frame.frame.parent.unit_channels:
if c < 128:
s = 'Input ' + str(c + 1)
else:
s = 'Output ' + str(c - 127)
self.channels[c] = s
self.ledChannelList = self.channels
self.createLine(0)
self.createLine(1)
self.lines[0].val = [1, 1, 1, 1, 1, 1, 1, 1]
self.lines[1].val = [1, 1, 1, 1, 1, 1, 1, 1]
for uiIndex in self.uiKeys:
(key, val) = self.uiKeys[uiIndex]
if key.channel != 1 or key.index < 128:
continue
self.lines[0].val = val
self.lines[0].key = key
self.setChannelChoices(0)
self.setLedFunctions(0)
if self.lines[1].key == None:
self.lines[1].val = val
self.setChannelChoices(1)
self.setLedFunctions(1)
for uiIndex in self.uiKeys:
(key, val) = self.uiKeys[uiIndex]
if key.channel == 1 and key.index >= 128:
continue
self.lines[1].checkBox.SetValue(True)
self.lines[1].val = val
self.lines[1].key = key
self.enable(1)
self.setChannelChoices(1)
self.setLedFunctions(1)
self.uiIndex = self.uiNumber
self.uiNumber = 188
self.Show(True)
self.initFinished = True
return
def setLedFunctions(self, lineNumber):
val = self.lines[lineNumber].val
ledFunctions = {}
ledFunctions[0] = val[2] & 31
ledFunctions[1] = (val[2] & 224) >> 5 | (val[4] & 3) << 3
ledFunctions[2] = (val[4] & 124) >> 2
ledFunctions[3] = (val[4] & 128) >> 7 | (val[5] & 15) << 1
ledFunctions[4] = (val[5] & 240) >> 4 | (val[6] & 1) << 4
ledFunctions[5] = (val[6] & 62) >> 1
ledFunctions[6] = (val[6] & 192) >> 6 | (val[7] & 7) << 2
ledFunctions[7] = (val[7] & 248) >> 3
self.lines[lineNumber].ledFunctionEen.SetStringSelection(vuLedFunctions[ledFunctions[0]])
self.lines[lineNumber].ledFunctionTwee.SetStringSelection(vuLedFunctions[ledFunctions[1]])
self.lines[lineNumber].ledFunctionDrie.SetStringSelection(vuLedFunctions[ledFunctions[2]])
self.lines[lineNumber].ledFunctionVier.SetStringSelection(vuLedFunctions[ledFunctions[3]])
self.lines[lineNumber].ledFunctionVijf.SetStringSelection(vuLedFunctions[ledFunctions[4]])
self.lines[lineNumber].ledFunctionZes.SetStringSelection(vuLedFunctions[ledFunctions[5]])
self.lines[lineNumber].ledFunctionZeven.SetStringSelection(vuLedFunctions[ledFunctions[6]])
self.lines[lineNumber].ledFunctionAcht.SetStringSelection(vuLedFunctions[ledFunctions[7]])
return
def setChannelChoices(self, lineNumber):
val = self.lines[lineNumber].val
channel = val[3]
if channel not in self.ledChannelList:
return
if channel == 255:
channelString = 'All Outputs'
elif channel == 127:
channelString = 'All Inputs'
elif channel < 128:
channelString = 'Input ' + str(channel + 1)
else:
channelString = 'Output ' + str(channel - 128 + 1)
structID = val[1]
if structID & 128 == 128:
print mytime.displayTime(), 'ucv.Increase channel from led four!'
self.increaseChannelFromLedFour = True
else:
self.increaseChannelFromLedFour = False
self.lines[lineNumber].ledChannelEen.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelTwee.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelDrie.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelVier.SetStringSelection(channelString)
if channel not in (127, 255) and channel + 1 in self.ledChannelList and lineNumber == 1:
self.lines[lineNumber].ledChannelVijf.Destroy()
choices = [self.ledChannelList[channel], self.ledChannelList[channel + 1]]
self.lines[lineNumber].ledChannelVijf = wx.Choice(self.lines[1], 51, choices=sorted(choices), style=wx.BORDER_NONE, pos=(10,
150), size=(100,
26))
self.lines[lineNumber].ledChannelVijf.Enable(self.lines[lineNumber].checkBox.GetValue())
elif lineNumber == 1:
self.lines[lineNumber].ledChannelVijf.Destroy()
self.lines[lineNumber].ledChannelVijf = wx.Choice(self.lines[1], 51, choices=sorted(self.ledChannelList.values()), style=wx.BORDER_NONE, pos=(10,
150), size=(100,
26))
self.lines[lineNumber].ledChannelVijf.Enable(False)
if self.increaseChannelFromLedFour == True and channel not in (127, 255) and channel + 1 in self.ledChannelList:
channel += 1
if channel < 128:
channelString = 'Input ' + str(channel + 1)
else:
channelString = 'Output ' + str(channel - 128 + 1)
self.lines[lineNumber].ledChannelVijf.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelZes.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelZeven.SetStringSelection(channelString)
self.lines[lineNumber].ledChannelAcht.SetStringSelection(channelString)
return
def createLine(self, i):
if os.name in mac_names:
y = 3
else:
y = 4
if i == 0:
x = 80
else:
x = 10
p = wx.Panel(self, size=(450, 260))
p.Show(False)
p.checkBox = wx.CheckBox(p, 10 + i, ' Uncheck to remove', pos=(10, 0), size=(150,
20))
p.SetPosition((10 + 450 * i, 10))
ledChannels = sorted(self.ledChannelList.values())
ledFunctions = sorted(vuLedFunctions.values())
print mytime.displayTime(), 'ucVU.vM.cL.1c', ledFunctions
p.ledChannelEen = wx.Choice(p, 20 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 30), size=(100,
26))
p.ledChannelTwee = wx.Choice(p, 50 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 60), size=(100,
26))
p.ledChannelDrie = wx.Choice(p, 30 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 90), size=(100,
26))
p.ledChannelVier = wx.Choice(p, 40 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 120), size=(100,
26))
p.ledChannelVijf = wx.Choice(p, 50 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 150), size=(100,
26))
p.ledChannelZes = wx.Choice(p, 60 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 180), size=(100,
26))
p.ledChannelZeven = wx.Choice(p, 70 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 210), size=(100,
26))
p.ledChannelAcht = wx.Choice(p, 80 + i, choices=ledChannels, style=wx.BORDER_NONE, pos=(x, 240), size=(100,
26))
p.ledFunctionEen = wx.Choice(p, 20 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 30), size=(150,
26))
p.ledFunctionTwee = wx.Choice(p, 50 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 60), size=(150,
26))
p.ledFunctionDrie = wx.Choice(p, 30 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 90), size=(150,
26))
p.ledFunctionVier = wx.Choice(p, 40 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 120), size=(150,
26))
p.ledFunctionVijf = wx.Choice(p, 50 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 150), size=(150,
26))
p.ledFunctionZes = wx.Choice(p, 60 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 180), size=(150,
26))
p.ledFunctionZeven = wx.Choice(p, 70 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 210), size=(150,
26))
p.ledFunctionAcht = wx.Choice(p, 80 + i, choices=ledFunctions, style=wx.BORDER_NONE, pos=(110 + x, 240), size=(150,
26))
p.checkBox.SetValue(0)
p.checkBox.Enable(True)
if i == 0:
p.checkBox.SetValue(1)
p.checkBox.Show(False)
channelString = 'Led nr '
p.inputGainSourceLabel = wx.StaticText(p, -1, 'LED 1', pos=(0, 30 + y))
p.inputGainSourceLabel2 = wx.StaticText(p, -1, 'LED 2', pos=(0, 60 + y))
p.inputDSPSourceLabel = wx.StaticText(p, -1, 'LED 3', pos=(0, 90 + y))
p.inputDelaySourceLabel = wx.StaticText(p, -1, 'LED 4', pos=(0, 120 + y))
p.inputRoutingOutputSourceLabel = wx.StaticText(p, -1, 'LED 5', pos=(0, 150 + y))
p.inputRoutingOutputSourceLabel2 = wx.StaticText(p, -1, 'LED 6', pos=(0, 180 + y))
p.inputRoutingOutputSourceLabel2 = wx.StaticText(p, -1, 'LED 7', pos=(0, 210 + y))
p.inputRoutingOutputSourceLabel2 = wx.StaticText(p, -1, 'LED 8', pos=(0, 240 + y))
p.key = None
p.lineNumber = i
self.Bind(wx.EVT_CHECKBOX, self.OnEnabled, id=10 + i)
self.Bind(wx.EVT_CHOICE, self.OnSelectChannelEen, id=20 + i)
self.Bind(wx.EVT_CHOICE, self.OnSelectChannelTwee, id=50 + i)
self.lines[i] = p
self.enable(i)
if i:
p.Show(True)
else:
p.Show(False)
return
def OnSelectChannelEen(self, e):
i = e.GetId() - 20
if i == 0:
return
channelString = self.lines[i].ledChannelEen.GetStringSelection()
if channelString == 'All Inputs':
channel = 127
elif channelString == 'All Outputs':
channel = 255
elif channelString.find('Output') >= 0:
channel = int(channelString.replace('Output', '').strip()) + 127
elif channelString.find('Input') >= 0:
channel = int(channelString.replace('Input', '').strip()) - 1
self.lines[1].val[3] = channel
self.setChannelChoices(1)
return
def OnSelectChannelTwee(self, e):
i = e.GetId() - 50
if i == 0:
return
channelString = self.lines[i].ledChannelVijf.GetStringSelection()
channelString2 = self.lines[i].ledChannelEen.GetStringSelection()
if channelString == channelString2:
self.lines[1].val[1] &= 127
else:
self.lines[1].val[1] |= 128
self.setChannelChoices(1)
return
def enable(self, i):
val = self.lines[i].checkBox.GetValue()
if i == 0:
val = False
self.lines[i].ledFunctionEen.Enable(val)
self.lines[i].ledFunctionTwee.Enable(val)
self.lines[i].ledFunctionDrie.Enable(val)
self.lines[i].ledFunctionVier.Enable(val)
self.lines[i].ledFunctionVijf.Enable(val)
self.lines[i].ledFunctionZes.Enable(val)
self.lines[i].ledFunctionZeven.Enable(val)
self.lines[i].ledFunctionAcht.Enable(val)
self.lines[i].ledChannelEen.Enable(val)
self.lines[i].ledChannelTwee.Enable(False)
self.lines[i].ledChannelDrie.Enable(False)
self.lines[i].ledChannelVier.Enable(False)
self.lines[i].ledChannelVijf.Enable(False)
self.lines[i].ledChannelZes.Enable(False)
self.lines[i].ledChannelZeven.Enable(False)
self.lines[i].ledChannelAcht.Enable(False)
return
def OnEnabled(self, e):
print mytime.displayTime(), 'uca.OnEnabled'
i = e.GetId() - 10
if i == 0:
return
self.enable(i)
t = self.lines[i]
s = self.lines[0]
t.ledFunctionEen.SetStringSelection(s.ledFunctionEen.GetStringSelection())
t.ledFunctionTwee.SetStringSelection(s.ledFunctionTwee.GetStringSelection())
t.ledFunctionDrie.SetStringSelection(s.ledFunctionDrie.GetStringSelection())
t.ledFunctionVier.SetStringSelection(s.ledFunctionVier.GetStringSelection())
t.ledFunctionVijf.SetStringSelection(s.ledFunctionVijf.GetStringSelection())
t.ledFunctionZes.SetStringSelection(s.ledFunctionZes.GetStringSelection())
return
def getSourceKey(self, str):
for key in vuLedFunctions:
if vuLedFunctions[key] == str:
print mytime.displayTime(), 'uca.found key for', str, '->', key
return key
print mytime.displayTime(), 'uca.did not find key for', str, '-> None'
return 0
def evaluateLine(self, line):
if line.lineNumber == 0:
return
else:
if self.lines[1].checkBox.GetValue() == False:
return
ledFunctions = {}
ledFunctions[0] = self.getSourceKey(line.ledFunctionEen.GetStringSelection())
ledFunctions[1] = self.getSourceKey(line.ledFunctionTwee.GetStringSelection())
ledFunctions[2] = self.getSourceKey(line.ledFunctionDrie.GetStringSelection())
ledFunctions[3] = self.getSourceKey(line.ledFunctionVier.GetStringSelection())
ledFunctions[4] = self.getSourceKey(line.ledFunctionVijf.GetStringSelection())
ledFunctions[5] = self.getSourceKey(line.ledFunctionZes.GetStringSelection())
ledFunctions[6] = self.getSourceKey(line.ledFunctionZeven.GetStringSelection())
ledFunctions[7] = self.getSourceKey(line.ledFunctionAcht.GetStringSelection())
ledValue = {}
ledValue[0] = ledFunctions[0] | (ledFunctions[1] & 7) << 5
ledValue[1] = (ledFunctions[1] & 24) >> 3 | (ledFunctions[2] & 31) << 2 | (ledFunctions[3] & 1) << 7
ledValue[2] = (ledFunctions[3] & 30) >> 1 | (ledFunctions[4] & 15) << 4
ledValue[3] = (ledFunctions[4] & 16) >> 4 | (ledFunctions[5] & 31) << 1 | (ledFunctions[6] & 3) << 6
ledValue[4] = (ledFunctions[6] & 28) >> 2 | (ledFunctions[7] & 31) << 3
structID = self.uiIndex
channelString = line.ledChannelVijf.GetStringSelection()
channelString2 = line.ledChannelEen.GetStringSelection()
if channelString != channelString2:
structID |= 128
channel = line.val[3]
try:
sendString = '' + chr(self.uiNumber)
sendString += chr(structID)
sendString += chr(ledValue[0])
sendString += chr(channel)
sendString += chr(ledValue[1])
sendString += chr(ledValue[2])
sendString += chr(ledValue[3])
sendString += chr(ledValue[4])
mys = 'String: '
for c in sendString:
mys += hex(ord(c)) + ':'
print mytime.displayTime(), 'Built string for VU meter:', mys[:-1]
return sendString
except:
print mytime.displayTime(), 'uca.ar.eL.failed to build string'
traceback.print_exc(file=sys.stdout)
return
return
class vuMeterSelectPanel(wx.Panel):
def __init__(self, parent, frame, uiNumber, panelName):
wx.Panel.__init__(self, parent, size=(964, 500))
self.parent = parent
self.frame = frame
self.name = panelName
self.p = wx.Panel(self)
self.p.SetSize((924, 500))
self.p.SetPosition((0, 0))
self.nb = wx.Choicebook(self.p, -1, pos=(0, 0))
self.nb.Bind(wx.EVT_CHOICEBOOK_PAGE_CHANGED, self.onTabChange)
self.nb.SetSize((914, 300))
self.subPanels = {}
self.numberOfActiveVUMeters = 0
self.sortedListOfPanels = []
if self.name == 'VU LED functions':
for name in sorted(vuLedFunctions.values()):
for i in range(32):
if vuLedFunctions[i] == name:
self.sortedListOfPanels.append(i)
panelName = vuLedFunctions[i]
self.subPanels[i] = vuMeterLeds(self.nb, frame, i, panelName, self)
self.nb.AddPage(self.subPanels[i], panelName)
self.countLedFunctionKeys()
else:
invVuMeters = {}
for k in self.frame.frame.vuMeters:
invVuMeters[self.frame.frame.vuMeters[k]] = k
for vuMeterName in sorted(self.frame.frame.vuMeters.values()):
i = invVuMeters[vuMeterName]
uiKeys = getKeys(frame, 188, None, i)
if len(uiKeys) == 0:
continue
self.sortedListOfPanels.append(i)
self.numberOfActiveVUMeters += 1
self.subPanels[i] = vuMeter(self.nb, frame, i, vuMeterName, self)
self.nb.AddPage(self.subPanels[i], vuMeterName)
self.add = wx.Button(self.p, 5, 'Add', pos=(800, 330), size=(70, 20))
self.Bind(wx.EVT_BUTTON, self.OnAdd, id=5)
self.nb.Layout()
self.initFinished = False
self.Show(True)
return
def initMe(self, force=False):
if self.IsShown() == False and force == False:
return
if self.initFinished == True:
return 0
print mytime.displayTime(), 'ucv.initMe vuMeterSelectPanel'
for i in self.sortedListOfPanels:
p = self.subPanels[i]
p.initMe(force)
force = False
self.initFinished = True
return
def OnAdd(self, e):
i = self.numberOfActiveVUMeters
self.subPanels[i] = vuMeter(self.nb, self.frame, i, self.frame.frame.vuMeters[i], self)
self.nb.AddPage(self.subPanels[i], self.frame.frame.vuMeters[i])
self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.onTabChange)
self.numberOfActiveVUMeters += 1
self.nb.ChangeSelection(i)
self.subPanels[i].initMe(True)
return
def countLedFunctionKeys(self):
self.numberOfLedFunctionKeys = 0
for subPanel in self.subPanels.values():
self.numberOfLedFunctionKeys += subPanel.countLedFunctionKeys()
print mytime.displayTime(), 'number of led function keys:', self.numberOfLedFunctionKeys
return self.numberOfLedFunctionKeys
def onTabChange(self, e):
print mytime.displayTime(), 'uc.cp.OnTabChange', self.name
pageNumber = e.Selection
page = self.nb.GetPage(pageNumber)
force = True
try:
page.initMe(force)
force = False
except:
traceback.print_exc(file=sys.stdout)
e.Skip()
return
def evaluateLine(self, line):
return self.ledFunctionPanel.evaluateLine
# okay decompiling pycode/user_config_vu.pyc