use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class PanMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.getTrackBank();
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
d.setCell(1, i, t.getPanStr(6));
}
d.done(1);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class VolumeMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.getTrackBank();
final int extenderOffset = this.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(extenderOffset + i);
d.setCell(1, i, t.getVolumeStr(6));
}
d.done(1);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SelectView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 16; i++) {
final ITrack item = tb.getItem(i);
final int x = i % 4;
final int y = 3 - i / 4;
if (item.doesExist()) {
final int colorIndex = this.colorManager.getColorIndex(DAWColor.getColorIndex(item.getColor()));
if (item.isSelected())
padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_WHITE, false);
else
padGrid.lightEx(x, y, colorIndex);
} else
padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
}
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SoloView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 16; i++) {
final ITrack item = tb.getItem(i);
final int x = i % 4;
final int y = 3 - i / 4;
if (item.doesExist()) {
final int colorIndex = this.colorManager.getColorIndex(DAWColor.getColorIndex(item.getColor()));
if (item.isSolo())
padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_WHITE, false);
else
padGrid.lightEx(x, y, colorIndex);
} else
padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
}
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SessionView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final boolean controlModeIsOff = this.padMode == null;
this.rows = controlModeIsOff ? 2 : 1;
super.drawGrid();
if (controlModeIsOff)
return;
final ITrackBank tb = this.model.getCurrentTrackBank();
final IPadGrid pads = this.surface.getPadGrid();
for (int x = 0; x < this.columns; x++) {
final ITrack track = tb.getItem(x);
final boolean exists = track.doesExist();
switch(this.padMode) {
case REC_ARM:
int recColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
if (exists)
recColor = track.isRecArm() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_RED_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_RED_LO;
pads.lightEx(x, 1, recColor);
break;
case TRACK_SELECT:
int selectColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
if (exists)
selectColor = track.isSelected() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_WHITE : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO;
pads.lightEx(x, 1, selectColor);
break;
case MUTE:
int muteColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
if (exists)
muteColor = track.isMute() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_AMBER_LO;
pads.lightEx(x, 1, muteColor);
break;
case SOLO:
int soloColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
if (exists)
soloColor = track.isSolo() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_LO;
pads.lightEx(x, 1, soloColor);
break;
case STOP_CLIP:
pads.lightEx(x, 1, exists ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_ROSE : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
break;
default:
// Unused
break;
}
}
}
Aggregations