use of de.mossgrabers.controller.akai.fire.FireConfiguration in project DrivenByMoss by git-moss.
the class StepSequencerSelectCommand method executeShifted.
/**
* {@inheritDoc}}
*/
@Override
public void executeShifted(final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final FireConfiguration configuration = this.surface.getConfiguration();
configuration.setAccentEnabled(!configuration.isAccentActive());
}
use of de.mossgrabers.controller.akai.fire.FireConfiguration in project DrivenByMoss by git-moss.
the class FireSelectButtonCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
if (velocity > 0)
return;
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActive(Modes.NOTE)) {
((NoteMode) modeManager.get(Modes.NOTE)).resetTranspose();
return;
}
if (modeManager.isActive(Modes.BROWSER)) {
((FireBrowserCommand) this.surface.getButton(ButtonID.BROWSE).getCommand()).discardBrowser(true);
return;
}
final FireConfiguration configuration = this.surface.getConfiguration();
final ICursorDevice cursorDevice = this.model.getCursorDevice();
if (modeManager.isActive(Modes.DEVICE_PARAMS) && configuration.isDeleteModeActive()) {
cursorDevice.remove();
configuration.toggleDeleteModeActive();
return;
}
cursorDevice.toggleWindowOpen();
}
use of de.mossgrabers.controller.akai.fire.FireConfiguration in project DrivenByMoss by git-moss.
the class SessionView method handleButtonCombinations.
/**
* {@inheritDoc}
*/
@Override
protected boolean handleButtonCombinations(final ITrack track, final ISlot slot) {
final boolean result = super.handleButtonCombinations(track, slot);
if (result)
return true;
// Stop clip with normal stop button
if (this.isButtonCombination(ButtonID.STOP)) {
track.stop();
return true;
}
final FireConfiguration configuration = this.surface.getConfiguration();
if (this.isButtonCombination(ButtonID.DELETE) && configuration.isDeleteModeActive()) {
configuration.toggleDeleteModeActive();
return true;
}
if (this.isButtonCombination(ButtonID.DUPLICATE) && configuration.isDuplicateModeActive() && (!slot.doesExist() || !slot.hasContent())) {
configuration.toggleDuplicateModeActive();
return true;
}
return false;
}
use of de.mossgrabers.controller.akai.fire.FireConfiguration in project DrivenByMoss by git-moss.
the class MixView method onGridNote.
/**
* {@inheritDoc}
*/
@Override
public void onGridNote(final int note, final int velocity) {
if (velocity == 0)
return;
final int n = note - 36;
final int index = n % 16;
final int what = n / 16;
final ITrack track = this.model.getCurrentTrackBank().getItem(index);
switch(what) {
case 3:
final FireConfiguration configuration = this.surface.getConfiguration();
if (configuration.isDeleteModeActive()) {
configuration.toggleDeleteModeActive();
track.remove();
} else if (configuration.isDuplicateModeActive()) {
configuration.toggleDuplicateModeActive();
track.duplicate();
} else
track.select();
break;
case 2:
track.toggleMute();
break;
case 1:
track.toggleSolo();
break;
case 0:
track.toggleRecArm();
break;
default:
// Not used
break;
}
}
Aggregations