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();
});
}
Aggregations