use of de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineVolumeMode in project DrivenByMoss by git-moss.
the class VolumePanSendCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
final ModeManager modeManager = this.surface.getModeManager();
// Switch Gain/Velocity note edit parameters
if (modeManager.isActive(Modes.NOTE) && this.surface.getViewManager().isActive(Views.DRUM, Views.PLAY)) {
if (event == ButtonEvent.DOWN) {
final EditNoteMode mode = (EditNoteMode) modeManager.get(Modes.NOTE);
final boolean isVelocity = mode.getSelectedItem() == EditNoteMode.VELOCITY;
mode.selectItem(isVelocity ? EditNoteMode.GAIN : EditNoteMode.VELOCITY);
this.surface.getDisplay().notify(isVelocity ? "Gain" : "Velocity");
}
return;
}
// Toggle VU display
if (this.surface.isShiftPressed()) {
if (event == ButtonEvent.DOWN) {
this.surface.setStopConsumed();
((MaschineVolumeMode) modeManager.get(Modes.VOLUME)).toggleDisplayVU();
}
return;
}
super.execute(event, velocity);
}
use of de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineVolumeMode in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method createModes.
/**
* {@inheritDoc}
*/
@Override
protected void createModes() {
final MaschineControlSurface surface = this.getSurface();
final ModeManager modeManager = surface.getModeManager();
modeManager.register(Modes.BROWSER, new BrowseMode(surface, this.model));
modeManager.register(Modes.VOLUME, new MaschineVolumeMode(surface, this.model));
modeManager.register(Modes.PAN, new MaschinePanMode(surface, this.model));
for (int i = 0; i < 8; i++) modeManager.register(Modes.get(Modes.SEND1, i), new MaschineSendMode(i, surface, this.model));
modeManager.register(Modes.TEMPO, new TempoMode(surface, this.model));
modeManager.register(Modes.POSITION, new PositionMode(surface, this.model));
modeManager.register(Modes.LOOP_START, new LoopStartMode(surface, this.model));
modeManager.register(Modes.LOOP_LENGTH, new LoopLengthMode(surface, this.model));
modeManager.register(Modes.REPEAT_NOTE, new NoteRepeatMode(surface, this.model));
modeManager.register(Modes.SCALES, new PlayConfigurationMode(surface, this.model));
modeManager.register(Modes.PLAY_OPTIONS, new DrumConfigurationMode(surface, this.model));
modeManager.register(Modes.NOTE, new EditNoteMode(surface, this.model));
modeManager.register(Modes.DEVICE_PARAMS, new MaschineParametersMode(surface, this.model));
if (this.maschine.hasMCUDisplay())
modeManager.register(Modes.USER, new MaschineUserMode(surface, this.model));
modeManager.setDefaultID(Modes.VOLUME);
}
Aggregations