249 | | ctrl.setChecked(False) |
---|
250 | | |
---|
251 | | for ctrl, info in self.TriggerButtonControls.iteritems(): |
---|
252 | | pass |
---|
253 | | |
---|
254 | | for ctrl, info in self.TextControls.iteritems(): |
---|
255 | | text = self.hw.getText(self.TextControls[ctrl][0]) |
---|
256 | | print "%s text is %s" % (ctrl.name() , text) |
---|
257 | | ctrl.setText(text) |
---|
258 | | |
---|
259 | | self.comboStandalone.clear() |
---|
260 | | for i in range( self.hw.enumCount('/Control/StandaloneConfig') ): |
---|
261 | | self.comboStandalone.insertItem( self.hw.enumGetLabel('/Control/StandaloneConfig', i) ) |
---|
262 | | self.comboStandalone.setCurrentItem( self.hw.enumSelected('/Control/StandaloneConfig') ) |
---|
263 | | |
---|
264 | | def initValues(self): |
---|
265 | | self.updateValues() |
---|
266 | | for ctrl, info in self.VolumeControls.iteritems(): |
---|
267 | | # connect the UI element |
---|
268 | | QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateMatrixVolume) |
---|
269 | | |
---|
270 | | for ctrl, info in self.VolumeControlsLowRes.iteritems(): |
---|
271 | | # connect the UI element |
---|
272 | | QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateLowResVolume) |
---|
273 | | |
---|
274 | | for ctrl, info in self.SelectorControls.iteritems(): |
---|
275 | | # connect the UI element |
---|
276 | | QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) |
---|
277 | | |
---|
278 | | for ctrl, info in self.TriggerButtonControls.iteritems(): |
---|
279 | | # connect the UI element |
---|
280 | | QObject.connect(ctrl,SIGNAL('clicked()'),self.triggerButton) |
---|
281 | | |
---|
282 | | for ctrl, info in self.saveTextControls.iteritems(): |
---|
283 | | # connect the UI element |
---|
284 | | QObject.connect(ctrl,SIGNAL('clicked()'), self.saveText) |
---|
285 | | |
---|
286 | | QObject.connect(self.comboStandalone, SIGNAL('activated(int)'), self.selectStandaloneMode) |
---|
| 213 | self.have_adat = True |
---|
| 214 | print "detected PRO26 at %d, ADAT enabled" % self.samplerate |
---|
| 215 | else: |
---|
| 216 | self.have_adat = False |
---|
| 217 | print "detected PRO10 at %d, ADAT not available" % self.samplerate |
---|
| 218 | |
---|
| 219 | for i in range(self.tabInputMix.count()): |
---|
| 220 | self.tabInputMix.setTabEnabled(self.tabInputMix.page(i), True) |
---|
| 221 | |
---|
| 222 | if not self.have_adat: |
---|
| 223 | for i in range(self.tabInputMix.count()): |
---|
| 224 | page = self.tabInputMix.page(i) |
---|
| 225 | name = page.name() |
---|
| 226 | if name[0:4] == "adat": |
---|
| 227 | self.tabInputMix.setTabEnabled(page, False) |
---|
| 228 | else: |
---|
| 229 | self.tabInputMix.setTabEnabled(page, True) |
---|
| 230 | |
---|
| 231 | self.tabInputMix.setCurrentPage(0) |
---|
| 232 | SaffireMixerBase.updateValues(self) |
---|
| 233 | |
---|
| 234 | class SaffireProMixerSmall(SaffireProMixerSmallUI, SaffireMixerBase): |
---|
| 235 | def __init__(self,parent = None,name = None,fl = 0): |
---|
| 236 | SaffireProMixerSmallUI.__init__(self,parent,name,fl) |
---|
| 237 | SaffireMixerBase.__init__(self) |
---|
| 238 | |
---|
| 239 | def init(self): |
---|
| 240 | print "Init small Saffire Pro mixer window" |
---|
| 241 | |
---|
| 242 | self.VolumeControls={ |
---|
| 243 | |
---|
| 244 | self.sldOMixPC1O1: ['/Mixer/OutputMix', 0, 0], |
---|
| 245 | self.sldOMixPC2O2: ['/Mixer/OutputMix', 1, 1], |
---|
| 246 | self.sldOMixPC3O3: ['/Mixer/OutputMix', 2, 2], |
---|
| 247 | self.sldOMixPC4O4: ['/Mixer/OutputMix', 3, 3], |
---|
| 248 | self.sldOMixPC5O5: ['/Mixer/OutputMix', 4, 4], |
---|
| 249 | self.sldOMixPC6O6: ['/Mixer/OutputMix', 5, 5], |
---|
| 250 | self.sldOMixPC7O7: ['/Mixer/OutputMix', 6, 6], |
---|
| 251 | self.sldOMixPC8O8: ['/Mixer/OutputMix', 7, 7], |
---|
| 252 | self.sldOMixPC9O9: ['/Mixer/OutputMix', 8, 8], |
---|
| 253 | self.sldOMixPC10O10: ['/Mixer/OutputMix', 9, 9], |
---|
| 254 | |
---|
| 255 | self.sldOMixPC1O3: ['/Mixer/OutputMix', 0, 2], |
---|
| 256 | self.sldOMixPC2O4: ['/Mixer/OutputMix', 1, 3], |
---|
| 257 | self.sldOMixPC1O5: ['/Mixer/OutputMix', 0, 4], |
---|
| 258 | self.sldOMixPC2O6: ['/Mixer/OutputMix', 1, 5], |
---|
| 259 | self.sldOMixPC1O7: ['/Mixer/OutputMix', 0, 6], |
---|
| 260 | self.sldOMixPC2O8: ['/Mixer/OutputMix', 1, 7], |
---|
| 261 | self.sldOMixPC1O9: ['/Mixer/OutputMix', 0, 8], |
---|
| 262 | self.sldOMixPC2O10: ['/Mixer/OutputMix', 1, 9], |
---|
| 263 | |
---|
| 264 | self.sldOMixIMixO1: ['/Mixer/OutputMix', 10, 0], |
---|
| 265 | self.sldOMixIMixO2: ['/Mixer/OutputMix', 11, 1], |
---|
| 266 | self.sldOMixIMixO3: ['/Mixer/OutputMix', 10, 2], |
---|
| 267 | self.sldOMixIMixO4: ['/Mixer/OutputMix', 11, 3], |
---|
| 268 | self.sldOMixIMixO5: ['/Mixer/OutputMix', 10, 4], |
---|
| 269 | self.sldOMixIMixO6: ['/Mixer/OutputMix', 11, 5], |
---|
| 270 | self.sldOMixIMixO7: ['/Mixer/OutputMix', 10, 6], |
---|
| 271 | self.sldOMixIMixO8: ['/Mixer/OutputMix', 11, 7], |
---|
| 272 | self.sldOMixIMixO9: ['/Mixer/OutputMix', 10, 8], |
---|
| 273 | self.sldOMixIMixO10: ['/Mixer/OutputMix', 11, 9], |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | self.SelectorControls={ |
---|
| 278 | # control elements |
---|
| 279 | self.chkInsert1: ['/Control/Insert1'], |
---|
| 280 | self.chkInsert2: ['/Control/Insert2'], |
---|
| 281 | self.chkPhantom14: ['/Control/Phantom_1to4'], |
---|
| 282 | self.chkPhantom58: ['/Control/Phantom_5to8'], |
---|
| 283 | self.chkAC3: ['/Control/AC3pass'], |
---|
| 284 | self.chkMidiThru: ['/Control/MidiTru'], |
---|
| 285 | self.chkHighVoltage: ['/Control/UseHighVoltageRail'], |
---|
| 286 | #self.chkEnableADAT1: ['/Control/EnableAdat1'], |
---|
| 287 | #self.chkEnableADAT2: ['/Control/EnableAdat2'], |
---|
| 288 | #self.chkEnableSPDIF1: ['/Control/EnableSPDIF1'], |
---|
| 289 | self.chkMidiEnable: ['/Control/MIDIEnable'], |
---|
| 290 | self.chkAdatDisable: ['/Control/ADATDisable'], |
---|
| 291 | # Mixer switches |
---|
| 292 | self.chkMute12: ['/Mixer/Out12Mute'], |
---|
| 293 | self.chkHwCtrl12: ['/Mixer/Out12HwCtrl'], |
---|
| 294 | self.chkPad12: ['/Mixer/Out12Pad'], |
---|
| 295 | self.chkDim12: ['/Mixer/Out12Dim'], |
---|
| 296 | self.chkMute34: ['/Mixer/Out34Mute'], |
---|
| 297 | self.chkHwCtrl34: ['/Mixer/Out34HwCtrl'], |
---|
| 298 | self.chkPad34: ['/Mixer/Out34Pad'], |
---|
| 299 | self.chkDim34: ['/Mixer/Out34Dim'], |
---|
| 300 | self.chkMute56: ['/Mixer/Out56Mute'], |
---|
| 301 | self.chkHwCtrl56: ['/Mixer/Out56HwCtrl'], |
---|
| 302 | self.chkPad56: ['/Mixer/Out56Pad'], |
---|
| 303 | self.chkDim56: ['/Mixer/Out56Dim'], |
---|
| 304 | self.chkMute78: ['/Mixer/Out78Mute'], |
---|
| 305 | self.chkHwCtrl78: ['/Mixer/Out78HwCtrl'], |
---|
| 306 | self.chkPad78: ['/Mixer/Out78Pad'], |
---|
| 307 | self.chkDim78: ['/Mixer/Out78Dim'], |
---|
| 308 | # direct monitoring |
---|
| 309 | self.chkMonitor1: ['/Mixer/DirectMonitorCH1'], |
---|
| 310 | self.chkMonitor2: ['/Mixer/DirectMonitorCH2'], |
---|
| 311 | self.chkMonitor3: ['/Mixer/DirectMonitorCH3'], |
---|
| 312 | self.chkMonitor4: ['/Mixer/DirectMonitorCH4'], |
---|
| 313 | self.chkMonitor5: ['/Mixer/DirectMonitorCH5'], |
---|
| 314 | self.chkMonitor6: ['/Mixer/DirectMonitorCH6'], |
---|
| 315 | self.chkMonitor7: ['/Mixer/DirectMonitorCH7'], |
---|
| 316 | self.chkMonitor8: ['/Mixer/DirectMonitorCH8'], |
---|
| 317 | } |
---|
| 318 | |
---|
| 319 | self.VolumeControlsLowRes={ |
---|
| 320 | self.sldOut12Level: ['/Mixer/Out12Level'], |
---|
| 321 | self.sldOut34Level: ['/Mixer/Out34Level'], |
---|
| 322 | self.sldOut56Level: ['/Mixer/Out56Level'], |
---|
| 323 | self.sldOut78Level: ['/Mixer/Out78Level'], |
---|
| 324 | } |
---|
| 325 | |
---|
| 326 | self.TriggerButtonControls={ |
---|
| 327 | self.btnReboot: ['/Control/Reboot'], |
---|
| 328 | self.btnIdentify: ['/Control/FlashLed'], |
---|
| 329 | self.btnSaveSettings: ['/Control/SaveSettings'], |
---|
| 330 | } |
---|
| 331 | |
---|
| 332 | self.TextControls={ |
---|
| 333 | } |
---|
| 334 | |
---|
| 335 | self.saveTextControls={ |
---|
| 336 | } |
---|
| 337 | |
---|
| 338 | self.ComboControls={ |
---|
| 339 | self.comboStandalone: ['/Control/StandaloneConfig'], |
---|
| 340 | } |
---|
| 341 | |
---|
| 342 | def updateMatrixVolume(self,a0): |
---|
| 343 | SaffireMixerBase.updateMatrixVolume(self,a0) |
---|
| 344 | def updateLowResVolume(self,a0): |
---|
| 345 | SaffireMixerBase.updateLowResVolume(self,a0) |
---|
| 346 | def updateSelector(self,a0): |
---|
| 347 | SaffireMixerBase.updateSelector(self,a0) |
---|
| 348 | def triggerButton(self): |
---|
| 349 | SaffireMixerBase.triggerButton(self) |
---|
| 350 | def saveText(self): |
---|
| 351 | SaffireMixerBase.saveText(self) |
---|
| 352 | def initCombo(self, combo): |
---|
| 353 | SaffireMixerBase.initCombo(self,combo) |
---|
| 354 | def selectCombo(self, mode): |
---|
| 355 | SaffireMixerBase.selectCombo(self,mode) |
---|
| 356 | |
---|
| 357 | def updateValues(self): |
---|
| 358 | SaffireMixerBase.updateValues(self) |
---|