use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class ToggleTrackBanksCommand method executeNormal.
/**
* {@inheritDoc}
*/
@Override
public void executeNormal(final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
this.model.toggleCurrentTrackBank();
final ITrackBank currentTrackBank = this.model.getCurrentTrackBank();
this.surface.getDisplay().notify(this.model.isEffectTrackBankActive() ? "Effect Tracks" : "Audio & Instrument Tracks");
if (currentTrackBank.getSelectedItem().isEmpty())
currentTrackBank.getItem(0).select();
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class AbstractTrackParameterProvider method addParametersObserver.
/**
* {@inheritDoc}
*/
@Override
public void addParametersObserver(final IParametersAdjustObserver observer) {
super.addParametersObserver(observer);
if (this.model == null) {
this.bank.addPageObserver(this);
return;
}
// Monitor the instrument/audio and effect track banks
this.model.getTrackBank().addPageObserver(this);
final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
if (effectTrackBank != null)
effectTrackBank.addPageObserver(this);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SelectedTrackParameterProvider method removeParametersObserver.
/**
* {@inheritDoc}
*/
@Override
public void removeParametersObserver(final IParametersAdjustObserver observer) {
super.removeParametersObserver(observer);
if (this.hasObservers())
return;
if (this.model == null) {
this.bank.removeSelectionObserver(this);
return;
}
this.model.getTrackBank().removeSelectionObserver(this);
final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
if (effectTrackBank != null)
effectTrackBank.removeSelectionObserver(this);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SelectedTrackParameterProvider method addParametersObserver.
/**
* {@inheritDoc}
*/
@Override
public void addParametersObserver(final IParametersAdjustObserver observer) {
super.addParametersObserver(observer);
if (this.model == null) {
this.bank.addSelectionObserver(this);
return;
}
this.model.getTrackBank().addSelectionObserver(this);
final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
if (effectTrackBank != null)
effectTrackBank.addSelectionObserver(this);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class ShiftView method getTrackButtonColor.
/**
* {@inheritDoc}
*/
@Override
public int getTrackButtonColor(final int index) {
final ITrackBank tb = this.model.getCurrentTrackBank();
final ISceneBank sceneBank = tb.getSceneBank();
final Modes mode = this.surface.getModeManager().getActiveID();
switch(index) {
case 0:
return sceneBank.canScrollPageBackwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 1:
return sceneBank.canScrollPageForwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 2:
return tb.canScrollPageBackwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 3:
return tb.canScrollPageForwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 4:
return Modes.VOLUME.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 5:
return Modes.PAN.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 6:
return Modes.isSendMode(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
case 7:
return Modes.DEVICE_PARAMS.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
default:
// Never reached
break;
}
return APCminiColorManager.APC_COLOR_BLACK;
}
Aggregations