Search in sources :

Example 6 with SLControlSurface

use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.

the class SLControllerSetup method startup.

/**
 * {@inheritDoc}
 */
@Override
public void startup() {
    // Initialise 2nd display
    final SLControlSurface surface = this.getSurface();
    surface.getModeManager().getMode(Modes.MODE_VOLUME).updateDisplay();
    surface.getViewManager().setActiveView(Views.VIEW_CONTROL);
    surface.getModeManager().setActiveMode(Modes.MODE_TRACK);
}
Also used : SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface)

Example 7 with SLControlSurface

use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.

the class SLControllerSetup method updateIndication.

private void updateIndication() {
    final SLControlSurface surface = this.getSurface();
    final Integer mode = surface.getModeManager().getActiveModeId();
    final IMasterTrack mt = this.model.getMasterTrack();
    mt.setVolumeIndication(Modes.MODE_MASTER.equals(mode));
    mt.setPanIndication(Modes.MODE_MASTER.equals(mode));
    final ITrackBank tb = this.model.getTrackBank();
    final IChannelBank tbe = this.model.getEffectTrackBank();
    final boolean isEffect = this.model.isEffectTrackBankActive();
    final boolean isVolume = Modes.MODE_VOLUME.equals(mode);
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    final ITrack selectedTrack = tb.getSelectedTrack();
    for (int i = 0; i < 8; i++) {
        final boolean hasTrackSel = selectedTrack != null && selectedTrack.getIndex() == i && Modes.MODE_TRACK.equals(mode);
        final ITrack track = tb.getTrack(i);
        track.setVolumeIndication(!isEffect && (isVolume || hasTrackSel));
        track.setPanIndication(!isEffect && hasTrackSel);
        for (int j = 0; j < 6; j++) track.getSend(j).setIndication(!isEffect && hasTrackSel);
        final ITrack fxTrack = tbe.getTrack(i);
        fxTrack.setVolumeIndication(isEffect);
        fxTrack.setPanIndication(isEffect);
        cursorDevice.indicateParameter(i, true);
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.ITrackBank) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Aggregations

SLControlSurface (de.mossgrabers.sl.controller.SLControlSurface)7 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)1 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)1 IHost (de.mossgrabers.framework.daw.IHost)1 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)1 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)1 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)1 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)1 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)1 ModeManager (de.mossgrabers.framework.mode.ModeManager)1 ViewManager (de.mossgrabers.framework.view.ViewManager)1 DeviceKnobRowCommand (de.mossgrabers.sl.command.continuous.DeviceKnobRowCommand)1 FaderCommand (de.mossgrabers.sl.command.continuous.FaderCommand)1 TapTempoInitMkICommand (de.mossgrabers.sl.command.continuous.TapTempoInitMkICommand)1 TapTempoMkICommand (de.mossgrabers.sl.command.continuous.TapTempoMkICommand)1 TouchpadCommand (de.mossgrabers.sl.command.continuous.TouchpadCommand)1 TrackKnobRowCommand (de.mossgrabers.sl.command.continuous.TrackKnobRowCommand)1 P1ButtonCommand (de.mossgrabers.sl.command.trigger.P1ButtonCommand)1 P2ButtonCommand (de.mossgrabers.sl.command.trigger.P2ButtonCommand)1