use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class CrossfadeModeCommand method executeNormal.
/**
* {@inheritDoc}
*/
@Override
public void executeNormal(final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final IParameter crossfadeParameter = this.model.getCurrentTrackBank().getItem(this.index).getCrossfadeParameter();
final double value = this.model.getValueChanger().toNormalizedValue(crossfadeParameter.getValue()) + 0.5;
crossfadeParameter.setNormalizedValue(value > 1.1 ? 0 : value);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class UserMode method onKnobTouch.
/**
* {@inheritDoc}
*/
@Override
public void onKnobTouch(final int index, final boolean isTouched) {
this.isKnobTouched[index] = isTouched;
final IParameter param = this.model.getUserParameterBank().getItem(index);
if (!param.doesExist())
return;
if (isTouched && this.surface.isDeletePressed()) {
this.surface.setTriggerConsumed(ButtonID.DELETE);
param.resetValue();
}
param.touchValue(isTouched);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class TrackCrossfadeAMode method executeMethod.
/**
* {@inheritDoc}
*/
@Override
protected void executeMethod(final ITrack track) {
final IParameter crossfadeParameter = track.getCrossfadeParameter();
final double v = this.model.getValueChanger().toNormalizedValue(crossfadeParameter.getValue());
crossfadeParameter.setNormalizedValue(v < 0.1 ? 0.5 : 0);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class SelectedDeviceMode method onKnobValue.
/**
* {@inheritDoc}
*/
@Override
public void onKnobValue(final int index, final int value) {
final ICursorDevice cursorDevice = this.model.getCursorDevice();
if (cursorDevice == null)
return;
final IParameter item = cursorDevice.getParameterBank().getItem(index < 0 ? this.selParam : index);
if (item.doesExist())
item.changeValue(value);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class SelectedDeviceMode method onKnobTouch.
/**
* {@inheritDoc}
*/
@Override
public void onKnobTouch(final int index, final boolean isTouched) {
final ICursorDevice cursorDevice = this.model.getCursorDevice();
if (cursorDevice == null)
return;
final IParameter item = cursorDevice.getParameterBank().getItem(index < 0 ? this.selParam : index);
if (!item.doesExist())
return;
if (isTouched && this.surface.isDeletePressed()) {
this.surface.setTriggerConsumed(ButtonID.DELETE);
item.resetValue();
}
item.touchValue(isTouched);
}
Aggregations