Search in sources :

Example 1 with AbstractMode

use of de.mossgrabers.framework.featuregroup.AbstractMode 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));
}
Also used : IParameterProvider(de.mossgrabers.framework.parameterprovider.IParameterProvider) AbstractMode(de.mossgrabers.framework.featuregroup.AbstractMode)

Aggregations

AbstractMode (de.mossgrabers.framework.featuregroup.AbstractMode)1 IParameterProvider (de.mossgrabers.framework.parameterprovider.IParameterProvider)1