Changes

Jump to navigation Jump to search
Line 107: Line 107:  
It also defines the threads that respond to the various events that occur within  the GUI environment and the various devices connected to the zynthian like Keyboards both musical and QWERTY, mice and all manner of MIDI paraphernalia.  
 
It also defines the threads that respond to the various events that occur within  the GUI environment and the various devices connected to the zynthian like Keyboards both musical and QWERTY, mice and all manner of MIDI paraphernalia.  
   −
Then the zynthian_gui Object is defined.  
+
Then the zynthian_gui Object is defined.
 +
==== Functions ====
 +
===== create_screens =====
 +
The zynautoconnector is started which establishes the jack client connection to the Jack Server that does all the actual audio and midi processing, and runs this in it's own thread and handles the locking to ensure components play nice.
   −
=== zyngui/zynthian_gui.py ===
+
The global references for the audio recorder, the mixer and the sequencer are instantiated from there modules
 +
{| class="wikitable"
 +
|+ Caption text
 +
|-
 +
! object !! module !! function
 +
|-
 +
| self.audio_recorder || zyngui/zynthian_audio_recorder || Audio Recorder
 +
|-
 +
| self.zynmixer || zynthian_engine_audio_mixer || Mixer
 +
|-
 +
| self.zynseq || zynlibs/zynseq || Sequencer
 +
|}
   −
/home/pi/zynthian-ui/zyngui/zynthian_gui.py
+
A dictionary called screens is defined and this has string keys that points to the individually defined screen objects that display the appropriate screens is defined and the value of the dictionary si set to the instantiated object from the .zyngui modules.
   −
This module primarily defines the zynthian_gui class object with a few tkinter helper functions
+
# Create Core UI Screens
and this is what actually handles all the GUI interaction and functionality.
+
self.screens['info'] = zynthian_gui_info()
 +
self.screens['splash'] = zynthian_gui_splash()
 +
self.screens['loading'] = zynthian_gui_loading()
 +
self.screens['confirm'] = zynthian_gui_confirm()
 +
....
   −
It's about 3000 lines of code and after all this definition
+
The main menu is set depending on the zynthian kit...
   −
At line 1775 or there abouts we get
+
and the zynthian device manager is instantiated.
 
  −
* logging.info("STARTING ZYNTHIAN-UI ...")
  −
Always good to log and use the python logging infrastructure.
  −
* zynthian_gui_config.zyngui=zyngui=zynthian_gui()
     −
Some name binding for maintaining different names spaces or some possibly more nefereous purpose, before running
+
Then the threads and polling mechanisms are started .
* zyngui.start()
  −
 
  −
This method of the zynthian_gui class configures the GUI environment ready to start.
 
584

edits

Navigation menu