Search in sources :

Example 6 with ITrack

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

the class TrackView method scrollTracksLeft.

private void scrollTracksLeft() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    if (!tb.canScrollTracksUp())
        return;
    final ITrack sel = tb.getSelectedTrack();
    final int index = sel == null ? 0 : sel.getIndex() - 1;
    tb.scrollTracksPageUp();
    final int newSel = index == -1 || sel == null ? 7 : sel.getIndex();
    this.surface.scheduleTask(() -> this.selectTrack(newSel), 100);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Example 7 with ITrack

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

the class BeatstepControllerSetup method updateIndication.

private void updateIndication() {
    final BeatstepControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    final boolean isTrack = viewManager.isActiveView(Views.VIEW_TRACK);
    final boolean isDevice = viewManager.isActiveView(Views.VIEW_DEVICE);
    final boolean isSession = viewManager.isActiveView(Views.VIEW_SESSION);
    final IMasterTrack mt = this.model.getMasterTrack();
    mt.setVolumeIndication(!isDevice);
    final ITrackBank tb = this.model.getTrackBank();
    final ITrack selectedTrack = tb.getSelectedTrack();
    final IChannelBank tbe = this.model.getEffectTrackBank();
    final ITrack selectedFXTrack = tbe.getSelectedTrack();
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    final boolean isEffect = this.model.isEffectTrackBankActive();
    tb.setIndication(!isEffect && isSession);
    tbe.setIndication(isEffect && isSession);
    for (int i = 0; i < 8; i++) {
        final boolean hasTrackSel = selectedTrack != null && selectedTrack.getIndex() == i;
        final ITrack track = tb.getTrack(i);
        track.setVolumeIndication(!isEffect && hasTrackSel && !isDevice);
        track.setPanIndication(!isEffect && hasTrackSel && !isDevice);
        for (int j = 0; j < 6; j++) track.getSend(j).setIndication(!isEffect && hasTrackSel && isTrack);
        final boolean hasFXTrackSel = selectedFXTrack != null && selectedFXTrack.getIndex() == i;
        final ITrack fxTrack = tbe.getTrack(i);
        fxTrack.setVolumeIndication(isEffect && hasFXTrackSel && isTrack);
        fxTrack.setPanIndication(isEffect && hasFXTrackSel && isTrack);
        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) ViewManager(de.mossgrabers.framework.view.ViewManager) BeatstepControlSurface(de.mossgrabers.beatstep.controller.BeatstepControlSurface) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 8 with ITrack

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

the class ModelImpl method canConvertClip.

/**
 * {@inheritDoc}
 */
@Override
public boolean canConvertClip() {
    final IChannelBank tb = this.getCurrentTrackBank();
    final ITrack selectedTrack = tb.getSelectedTrack();
    if (selectedTrack == null)
        return false;
    final ISlot[] slots = selectedTrack.getSelectedSlots();
    if (slots.length == 0)
        return false;
    for (final ISlot slot : slots) {
        if (slot.hasContent())
            return true;
    }
    return false;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISlot(de.mossgrabers.framework.daw.data.ISlot)

Example 9 with ITrack

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

the class AbstractPlayView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final boolean isKeyboardEnabled = this.model.canSelectedTrackHoldNotes();
    final boolean isRecording = this.model.hasRecordingState();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack selectedTrack = tb.getSelectedTrack();
    final PadGrid gridPad = this.surface.getPadGrid();
    for (int i = this.scales.getStartNote(); i < this.scales.getEndNote(); i++) gridPad.light(i, this.getGridColor(isKeyboardEnabled, isRecording, selectedTrack, i));
}
Also used : PadGrid(de.mossgrabers.framework.controller.grid.PadGrid) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Example 10 with ITrack

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

the class CursorCommand method scrollTracksRight.

protected void scrollTracksRight() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack sel = tb.getSelectedTrack();
    final int index = sel == null ? 0 : sel.getIndex() + 1;
    if (index == 8 || this.surface.isShiftPressed()) {
        this.scrollTrackBankRight(sel, index);
        return;
    }
    this.selectTrack(index);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Aggregations

ITrack (de.mossgrabers.framework.daw.data.ITrack)312 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)92 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)84 ISend (de.mossgrabers.framework.daw.data.ISend)40 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)25 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)19 ISlot (de.mossgrabers.framework.daw.data.ISlot)19 Display (de.mossgrabers.framework.controller.display.Display)18 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)18 ModeManager (de.mossgrabers.framework.mode.ModeManager)18 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)16 ViewManager (de.mossgrabers.framework.view.ViewManager)16 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)15 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)15 PushConfiguration (de.mossgrabers.push.PushConfiguration)14 ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)12 IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)11 PushDisplay (de.mossgrabers.push.controller.PushDisplay)11 ITransport (de.mossgrabers.framework.daw.ITransport)9 IParameter (de.mossgrabers.framework.daw.data.IParameter)9