def __init__(self): ''' Constructor ''' super(ShowMxr, self).__init__(cfg.cfgdict) self.mixers = {} for mxrid in self.show_conf.equipment['mixers']: #print(mxrid) if self.show_conf.equipment['mixers'][mxrid]['IP_address']: mixeraddress = self.show_conf.equipment['mixers'][mxrid][ 'IP_address'] + ',' + self.show_conf.equipment['mixers'][ mxrid]['port'] else: mixeraddress = self.show_conf.equipment['mixers'][mxrid][ 'MIDI_address'] self.mixers[mxrid] = MixerConf( path.abspath( path.join(CFG_DIR, cfg.cfgdict['configuration']['mixers']['folder'], cfg.cfgdict['configuration']['mixers']['file'])), self.show_conf.equipment['mixers'][mxrid]['mfr'], self.show_conf.equipment['mixers'][mxrid]['model'], mixeraddress) self.chrchnmap = MixerCharMap(self.show_confpath + self.show_conf.settings['mixermap'])
def __init__(self): ''' Constructor ''' self.show_confpath = cfgdict['Show']['folder'] + '/' self.show_conf = ShowConf(self.show_confpath + cfgdict['Show']['file']) self.mixer = MixerConf(path.abspath(path.join(path.dirname(__file__), '../ShowControl/', cfgdict['Mixer']['file'])),self.show_conf.settings['mxrmfr'],self.show_conf.settings['mxrmodel']) self.chrchnmap = MixerCharMap(self.show_confpath + self.show_conf.settings['mxrmap']) self.cues = CueList(self.show_confpath + self.show_conf.settings['mxrcue'], self.mixer.input_count) self.cues.currentcueindex = 0 self.cues.setcurrentcuestate(self.cues.currentcueindex)
def reload(self): self.mixers = {} for mxrid in self.show_conf.equipment['mixers']: #print(mxrid) mixeraddress = self.show_conf.equipment['mixers'][mxrid][ 'IP_address'] + ',' + self.show_conf.equipment['mixers'][ mxrid]['port'] self.mixers[mxrid] = MixerConf( path.abspath( path.join(CFG_DIR, cfg.cfgdict['configuration']['mixers']['folder'], cfg.cfgdict['configuration']['mixers']['file'])), self.show_conf.equipment['mixers'][mxrid]['mfr'], self.show_conf.equipment['mixers'][mxrid]['model'], mixeraddress) self.chrchnmap = MixerCharMap(self.show_confpath + self.show_conf.settings['mixermap'])
def loadNewShow(self, newpath): ''' :param sho_configpath: path to new ShowConf.xml :return: ''' print(cfgdict) self.show_confpath, showfile = path.split(newpath) #self.show_confpath = path.dirname(newpath) self.show_confpath = self.show_confpath + '/' cfgdict['Show']['folder'] = self.show_confpath cfgdict['Show']['file'] = showfile cfg.updateFromDict(cfgdict) cfg.write() self.show_conf = ShowConf(self.show_confpath + cfgdict['Show']['file']) self.mixer = MixerConf(path.abspath(path.join(path.dirname(__file__), '../ShowControl/', cfgdict['Mixer']['file'])),self.show_conf.settings['mxrmfr'],self.show_conf.settings['mxrmodel']) self.chrchnmap = MixerCharMap(self.show_confpath + self.show_conf.settings['mxrmap']) self.cues = CueList(self.show_confpath + self.show_conf.settings['mxrcue'], self.mixer.input_count) self.cues.currentcueindex = 0 self.cues.setcurrentcuestate(self.cues.currentcueindex) self.displayShow()