Search in sources :

Example 1 with MCUSegmentDisplay

use of de.mossgrabers.mcu.controller.MCUSegmentDisplay in project DrivenByMoss by git-moss.

the class MCUControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    for (int i = 0; i < this.numMCUDevices; i++) {
        final IMidiOutput output = midiAccess.createOutput(i);
        final IMidiInput input = midiAccess.createInput(i, null);
        final MCUControlSurface surface = new MCUControlSurface(this.surfaces, this.model.getHost(), this.colorManager, this.configuration, output, input, 8 * (this.numMCUDevices - i - 1), i == 0);
        this.surfaces.add(surface);
        surface.setDisplay(new MCUDisplay(this.model.getHost(), output, true, false));
        surface.setSecondDisplay(new MCUDisplay(this.model.getHost(), output, false, i == 0));
        surface.setSegmentDisplay(new MCUSegmentDisplay(output));
        surface.getModeManager().setDefaultMode(Modes.MODE_VOLUME);
    }
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) MCUDisplay(de.mossgrabers.mcu.controller.MCUDisplay) MCUSegmentDisplay(de.mossgrabers.mcu.controller.MCUSegmentDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) MCUControlSurface(de.mossgrabers.mcu.controller.MCUControlSurface)

Aggregations

IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)1 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)1 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)1 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)1 MCUDisplay (de.mossgrabers.mcu.controller.MCUDisplay)1 MCUSegmentDisplay (de.mossgrabers.mcu.controller.MCUSegmentDisplay)1