Search in sources :

Example 16 with ITrackBank

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

the class APCControllerSetup method updateIndication.

private void updateIndication(final Integer mode) {
    final ITrackBank tb = this.model.getTrackBank();
    final IChannelBank tbe = this.model.getEffectTrackBank();
    final APCControlSurface surface = this.getSurface();
    final boolean isSession = surface.getViewManager().isActiveView(Views.VIEW_SESSION);
    final boolean isEffect = this.model.isEffectTrackBankActive();
    final boolean isPan = mode == Modes.MODE_PAN;
    tb.setIndication(!isEffect && isSession);
    tbe.setIndication(isEffect && isSession);
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        track.setVolumeIndication(!isEffect);
        track.setPanIndication(!isEffect && isPan);
        for (int j = 0; j < 8; j++) track.getSend(j).setIndication(!isEffect && (mode == Modes.MODE_SEND1 && j == 0 || mode == Modes.MODE_SEND2 && j == 1 || mode == Modes.MODE_SEND3 && j == 2 || mode == Modes.MODE_SEND4 && j == 3 || mode == Modes.MODE_SEND5 && j == 4 || mode == Modes.MODE_SEND6 && j == 5 || mode == Modes.MODE_SEND7 && j == 6 || mode == Modes.MODE_SEND8 && j == 7));
        final ITrack fxTrack = tbe.getTrack(i);
        fxTrack.setVolumeIndication(isEffect);
        fxTrack.setPanIndication(isEffect && isPan);
        cursorDevice.indicateParameter(i, true);
    }
}
Also used : APCControlSurface(de.mossgrabers.apc.controller.APCControlSurface) ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.ITrackBank) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 17 with ITrackBank

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

the class APCminiControllerSetup method createModel.

/**
 * {@inheritDoc}
 */
@Override
protected void createModel() {
    this.model = this.factory.createModel(this.colorManager, this.valueChanger, this.scales, 8, 8, 8, 16, 16, true, -1, -1, -1, -1);
    final ITrackBank trackBank = this.model.getTrackBank();
    trackBank.setIndication(true);
    trackBank.addTrackSelectionObserver(this::handleTrackChange);
}
Also used : ITrackBank(de.mossgrabers.framework.daw.ITrackBank)

Example 18 with ITrackBank

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

the class LaunchpadControllerSetup method createModel.

/**
 * {@inheritDoc}
 */
@Override
protected void createModel() {
    this.model = this.factory.createModel(this.colorManager, this.valueChanger, this.scales, 8, 8, 8, 16, 16, true, -1, -1, -1, -1);
    final ITrackBank trackBank = this.model.getTrackBank();
    trackBank.addTrackSelectionObserver(this::handleTrackChange);
}
Also used : ITrackBank(de.mossgrabers.framework.daw.ITrackBank)

Example 19 with ITrackBank

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

the class LaunchpadControllerSetup method updateIndication.

private void updateIndication() {
    final ViewManager viewManager = this.getSurface().getViewManager();
    final boolean isVolume = viewManager.isActiveView(Views.VIEW_VOLUME);
    final boolean isPan = viewManager.isActiveView(Views.VIEW_PAN);
    final boolean isSends = viewManager.isActiveView(Views.VIEW_SENDS);
    final boolean isDevice = viewManager.isActiveView(Views.VIEW_DEVICE);
    final ITrackBank tb = this.model.getTrackBank();
    final IChannelBank tbe = this.model.getEffectTrackBank();
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    final View view = viewManager.getActiveView();
    final int selSend = view instanceof SendsView ? ((SendsView) view).getSelectedSend() : -1;
    final boolean isSession = view instanceof SessionView && !isVolume && !isPan && !isSends;
    final boolean isEffect = this.model.isEffectTrackBankActive();
    tb.setIndication(!isEffect && isSession);
    tbe.setIndication(isEffect && isSession);
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        track.setVolumeIndication(!isEffect && isVolume);
        track.setPanIndication(!isEffect && isPan);
        for (int j = 0; j < 8; j++) track.getSend(j).setIndication(!isEffect && isSends && selSend == j);
        final ITrack fxTrack = tbe.getTrack(i);
        fxTrack.setVolumeIndication(isEffect && isVolume);
        fxTrack.setPanIndication(isEffect && isPan);
        cursorDevice.indicateParameter(i, isDevice);
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.ITrackBank) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) SendsView(de.mossgrabers.launchpad.view.SendsView) ViewManager(de.mossgrabers.framework.view.ViewManager) SessionView(de.mossgrabers.launchpad.view.SessionView) VolumeView(de.mossgrabers.launchpad.view.VolumeView) SessionView(de.mossgrabers.launchpad.view.SessionView) SequencerView(de.mossgrabers.launchpad.view.SequencerView) SceneView(de.mossgrabers.framework.view.SceneView) DeviceView(de.mossgrabers.launchpad.view.DeviceView) View(de.mossgrabers.framework.view.View) PanView(de.mossgrabers.launchpad.view.PanView) RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) BrowserView(de.mossgrabers.launchpad.view.BrowserView) DrumView(de.mossgrabers.launchpad.view.DrumView) SendsView(de.mossgrabers.launchpad.view.SendsView) ShiftView(de.mossgrabers.launchpad.view.ShiftView) PlayView(de.mossgrabers.launchpad.view.PlayView) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 20 with ITrackBank

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

the class AbstractTrackMode method updateTrackMenu.

protected void updateTrackMenu() {
    final PushConfiguration config = this.surface.getConfiguration();
    final int sendOffset = config.isSendsAreToggled() ? 4 : 0;
    if (this.model.isEffectTrackBankActive()) {
        // No sends for FX tracks
        for (int i = 3; i < 7; i++) this.menu[i] = " ";
        return;
    }
    this.menu[2] = config.isDisplayCrossfader() ? "Crossfader" : " ";
    final IChannelBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 3; i++) {
        this.menu[4 + i] = tb.getEditSendName(sendOffset + i);
        if (this.menu[4 + i].isEmpty())
            this.menu[4 + i] = " ";
    }
    this.menu[3] = config.isSendsAreToggled() ? "Sends 5-8" : "Sends 1-4";
    this.menu[7] = tb instanceof ITrackBank && ((ITrackBank) tb).hasParent() ? "Up" : " ";
}
Also used : PushConfiguration(de.mossgrabers.push.PushConfiguration) ITrackBank(de.mossgrabers.framework.daw.ITrackBank) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Aggregations

ITrackBank (de.mossgrabers.framework.daw.ITrackBank)25 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)20 ITrack (de.mossgrabers.framework.daw.data.ITrack)18 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)7 PushConfiguration (de.mossgrabers.push.PushConfiguration)5 ModeManager (de.mossgrabers.framework.mode.ModeManager)4 ViewManager (de.mossgrabers.framework.view.ViewManager)4 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)3 DisplayMessage (de.mossgrabers.push.controller.DisplayMessage)3 PushDisplay (de.mossgrabers.push.controller.PushDisplay)3 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 ISend (de.mossgrabers.framework.daw.data.ISend)2 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)2 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)1 APCminiControlSurface (de.mossgrabers.apcmini.controller.APCminiControlSurface)1 BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)1 IApplication (de.mossgrabers.framework.daw.IApplication)1 ISlot (de.mossgrabers.framework.daw.data.ISlot)1 SceneView (de.mossgrabers.framework.view.SceneView)1 View (de.mossgrabers.framework.view.View)1