def init_Connexion(self): """Initialize the midi module""" midi.init() self.nbrMidiDevice = midi.get_count() self.outputId = int(midi.get_default_output_id()) self.init_DeviceTable() self.init_OutputId() self.isInit=True Log.d(self.TAG, 'Connexion initialized', True)
mayavi = visualization.mayavi_live(system) mayavi_rotation_angle = 45. mayavi_rotation_angle_step = 5. mayavi_zoom = 35.949120941773977 mayavi_zoom_step = 3. plot_max_data_len = 20 ############################################################# # GUI Controls # ############################################################# inputs, outputs = [], [] for i in range(midi.get_count()): interf, name, input, output, opened = midi.get_device_info(i) if input: inputs.append((i, interf + " " + name)) if output: outputs.append((i, interf + " " + name)) class Controls(HasTraits): if len(inputs) == 1: default_input = inputs for i in inputs: if not "Through Port" in i[1]: default_input = i break
mayavi = visualization.mayavi_live(system) mayavi_rotation_angle = 45. mayavi_rotation_angle_step = 5. mayavi_zoom = 35.949120941773977 mayavi_zoom_step = 3. plot_max_data_len = 20 ############################################################# # GUI Controls # ############################################################# inputs, outputs = [], [] for i in range(midi.get_count()): interf, name, input, output, opened = midi.get_device_info(i) if input: inputs.append((i, interf + " " + name)) if output: outputs.append((i, interf + " " + name)) class Controls(HasTraits): if len(inputs) == 1: default_input = inputs for i in inputs: if not "Through Port" in i[1]: default_input = i break