Search in sources :

Example 1 with MaschineVolumeMode

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);
}
Also used : EditNoteMode(de.mossgrabers.controller.ni.maschine.mk3.mode.EditNoteMode) MaschineVolumeMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineVolumeMode) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Example 2 with MaschineVolumeMode

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);
}
Also used : PositionMode(de.mossgrabers.controller.ni.maschine.mk3.mode.PositionMode) PlayConfigurationMode(de.mossgrabers.controller.ni.maschine.mk3.mode.PlayConfigurationMode) MaschineParametersMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineParametersMode) MaschineUserMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineUserMode) DrumConfigurationMode(de.mossgrabers.controller.ni.maschine.mk3.mode.DrumConfigurationMode) MaschineControlSurface(de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface) BrowseMode(de.mossgrabers.controller.ni.maschine.mk3.mode.BrowseMode) MaschinePanMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschinePanMode) MaschineSendMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineSendMode) TempoMode(de.mossgrabers.controller.ni.maschine.mk3.mode.TempoMode) LoopLengthMode(de.mossgrabers.controller.ni.maschine.mk3.mode.LoopLengthMode) EditNoteMode(de.mossgrabers.controller.ni.maschine.mk3.mode.EditNoteMode) MaschineVolumeMode(de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineVolumeMode) NoteRepeatMode(de.mossgrabers.controller.ni.maschine.mk3.mode.NoteRepeatMode) LoopStartMode(de.mossgrabers.controller.ni.maschine.mk3.mode.LoopStartMode) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager) StudioEncoderModeManager(de.mossgrabers.controller.ni.maschine.mk3.controller.StudioEncoderModeManager)

Aggregations

EditNoteMode (de.mossgrabers.controller.ni.maschine.mk3.mode.EditNoteMode)2 MaschineVolumeMode (de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineVolumeMode)2 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)2 MaschineControlSurface (de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)1 StudioEncoderModeManager (de.mossgrabers.controller.ni.maschine.mk3.controller.StudioEncoderModeManager)1 BrowseMode (de.mossgrabers.controller.ni.maschine.mk3.mode.BrowseMode)1 DrumConfigurationMode (de.mossgrabers.controller.ni.maschine.mk3.mode.DrumConfigurationMode)1 LoopLengthMode (de.mossgrabers.controller.ni.maschine.mk3.mode.LoopLengthMode)1 LoopStartMode (de.mossgrabers.controller.ni.maschine.mk3.mode.LoopStartMode)1 MaschinePanMode (de.mossgrabers.controller.ni.maschine.mk3.mode.MaschinePanMode)1 MaschineParametersMode (de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineParametersMode)1 MaschineSendMode (de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineSendMode)1 MaschineUserMode (de.mossgrabers.controller.ni.maschine.mk3.mode.MaschineUserMode)1 NoteRepeatMode (de.mossgrabers.controller.ni.maschine.mk3.mode.NoteRepeatMode)1 PlayConfigurationMode (de.mossgrabers.controller.ni.maschine.mk3.mode.PlayConfigurationMode)1 PositionMode (de.mossgrabers.controller.ni.maschine.mk3.mode.PositionMode)1 TempoMode (de.mossgrabers.controller.ni.maschine.mk3.mode.TempoMode)1