コード例 #1
0
    def __update_labels(self):
        # extract all control stream entries into a new list
        # extract the labels entry into a deticated list, if it exists
        new_ctl = []
        labels = []
        for e in self.__ctl:
            if e[0] == 'labels':
                labels = utils.tuple_items(e[1])
            else:
                new_ctl.append(e)

        # append the local category and label to the labels list
        category = self[17].get_value()
        label = self[18].get_value()
        if len(label) == 0 and self.host is not None and self.host.has_plugin(
        ):
            desc = self.host.get_description()
            if desc is not None:
                label = desc.name()

        if category and len(category) > 0 and label and len(label) > 0:
            labels.append(
                utils.maketuple(
                    [piw.makestring(category, 0),
                     piw.makestring(label, 0)], 0))

        # reintegrate the labels list and set the new control stream value
        new_ctl.append(['labels', utils.maketuple(labels, 0)])
        self[16].set_value(utils.makedict(new_ctl, 0))
コード例 #2
0
ファイル: ukbd_plg.py プロジェクト: shamharoth/EigenD
 def __controllerinit(self):
     return utils.makedict(
         {
             'columnlen': self.keyboard.get_columnlen(),
             'columnoffset': self.keyboard.get_columnoffset(),
             'courselen': self.keyboard.get_courselen(),
             'courseoffset': self.keyboard.get_courseoffset()
         }, 0)
コード例 #3
0
ファイル: t3d_device_plg.py プロジェクト: shamharoth/EigenD
 def controllerinit(self):
     scale = piw.makestring('[0,1,2,3,4,5,6,7,8,9,10,11,12]', 0)
     octave = piw.makefloat_bounded(9, -1, 0, -1, 0)
     dict = utils.makedict(
         {
             'columnlen': self.device.get_columnlen(),
             'columnoffset': self.device.get_columnoffset(),
             'courselen': self.device.get_courselen(),
             'courseoffset': self.device.get_courseoffset(),
             'octave': octave,
             'scale': scale
         }, 0)
     return dict
コード例 #4
0
ファイル: pico_manager_plg.py プロジェクト: jschpmn/EigenD
 def __courses(self):
     return utils.makedict({'courselen': piw.makestring('[9,9,4]', 0)}, 0)
コード例 #5
0
ファイル: keyboard_X.py プロジェクト: tylerwood/EigenD
 def courses(self):
     return utils.makedict({'courselen':piw.makestring('[16,16,20,20,12,4,4]',0)},0)
コード例 #6
0
ファイル: keyboard_X.py プロジェクト: tylerwood/EigenD
 def courses(self):
     return utils.makedict({'courselen':piw.makestring('[24,24,24,24,24,12]',0)},0)