Here are some tips for control driver authors:
- Chains are now stored in display order - no need to call a separate helper function, just get the list of chains.
- We have lost the concept of a list of just MIDI (launcher) chains. All chains are used and it is up to the user to move them to provide the required presentation in the hardware controller. (Maybe we could consider an enhancement here but we want it to be simple and obvious to the user.)
- Chain id remains arbitrary and should not be used to indicate position, except chain 0 is always the main mixbus.
- There is a “pinned” position that defines which chains are pinned to the right. Main mixbus is always pinned and always farmost right. There are Chain Manager methods to set_pinned(count), get_pinned_count() and get_pinned_pos().
- There are 2 mixers. One for chains (state_manager.zynmixer_chan) and one for mixbuses (state_manager.zynmixer_bus).
- Each chain may contain an audio mixer processor chain.zynmixer_proc. This is a standard zynthian processor that implements all mixer channel strip controllers as normal zctrls.
- There is a Chain method chain.is_audio() that returns True if the chain contains an audio mixer processor.
- The metronome zctrls are now owned by zynseq class so can be accessed without accessing the tempo gui view. You can set / get tempo, metronome enable & metronome volume from state_manager.zynseq object.
- Mixer view has 2 modes that either shows faders or launchers. Broadly this is implemented similar to how zynpad was accessed.
- Hardware launcher LED colours have been adjusted to allow 16 distinct colours that can be matched to APC and Launchpad colours. These are stored in zynthian_gui_config.LAUNCHER_COLOUR structure. This should be extended to provide suitable colours for other controllers, with the aspiration of conformity and consistency.
- Although clip launcher (clippy) chains use MIDI from the sequencer for their triggers, they are not MIDI chains and have a dedicated output from zynseq. They are closer to a generator type engine (no MIDI chain, audio procesor chain) but we present them as first-class citizens, with their own engine type.
- Clippy colours are currently simply the MIDI channel colours in reverse order. I would like to see if we could find more distinct colours, but this is a challenge. We may reconsider use of colours because the choice is limited and needs to work with various modes. This is a subject we should discuss further.
- We have added the concept of horizontal and vertical scrolling of chains and launchers in the device controllers. (I am still working on this - the current plan is to lock it to zyngui display, i.e. top left launcher is the same in zyngui and hardware controller.)
- Added a phrase_launcher_col which is actually the same as main column - so maybe there should be some consolidation.
- With the simplication of ordered, contiguous chains, the code around columns has been simplified or removed.
- zynthian_ctrldev_zynmixer has references: self.zynmixer and self.zynmixer_bus that point to the chain and mixbus mixer engines respectively. (Maybe we should use the underscore prefix convention more - I have started to do this a little, but not retro-fitted.)
- self.mixer_col_offset probably is / should be the same as self.scroll_h. We should consolidate this, using self.scroll_h and these should probably be moved to the base class.
- Helper functions get_mixer_param, set_mixer_param & toggle_mixer_param allow access to the mixer strip based on its position.
- We want to abstract the sequencer code from @oscaracena’s drivers to a class, similar to how we have mixer and launcher (zynpad) classes.
- We may also want to abstract GUI control to another class.
- APC40 is currently the most feature rich / complete implementation of mixer, launcher and GUI control and feedback. Both @jofemodo and I have this hardware (which is a very good fit for zynthian integration) and will use it as the benchmark for driver integration. We should ensure its implementation is the gold standard and follows best practice.