Search in sources :

Example 1 with PlayPositionTempoCommand

use of de.mossgrabers.mcu.command.continuous.PlayPositionTempoCommand in project DrivenByMoss by git-moss.

the class MCUControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    MCUControlSurface surface = this.getSurface();
    ViewManager viewManager = surface.getViewManager();
    viewManager.registerContinuousCommand(Commands.CONT_COMMAND_PLAY_POSITION, new PlayPositionTempoCommand(this.model, surface));
    surface.assignContinuousCommand(MCUControlSurface.MCU_CC_JOG, 1, Commands.CONT_COMMAND_PLAY_POSITION);
    for (int index = 0; index < this.numMCUDevices; index++) {
        surface = this.getSurface(index);
        viewManager = surface.getViewManager();
        for (int i = 0; i < 8; i++) {
            final Integer commandID = Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i);
            viewManager.registerContinuousCommand(commandID, new KnobRowModeCommand<>(i, this.model, surface));
            surface.assignContinuousCommand(MCUControlSurface.MCU_CC_VPOT1 + i, 1, commandID);
        }
    }
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) MCUControlSurface(de.mossgrabers.mcu.controller.MCUControlSurface) PlayPositionTempoCommand(de.mossgrabers.mcu.command.continuous.PlayPositionTempoCommand)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)1 PlayPositionTempoCommand (de.mossgrabers.mcu.command.continuous.PlayPositionTempoCommand)1 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)1