Changes

Jump to navigation Jump to search
Line 105: Line 105:  
Everything from the zynseq to brightness_config including the links to the C libraries that actually do the work as lib_zyncore, the zynengine objects that wrap the audio and MIDI devices and the many components used by the GUI screen.
 
Everything from the zynseq to brightness_config including the links to the C libraries that actually do the work as lib_zyncore, the zynengine objects that wrap the audio and MIDI devices and the many components used by the GUI screen.
   −
Then the zynthian_gui Object is defined.  
+
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.  
   −
=== zyngui/zynthian_gui.py ===
+
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.
   −
/home/pi/zynthian-ui/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
 +
|}
   −
This module primarily defines the zynthian_gui class object with a few tkinter helper functions
+
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.
and this is what actually handles all the GUI interaction and functionality.
     −
It's about 3000 lines of code and after all this definition
+
# Create Core UI Screens
 +
self.screens['info'] = zynthian_gui_info()
 +
self.screens['splash'] = zynthian_gui_splash()
 +
self.screens['loading'] = zynthian_gui_loading()
 +
self.screens['confirm'] = zynthian_gui_confirm()
 +
....
   −
At line 1775 or there abouts we get
+
The main menu is set depending on the zynthian kit...
 
  −
* 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
+
and the zynthian device manager is instantiated.
* zyngui.start()
     −
This method of the zynthian_gui class configures the GUI environment ready to start.
+
Then the threads and polling mechanisms are started .
584

edits

Navigation menu