User Tools

Site Tools


This is an old revision of the document!


Abstract class representing a controller. For each controller type there's a subclass: HidController, MidiController… Jordi will need to create a KeyboardController subclass.


This class is used to provide the controllerDebug(String s) macro. This macro prints controller debug messages. It is only needed to include the header file in each file where you want to use this macro. There's nothing that needs to be instantiated.


Abstract class representing a controller preset. For each controller type there's a subclass: HidControllerPreset, MidiControllerPreset… Jordi will need to create a KeyboardControllerPreset subclass.


Handles loading and saving of Controller presets.


Controller::setPreset(const Controller& preset) needs to know the dynamic type of preset, because a MidiController should only handle instances of MidiControllerPreset. This class is inherited by Controller. This is part of the Visitor pattern. Controller inherits from it. This class defines a series of pure virtual methods called visit. Controller subclasses must implement these visit methods according to their ability to handle each preset type. Like this:

Here's the explanation of why this is needed:

More info: Visitor pattern


It manages the loading and execution of a script. Controller class holds a ControllerEngine instance.


Abstract class that looks for available controllers. For each controller type there's a subclass: HidEnumerator, MidiEnumerator… Jordi will need to create a KeyboardEnumerator subclass.

For example if a user has two MIDI controllers connected to the computer, MidiEnumerator::queryDevices() returns a list with two instances of MidiController.

Here is were Jordi will have to figure out if two keyboards connected to the same computer can be used as two controllers or the OS presents them as a single one.

ControllerManager class holds a list of ControllerEnumerator instances.


Manages creation/enumeration/deletion of hardware controllers. When a class wants to access a controller or query the available ones, it asks ControllerManager. There's only one instance of ControllerManager that is created in MixxxMainWindow (mixxx.cpp) and gets its slotSetUpDevices method called, at Mixxx start.


Similar to ControllerPresetVisitor. In this case ControllerMappingTableModel wants to know the dynamic type of a Controller instance.

Translations of this page:
gsoc2016_keyboard_classes_overview.1463423748.txt.gz · Last modified: 2016/05/16 14:35 by ferranpujolcamins