Search in sources :

Example 1 with TrackVolumeMode

use of de.mossgrabers.framework.mode.track.TrackVolumeMode in project DrivenByMoss by git-moss.

the class SLMkIIIControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final SLMkIIIControlSurface surface = this.getSurface();
    for (int i = 0; i < 8; i++) {
        this.addRelativeKnob(ContinuousID.get(ContinuousID.KNOB1, i), "Knob " + (i + 1), new KnobRowModeCommand<>(i, this.model, surface), BindType.CC, 15, SLMkIIIControlSurface.MKIII_KNOB_1 + i).setIndexInGroup(i);
        this.addFader(ContinuousID.get(ContinuousID.FADER1, i), "Fader " + (i + 1), null, BindType.CC, 15, SLMkIIIControlSurface.MKIII_FADER_1 + i).setIndexInGroup(i);
    }
    // Volume faders which can be turned off in the settings...
    final TrackVolumeMode<SLMkIIIControlSurface, SLMkIIIConfiguration> volumeMode = new TrackVolumeMode<>(surface, this.model, true, ContinuousID.createSequentialList(ContinuousID.FADER1, 8));
    volumeMode.onActivate();
    this.configuration.addSettingObserver(SLMkIIIConfiguration.ENABLE_FADERS, () -> {
        if (this.configuration.areFadersEnabled())
            volumeMode.onActivate();
        else
            volumeMode.onDeactivate();
    });
}
Also used : SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface) KnobRowModeCommand(de.mossgrabers.framework.command.continuous.KnobRowModeCommand) TrackVolumeMode(de.mossgrabers.framework.mode.track.TrackVolumeMode)

Aggregations

SLMkIIIControlSurface (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)1 KnobRowModeCommand (de.mossgrabers.framework.command.continuous.KnobRowModeCommand)1 TrackVolumeMode (de.mossgrabers.framework.mode.track.TrackVolumeMode)1