use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method setActive.
private void setActive(final boolean enable) {
final IMasterTrack mt = this.model.getMasterTrack();
mt.setVolumeIndication(enable);
mt.setPanIndication(enable);
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MastertrackTouchCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event) {
final boolean isTouched = event == ButtonEvent.DOWN;
// Avoid accidentally leaving the browser
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActiveMode(Modes.MODE_BROWSER))
return;
final IMasterTrack masterTrack = this.model.getMasterTrack();
masterTrack.touchVolume(isTouched);
if (this.surface.isDeletePressed()) {
this.surface.setButtonConsumed(PushControlSurface.PUSH_BUTTON_DELETE);
masterTrack.resetVolume();
return;
}
final boolean isMasterMode = modeManager.isActiveMode(Modes.MODE_MASTER);
if (isTouched && isMasterMode)
return;
if (isTouched)
modeManager.setActiveMode(Modes.MODE_MASTER_TEMP);
else if (!isMasterMode)
modeManager.restoreMode();
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class ColorView method onGridNote.
/**
* {@inheritDoc}
*/
@Override
public void onGridNote(final int note, final int velocity) {
if (velocity == 0)
return;
final int color = note - 36;
if (color < BitwigColors.BITWIG_COLORS.length) {
final double[] entry = BitwigColors.getColorEntry(BitwigColors.BITWIG_COLORS[color]);
switch(this.mode) {
case MODE_TRACK:
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack t = tb.getSelectedTrack();
if (t == null) {
final IMasterTrack master = this.model.getMasterTrack();
if (master.isSelected())
master.setColor(entry[0], entry[1], entry[2]);
} else
t.setColor(entry[0], entry[1], entry[2]);
break;
case MODE_LAYER:
final ICursorDevice cd = this.model.getCursorDevice();
final IChannel deviceChain = cd.getSelectedLayerOrDrumPad();
cd.setLayerOrDrumPadColor(deviceChain.getIndex(), entry[0], entry[1], entry[2]);
break;
case MODE_CLIP:
final ICursorClip clip = this.model.getCursorClip();
if (clip != null)
clip.setColor(entry[0], entry[1], entry[2]);
break;
}
}
this.surface.getViewManager().restoreView();
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final IMasterTrack master = this.model.getMasterTrack();
this.surface.getDisplay().setRow(0, MasterMode.PARAM_NAMES).clearRow(2).setCell(2, 0, master.getVolumeStr(8)).setCell(2, 1, master.getPanStr(8)).done(2);
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1(final ITextDisplay display) {
final IMasterTrack master = this.model.getMasterTrack();
final IProject project = this.model.getProject();
final boolean canEditCueVolume = this.model.getHost().supports(Capability.CUE_VOLUME);
display.setCell(0, 0, TAG_VOLUME).setCell(0, 1, "Pan");
if (canEditCueVolume)
display.setCell(0, 2, TAG_VOLUME).setCell(0, 3, "Mix");
display.setCell(0, 6, "Project:");
display.setCell(1, 0, master.getVolumeStr(8)).setCell(1, 1, master.getPanStr(8));
if (canEditCueVolume)
display.setCell(1, 2, project.getCueVolumeStr(8)).setCell(1, 3, project.getCueMixStr(8));
display.setBlock(1, 2, "Audio Engine").setBlock(1, 3, this.model.getProject().getName());
display.setCell(2, 0, this.surface.getConfiguration().isEnableVUMeters() ? master.getVu() : master.getVolume(), Format.FORMAT_VALUE);
display.setCell(2, 1, master.getPan(), Format.FORMAT_PAN);
if (canEditCueVolume) {
display.setCell(2, 2, project.getCueVolume(), Format.FORMAT_VALUE);
display.setCell(2, 3, project.getCueMix(), Format.FORMAT_VALUE);
display.setCell(3, 0, master.getName()).setCell(3, 2, "Cue");
}
display.setCell(3, 4, this.model.getApplication().isEngineActive() ? "Active" : "Off");
display.setCell(3, 6, "Previous").setCell(3, 7, "Next");
}
Aggregations