Search in sources :

Example 11 with IApplication

use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.

the class FrameMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final IApplication app = this.model.getApplication();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    for (int i = 0; i < FrameMode.ARRANGER1.length; i++) message.addOptionElement(app.isArrangeLayout() ? FrameMode.ARRANGER1[i] : app.isMixerLayout() ? FrameMode.MIXER1[i] : "", app.isArrangeLayout() ? FrameMode.ARRANGER2[i] : app.isMixerLayout() ? FrameMode.MIXER2[i] : "", this.getSecondRowButtonState(i) > 0, FrameMode.LAYOUTS1[i], FrameMode.LAYOUTS2[i], this.getFirstRowButtonState(i), false);
    display.send(message);
}
Also used : IApplication(de.mossgrabers.framework.daw.IApplication) PushDisplay(de.mossgrabers.push.controller.PushDisplay) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Example 12 with IApplication

use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.

the class LayoutModule method flush.

/**
 * {@inheritDoc}
 */
@Override
public void flush(final boolean dump) {
    final IApplication app = this.model.getApplication();
    this.writer.sendOSC("/layout", app.getPanelLayout().toLowerCase(Locale.US), dump);
    final IArranger arrange = this.model.getArranger();
    this.writer.sendOSC("/arranger/cueMarkerVisibility", arrange.areCueMarkersVisible(), dump);
    this.writer.sendOSC("/arranger/playbackFollow", arrange.isPlaybackFollowEnabled(), dump);
    this.writer.sendOSC("/arranger/trackRowHeight", arrange.hasDoubleRowTrackHeight(), dump);
    this.writer.sendOSC("/arranger/clipLauncherSectionVisibility", arrange.isClipLauncherVisible(), dump);
    this.writer.sendOSC("/arranger/timeLineVisibility", arrange.isTimelineVisible(), dump);
    this.writer.sendOSC("/arranger/ioSectionVisibility", arrange.isIoSectionVisible(), dump);
    this.writer.sendOSC("/arranger/effectTracksVisibility", arrange.areEffectTracksVisible(), dump);
    final IMixer mix = this.model.getMixer();
    this.writer.sendOSC("/mixer/clipLauncherSectionVisibility", mix.isClipLauncherSectionVisible(), dump);
    this.writer.sendOSC("/mixer/crossFadeSectionVisibility", mix.isCrossFadeSectionVisible(), dump);
    this.writer.sendOSC("/mixer/deviceSectionVisibility", mix.isDeviceSectionVisible(), dump);
    this.writer.sendOSC("/mixer/sendsSectionVisibility", mix.isSendSectionVisible(), dump);
    this.writer.sendOSC("/mixer/ioSectionVisibility", mix.isIoSectionVisible(), dump);
    this.writer.sendOSC("/mixer/meterSectionVisibility", mix.isMeterSectionVisible(), dump);
}
Also used : IMixer(de.mossgrabers.framework.daw.IMixer) IApplication(de.mossgrabers.framework.daw.IApplication) IArranger(de.mossgrabers.framework.daw.IArranger)

Example 13 with IApplication

use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.

the class FrameMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2(final IGraphicDisplay display) {
    final IApplication app = this.model.getApplication();
    String[][] options;
    if (app.isArrangeLayout())
        options = ARRANGER_OPTIONS;
    else if (app.isMixerLayout())
        options = MIXER_OPTIONS;
    else
        options = EMPTY_OPTIONS;
    for (int i = 0; i < 8; i++) display.addOptionElement(options[0][i], options[1][i], this.getSecondRowButtonState(i) > 0, FrameMode.LAYOUTS1[i], FrameMode.LAYOUTS2[i], this.getFirstRowButtonState(i), false);
}
Also used : IApplication(de.mossgrabers.framework.daw.IApplication)

Example 14 with IApplication

use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.

the class MaschineJamSessionViewCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    final ViewManager viewManager = this.surface.getViewManager();
    final SessionView sessionView = (SessionView) viewManager.get(Views.SESSION);
    final Configuration configuration = this.surface.getConfiguration();
    if (event == ButtonEvent.UP) {
        // Toggle Arrange and Mix panel layout
        if (this.surface.isShiftPressed()) {
            final IApplication application = this.model.getApplication();
            final boolean isArrange = IApplication.PANEL_LAYOUT_ARRANGE.equals(application.getPanelLayout());
            application.setPanelLayout(isArrange ? IApplication.PANEL_LAYOUT_MIX : IApplication.PANEL_LAYOUT_ARRANGE);
            return;
        }
        if (viewManager.isActive(Views.SESSION)) {
            // Disable birds-eye-view if active
            if (sessionView.isBirdsEyeActive()) {
                sessionView.setBirdsEyeActive(false);
                this.notifyViewName(false, configuration.isFlipSession());
                return;
            }
            // Flip clips
            final boolean flipped = !configuration.isFlipSession();
            configuration.setFlipSession(flipped);
            this.notifyViewName(false, flipped);
            return;
        }
        // Activate session view
        viewManager.setActive(Views.SESSION);
        this.notifyViewName(false, configuration.isFlipSession());
    } else if (event == ButtonEvent.LONG) {
        // Only trigger birds-eye-view if session view is already active
        this.surface.setTriggerConsumed(ButtonID.SESSION);
        sessionView.setBirdsEyeActive(true);
        this.notifyViewName(true, configuration.isFlipSession());
    }
}
Also used : IApplication(de.mossgrabers.framework.daw.IApplication) Configuration(de.mossgrabers.framework.configuration.Configuration) MaschineJamConfiguration(de.mossgrabers.controller.ni.maschine.jam.MaschineJamConfiguration) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) SessionView(de.mossgrabers.controller.ni.maschine.jam.view.SessionView)

Example 15 with IApplication

use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.

the class AddTrackCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (event != ButtonEvent.DOWN)
        return;
    ITrackBank tb = this.model.getTrackBank();
    final IApplication application = this.model.getApplication();
    if (this.combi1 != null && this.surface.isPressed(this.combi1)) {
        application.addEffectTrack();
        tb = this.model.getEffectTrackBank();
        if (tb == null)
            return;
    } else if (this.combi2 != null && this.surface.isPressed(this.combi2))
        this.model.getTrackBank().addChannel(ChannelType.AUDIO);
    else
        this.model.getTrackBank().addChannel(ChannelType.INSTRUMENT);
    final ITrackBank bank = tb;
    this.surface.scheduleTask(() -> {
        final int pos = bank.getItemCount() - 1;
        if (pos < 0) {
            this.surface.errorln("Warning: No track created.");
            return;
        }
        bank.scrollTo(pos);
        bank.getItem(pos % bank.getPageSize()).select();
    }, 200);
}
Also used : IApplication(de.mossgrabers.framework.daw.IApplication) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Aggregations

IApplication (de.mossgrabers.framework.daw.IApplication)15 IArranger (de.mossgrabers.framework.daw.IArranger)5 IMixer (de.mossgrabers.framework.daw.IMixer)4 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)3 Display (de.mossgrabers.framework.controller.display.Display)2 ITransport (de.mossgrabers.framework.daw.ITransport)2 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 ITrack (de.mossgrabers.framework.daw.data.ITrack)2 PushDisplay (de.mossgrabers.push.controller.PushDisplay)2 MaschineJamConfiguration (de.mossgrabers.controller.ni.maschine.jam.MaschineJamConfiguration)1 SessionView (de.mossgrabers.controller.ni.maschine.jam.view.SessionView)1 UnknownCommandException (de.mossgrabers.controller.osc.exception.UnknownCommandException)1 Configuration (de.mossgrabers.framework.configuration.Configuration)1 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)1 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)1 ISceneBank (de.mossgrabers.framework.daw.ISceneBank)1 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)1 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)1 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)1 ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)1