Exemplo n.º 1
0
	def __init__(self):
		self.zynmidi = None
		self.screens = {}
		self.active_screen = None
		self.modal_screen = None
		self.curlayer = None
		self._curlayer = None

		self.dtsw = []
		self.polling = False

		self.loading = 0
		self.loading_thread = None
		self.zyncoder_thread = None
		self.zynread_wait_flag = False
		self.zynswitch_defered_event = None
		self.exit_flag = False
		self.exit_code = 0

		self.midi_filter_script = None;
		self.midi_learn_mode = False
		self.midi_learn_zctrl = None

		self.status_info = {}
		self.status_counter = 0

		self.zynautoconnect_audio_flag = False
		self.zynautoconnect_midi_flag = False

		# Create Lock object to avoid concurrence problems
		self.lock = Lock();

		# Load keyboard binding map
		zynthian_gui_keybinding.getInstance().load()

		# Get Jackd Options
		self.jackd_options = zynconf.get_jackd_options()

		# Initialize peakmeter audio monitor if needed
		if not zynthian_gui_config.show_cpu_status:
			try:
				global lib_jackpeak
				lib_jackpeak = lib_jackpeak_init()
				lib_jackpeak.setDecay(c_float(0.2))
				lib_jackpeak.setHoldCount(10)
			except Exception as e:
				logging.error("ERROR initializing jackpeak: %s" % e)

		# Initialize Controllers (Rotary & Switches) & MIDI-router
		try:
			global lib_zyncoder
			#Init Zyncoder Library
			lib_zyncoder_init()
			lib_zyncoder=zyncoder.get_lib_zyncoder()
			self.zynmidi=zynthian_zcmidi()
			#Init Switches
			self.zynswitches_init()
			self.zynswitches_midi_setup()
		except Exception as e:
			logging.error("ERROR initializing Controllers & MIDI-router: %s" % e)
Exemplo n.º 2
0
	def __init__(self):
		# Initialize Controllers (Rotary and Switches), MIDI and OSC
		try:
			global lib_zyncoder
			zyngine_osc_port=6693
			lib_zyncoder_init(zyngine_osc_port)
			lib_zyncoder=zyncoder.get_lib_zyncoder()
			self.zynmidi=zynthian_zcmidi()
			self.zynswitches_init()
		except Exception as e:
			logging.error("ERROR initializing GUI: %s" % e)
Exemplo n.º 3
0
    def __init__(self):
        self.zynmidi = None
        self.screens = {}
        self.active_screen = None
        self.modal_screen = None
        self.curlayer = None

        self.dtsw = []
        self.polling = False

        self.loading = 0
        self.loading_thread = None
        self.zyncoder_thread = None
        self.zynread_wait_flag = False
        self.zynswitch_defered_event = None
        self.exit_flag = False
        self.exit_code = 0

        self.midi_filter_script = None
        self.midi_learn_mode = False
        self.midi_learn_zctrl = None

        self.status_info = {}
        self.status_counter = 0

        # Initialize peakmeter audio monitor if needed
        if not zynthian_gui_config.show_cpu_status:
            try:
                global lib_jackpeak
                lib_jackpeak = lib_jackpeak_init()
                lib_jackpeak.setDecay(c_float(0.2))
                lib_jackpeak.setHoldCount(10)
            except Exception as e:
                logging.error("ERROR initializing jackpeak: %s" % e)

        # Initialize Controllers (Rotary & Switches) & MIDI-router
        try:
            global lib_zyncoder
            #Init Zyncoder Library
            lib_zyncoder_init()
            lib_zyncoder = zyncoder.get_lib_zyncoder()
            self.zynmidi = zynthian_zcmidi()
            #Init Switches
            self.zynswitches_init()
        except Exception as e:
            logging.error("ERROR initializing Controllers & MIDI-router: %s" %
                          e)
Exemplo n.º 4
0
	def __init__(self):
		# Controls Initialization (Rotary and Switches)
		try:
			global lib_zyncoder
			lib_zyncoder_init(zyngine_osc_port)
			lib_zyncoder=zyncoder.get_lib_zyncoder()
			#self.amidi=zynthian_midi("Zynthian_gui")
			self.zynmidi=zynthian_zcmidi()
			self.zynswitches_init()
		except Exception as e:
			print("ERROR initializing GUI: %s" % str(e))
		# GUI Objects Initialization
		#self.screens['splash']=zynthian_splash(1000)
		self.screens['admin']=zynthian_admin()
		self.screens['info']=zynthian_info()
		self.screens['engine']=zynthian_gui_engine()
		# Show first screen and start polling
		self.show_screen('engine')
		self.start_polling()
Exemplo n.º 5
0
	def __init__(self):
		self.zynmidi = None
		self.screens = {}
		self.active_screen = None
		self.modal_screen = None
		self.curlayer = None

		self.dtsw = []
		self.polling = False

		self.loading = 0
		self.loading_thread = None
		self.zyncoder_thread = None
		self.zynread_wait_flag = False
		self.zynswitch_defered_event = None
		self.exit_flag = False
		self.exit_code = 0

		self.midi_learn_mode = False
		self.midi_learn_zctrl = None

		self.status_info = {}
		self.status_counter = 0

		# Initialize Controllers (Rotary and Switches), MIDI and OSC
		try:
			global lib_zyncoder
			#Init Zyncoder Library
			lib_zyncoder_init()
			lib_zyncoder=zyncoder.get_lib_zyncoder()
			#Init MIDI subsystem
			self.init_midi()
			self.zynmidi=zynthian_zcmidi()
			#Set Master Volume to Max.
			lib_zyncoder.zynmidi_send_master_ccontrol_change(0x7,0xFF)
			#Init MIDI and Switches
			self.zynswitches_init()
			#Init OSC
			self.osc_init()
		except Exception as e:
			logging.error("ERROR initializing GUI: %s" % e)
Exemplo n.º 6
0
    def __init__(self):
        self.zynmidi = None
        self.screens = {}
        self.active_screen = None
        self.modal_screen = None
        self.curlayer = None

        self.dtsw = {}
        self.polling = False
        self.osc_target = None
        self.osc_server = None

        self.loading = 0
        self.loading_thread = None
        self.zyncoder_thread = None
        self.zynread_wait_flag = False
        self.zynswitch_defered_event = None
        self.exit_flag = False
        self.exit_code = 0

        self.midi_learn_zctrl = None

        # Initialize Controllers (Rotary and Switches), MIDI and OSC
        try:
            global lib_zyncoder
            #Init Zyncoder Library
            zyngine_osc_port = 6693
            lib_zyncoder_init(zyngine_osc_port)
            lib_zyncoder = zyncoder.get_lib_zyncoder()
            #Init MIDI subsystem
            self.init_midi()
            self.zynmidi = zynthian_zcmidi()
            #Set Master Volume to Max.
            lib_zyncoder.zynmidi_send_master_ccontrol_change(0x7, 0xFF)
            #Init MIDI and Switches
            self.zynswitches_init()
        except Exception as e:
            logging.error("ERROR initializing GUI: %s" % e)