use of de.mossgrabers.push.PushConfiguration in project DrivenByMoss by git-moss.
the class VolumeMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final IChannelBank tb = this.model.getCurrentTrackBank();
final PushConfiguration config = this.surface.getConfiguration();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(i);
d.setCell(0, i, t.doesExist() ? "Volume" : "").setCell(1, i, t.getVolumeStr(8));
if (t.doesExist())
d.setCell(2, i, config.isEnableVUMeters() ? t.getVu() : t.getVolume(), Format.FORMAT_VALUE);
else
d.clearCell(2, i);
}
d.done(0).done(1).done(2);
this.drawRow4();
}
use of de.mossgrabers.push.PushConfiguration in project DrivenByMoss by git-moss.
the class TrackCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final PushConfiguration config = this.surface.getConfiguration();
if (this.surface.isShiftPressed()) {
config.setVUMetersEnabled(!config.isEnableVUMeters());
return;
}
final ModeManager modeManager = this.surface.getModeManager();
final Integer currentMode = modeManager.getActiveModeId();
if (currentMode != null) {
if (config.isPush2()) {
if (Modes.MODE_TRACK.equals(currentMode) || Modes.MODE_VOLUME.equals(currentMode) || Modes.MODE_CROSSFADER.equals(currentMode) || Modes.MODE_PAN.equals(currentMode)) {
this.model.toggleCurrentTrackBank();
} else if (currentMode.intValue() >= Modes.MODE_SEND1.intValue() && currentMode.intValue() <= Modes.MODE_SEND8.intValue()) {
modeManager.setActiveMode(Modes.MODE_TRACK);
this.model.toggleCurrentTrackBank();
} else
modeManager.setActiveMode(config.getCurrentMixMode());
} else {
// Layer mode selection for Push 1
if (this.surface.isSelectPressed() && Modes.isLayerMode(currentMode)) {
modeManager.setActiveMode(Modes.MODE_DEVICE_LAYER);
return;
}
if (currentMode == Modes.MODE_TRACK)
this.model.toggleCurrentTrackBank();
else
modeManager.setActiveMode(Modes.MODE_TRACK);
}
} else
modeManager.setActiveMode(Modes.MODE_TRACK);
config.setDebugMode(modeManager.getActiveModeId());
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack track = tb.getSelectedTrack();
if (track == null)
tb.getTrack(0).select();
}
use of de.mossgrabers.push.PushConfiguration in project DrivenByMoss by git-moss.
the class AccentMode method onValueKnob.
/**
* {@inheritDoc}
*/
@Override
public void onValueKnob(final int index, final int value) {
// Will never need fine increments on accent velocity since they are integers
final IValueChanger valueChanger = this.model.getValueChanger();
final PushConfiguration config = this.surface.getConfiguration();
final int fixedAccentValue = config.getFixedAccentValue();
config.setAccentValue(Math.max(1, valueChanger.changeValue(value, fixedAccentValue, 1, 128)));
}
Aggregations