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);
}
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;
}
Aggregations