Search in sources :

Example 56 with IChannel

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

the class DeviceLayerModePan method onKnobTouch.

/**
 * {@inheritDoc}
 */
@Override
public void onKnobTouch(final int index, final boolean isTouched) {
    this.isKnobTouched[index] = isTouched;
    // Drum Pad Bank has size of 16, layers only 8
    final int offset = this.getDrumPadIndex();
    final IChannel layer = this.bank.getItem(offset + index);
    if (!layer.doesExist())
        return;
    if (isTouched && this.surface.isDeletePressed()) {
        this.surface.setTriggerConsumed(ButtonID.DELETE);
        layer.resetPan();
    }
    layer.touchPan(isTouched);
    this.checkStopAutomationOnKnobRelease(isTouched);
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel)

Example 57 with IChannel

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

the class PlayView method getDrumPadColor.

private int getDrumPadColor(final int index) {
    final int offsetY = this.scales.getDrumOffset();
    // Selected?
    if (this.pressedKeys[offsetY + index] > 0 || this.selectedPad == index)
        return SLControlSurface.MKII_BUTTON_STATE_ON;
    // Exists and active?
    final IDrumDevice primary = this.model.getDrumDevice();
    final IDrumPadBank drumPadBank = primary.getDrumPadBank();
    final boolean isSoloed = primary.hasDrumPads() && drumPadBank.hasSoloedPads();
    final IChannel drumPad = drumPadBank.getItem(index);
    if (!drumPad.doesExist() || !drumPad.isActivated())
        return SLControlSurface.MKII_BUTTON_STATE_OFF;
    // Muted or soloed?
    if (drumPad.isMute() || isSoloed && !drumPad.isSolo())
        return SLControlSurface.MKII_BUTTON_STATE_OFF;
    return SLControlSurface.MKII_BUTTON_STATE_OFF;
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) IDrumDevice(de.mossgrabers.framework.daw.data.IDrumDevice) IDrumPadBank(de.mossgrabers.framework.daw.data.bank.IDrumPadBank)

Aggregations

IChannel (de.mossgrabers.framework.daw.data.IChannel)57 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)25 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)9 ISend (de.mossgrabers.framework.daw.data.ISend)9 PushConfiguration (de.mossgrabers.push.PushConfiguration)7 ITrack (de.mossgrabers.framework.daw.data.ITrack)6 Display (de.mossgrabers.framework.controller.display.Display)5 IDrumPadBank (de.mossgrabers.framework.daw.data.bank.IDrumPadBank)5 ModeManager (de.mossgrabers.framework.mode.ModeManager)4 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)3 ILayer (de.mossgrabers.framework.daw.data.ILayer)3 ISpecificDevice (de.mossgrabers.framework.daw.data.ISpecificDevice)3 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)3 PushDisplay (de.mossgrabers.push.controller.PushDisplay)3 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)2 TitleChannelsComponent (de.mossgrabers.controller.akai.fire.graphics.canvas.component.TitleChannelsComponent)2 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)2 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)2 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)2 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)2