use of de.mossgrabers.framework.controller.display.IDisplay in project DrivenByMoss by git-moss.
the class TapTempoCommand method executeNormal.
/**
* {@inheritDoc}
*/
@Override
public void executeNormal(final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final ITransport transport = this.model.getTransport();
transport.tapTempo();
final IDisplay display = this.surface.getDisplay();
if (display != null)
display.notify(String.format("Tempo: %.02f", Double.valueOf(transport.getTempo())));
}
use of de.mossgrabers.framework.controller.display.IDisplay 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 % 8;
final int what = n / 8;
final ITrack track = this.model.getCurrentTrackBank().getItem(index);
final IDisplay display = this.surface.getDisplay();
switch(what) {
case 7:
this.faderMode = FaderMode.VOLUME;
display.notify("Volume");
this.selectTrack(track);
break;
case 6:
this.faderMode = FaderMode.PAN;
display.notify("Panorama");
this.selectTrack(track);
break;
case 5:
this.faderMode = FaderMode.SEND1;
final ISend send1 = track.getSendBank().getItem(0);
display.notify("Send 1: " + (send1.doesExist() ? send1.getName() : "None"));
this.selectTrack(track);
break;
case 4:
this.faderMode = FaderMode.SEND2;
final ISend send2 = track.getSendBank().getItem(1);
display.notify("Send 2: " + (send2.doesExist() ? send2.getName() : "None"));
this.selectTrack(track);
break;
case 3:
track.stop();
display.notify("Stop clip");
break;
case 2:
track.toggleMute();
display.notify("Mute");
break;
case 1:
track.toggleSolo();
display.notify("Solo");
break;
case 0:
track.toggleRecArm();
display.notify("Rec Arm");
break;
default:
// Not used
break;
}
}
use of de.mossgrabers.framework.controller.display.IDisplay in project DrivenByMoss by git-moss.
the class SelectSessionViewCommand method notifyViewName.
private void notifyViewName(final Views activeView, final boolean isBirdsEye, final boolean isFlipped) {
// Launchpad sometimes do not update correctly, force a flush
this.surface.getPadGrid().forceFlush();
final IDisplay display = this.surface.getDisplay();
if (activeView == Views.MIX) {
display.notify("Mix");
return;
}
if (isBirdsEye)
display.notify("Session - Birds Eye");
else
display.notify(isFlipped ? "Session - Flipped" : "Session");
}
Aggregations