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