use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class DeviceHandler method handleParameter.
private void handleParameter(final KnobMode knobMode, final int index, final MidiValue value) {
final IParameter fxParam = this.model.getCursorDevice().getParameterBank().getItem(index);
final int val = value.getValue();
if (isAbsolute(knobMode))
fxParam.setValue(this.getAbsoluteValueChanger(value), val);
else
fxParam.changeValue(this.getRelativeValueChanger(knobMode), val);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class FxTrackHandler method changeTrackPanorama.
private void changeTrackPanorama(final KnobMode knobMode, final int trackIndex, final MidiValue value) {
final Optional<ITrack> track = this.getTrack(trackIndex);
if (track.isEmpty())
return;
final IParameter panParameter = track.get().getPanParameter();
final int val = value.getValue();
if (isAbsolute(knobMode))
panParameter.setValue(this.getAbsoluteValueChanger(value), val);
else
panParameter.changeValue(this.getRelativeValueChanger(knobMode), val);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class MasterHandler method changeMasterPanorama.
private void changeMasterPanorama(final KnobMode knobMode, final MidiValue value) {
final ITrack track = this.model.getMasterTrack();
final int val = value.getValue();
final IParameter panParameter = track.getPanParameter();
if (isAbsolute(knobMode))
panParameter.setValue(this.getAbsoluteValueChanger(value), val);
else
panParameter.changeValue(this.getRelativeValueChanger(knobMode), val);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class MasterHandler method changeMasterVolume.
private void changeMasterVolume(final KnobMode knobMode, final MidiValue value) {
final ITrack track = this.model.getMasterTrack();
final int val = value.getValue();
final IParameter volumeParameter = track.getVolumeParameter();
if (isAbsolute(knobMode))
volumeParameter.setValue(this.getAbsoluteValueChanger(value), val);
else
volumeParameter.changeValue(this.getRelativeValueChanger(knobMode), val);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class ShuffleView method getNumber.
/**
* {@inheritDoc}}
*/
@Override
protected int getNumber() {
final int max = this.model.getValueChanger().getUpperBound() - 1;
final IParameter parameter = this.model.getGroove().getParameter(GrooveParameterID.SHUFFLE_AMOUNT);
return parameter == null ? 0 : (int) (parameter.getValue() * 100.0 / max);
}
Aggregations