use of de.mossgrabers.framework.parameterprovider.IParameterProvider in project DrivenByMoss by git-moss.
the class BaseMode method bindControls.
/**
* {@inheritDoc}
*/
@Override
protected void bindControls() {
if (!this.isActive || this.defaultParameterProvider == null)
return;
super.bindControls();
final IParameterProvider parameterProvider;
if (this.surface.getConfiguration().useFadersAsKnobs())
parameterProvider = this.getParameterProvider();
else
parameterProvider = ((AbstractMode<?, ?, ?>) this.surface.getModeManager().get(Modes.VOLUME)).getParameterProvider();
for (int i = 0; i < this.controls.size(); i++) this.surface.getContinuous(ContinuousID.get(ContinuousID.FADER1, i)).bind(parameterProvider.get(i));
}
use of de.mossgrabers.framework.parameterprovider.IParameterProvider in project DrivenByMoss by git-moss.
the class AbstractMode method getKnobValue.
/**
* {@inheritDoc}
*/
@Override
public int getKnobValue(final int index) {
final IParameterProvider parameterProvider = this.getParameterProvider();
if (parameterProvider == null)
return -1;
final IParameter param = parameterProvider.get(index);
return param.doesExist() ? param.getValue() : -1;
}
Aggregations