Search in sources :

Example 6 with FaderConfig

use of de.mossgrabers.controller.ni.maschine.jam.controller.FaderConfig in project DrivenByMoss by git-moss.

the class MaschineJamSendMode method setupFader.

/**
 * {@inheritDoc}
 */
@Override
public FaderConfig setupFader(final int index) {
    if (this.model.isEffectTrackBankActive())
        return FADER_OFF;
    final Optional<ITrack> optionalTrack = this.getTrack(index);
    if (optionalTrack.isEmpty())
        return FADER_OFF;
    final ITrack track = optionalTrack.get();
    if (!track.doesExist())
        return FADER_OFF;
    final ISend send = track.getSendBank().getItem(this.sendIndex);
    if (!send.doesExist())
        return FADER_OFF;
    final int value = this.model.getValueChanger().toMidiValue(send.getValue());
    return new FaderConfig(FaderConfig.TYPE_SINGLE, MaschineColorManager.COLOR_DARK_GREY, value);
}
Also used : FaderConfig(de.mossgrabers.controller.ni.maschine.jam.controller.FaderConfig) ITrack(de.mossgrabers.framework.daw.data.ITrack) ISend(de.mossgrabers.framework.daw.data.ISend)

Aggregations

FaderConfig (de.mossgrabers.controller.ni.maschine.jam.controller.FaderConfig)6 ITrack (de.mossgrabers.framework.daw.data.ITrack)4 IParameter (de.mossgrabers.framework.daw.data.IParameter)2 ISend (de.mossgrabers.framework.daw.data.ISend)2 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)1 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)1