Search in sources :

Example 71 with IChannelBank

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

the class AbstractTrackMode method drawTrackHeader.

protected boolean drawTrackHeader() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final Display d = this.surface.getDisplay().clear();
    // Format track names
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        final String name = t.getName();
        d.setCell(0, i, StringUtils.shortenAndFixASCII(name, 6));
    }
    d.done(0);
    return true;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 72 with IChannelBank

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

the class PanMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final Display d = this.surface.getDisplay();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        d.setCell(1, i, t.getPanStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 73 with IChannelBank

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

the class TrackMode method resetParameter.

/**
 * {@inheritDoc}
 */
@Override
protected void resetParameter(final int index) {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack selectedTrack = tb.getSelectedTrack();
    if (selectedTrack == null)
        return;
    switch(index) {
        case 0:
            selectedTrack.resetVolume();
            break;
        case 1:
            selectedTrack.resetPan();
            break;
        case 2:
            if (this.surface.getConfiguration().isDisplayCrossfader())
                selectedTrack.setCrossfadeMode("AB");
            else if (!this.model.isEffectTrackBankActive())
                selectedTrack.getSend(0).resetValue();
            break;
        default:
            if (!this.model.isEffectTrackBankActive())
                selectedTrack.getSend(index - (this.surface.getConfiguration().isDisplayCrossfader() ? 3 : 2)).resetValue();
            break;
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Example 74 with IChannelBank

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

the class VolumeMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final Display d = this.surface.getDisplay();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        d.setCell(1, i, t.getVolumeStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 75 with IChannelBank

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

the class DrumViewBase method onScene.

/**
 * {@inheritDoc}
 */
@Override
public void onScene(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.DOWN || !this.model.canSelectedTrackHoldNotes())
        return;
    if (!this.surface.isShiftPressed()) {
        super.onScene(index, event);
        return;
    }
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack selectedTrack = tb.getSelectedTrack();
    if (selectedTrack != null)
        this.onLowerScene(index);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank)

Aggregations

IChannelBank (de.mossgrabers.framework.daw.IChannelBank)114 ITrack (de.mossgrabers.framework.daw.data.ITrack)92 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)22 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)20 ModeManager (de.mossgrabers.framework.mode.ModeManager)20 PushConfiguration (de.mossgrabers.push.PushConfiguration)19 Display (de.mossgrabers.framework.controller.display.Display)18 ISend (de.mossgrabers.framework.daw.data.ISend)11 ViewManager (de.mossgrabers.framework.view.ViewManager)10 PushDisplay (de.mossgrabers.push.controller.PushDisplay)10 IChannel (de.mossgrabers.framework.daw.data.IChannel)9 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)7 ISlot (de.mossgrabers.framework.daw.data.ISlot)7 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)5 View (de.mossgrabers.framework.view.View)5 DisplayMessage (de.mossgrabers.push.controller.DisplayMessage)5 ITransport (de.mossgrabers.framework.daw.ITransport)4 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)4 ColorManager (de.mossgrabers.framework.controller.color.ColorManager)3 PadGrid (de.mossgrabers.framework.controller.grid.PadGrid)3