use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.
the class FrameMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final IApplication app = this.model.getApplication();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
for (int i = 0; i < FrameMode.ARRANGER1.length; i++) message.addOptionElement(app.isArrangeLayout() ? FrameMode.ARRANGER1[i] : app.isMixerLayout() ? FrameMode.MIXER1[i] : "", app.isArrangeLayout() ? FrameMode.ARRANGER2[i] : app.isMixerLayout() ? FrameMode.MIXER2[i] : "", this.getSecondRowButtonState(i) > 0, FrameMode.LAYOUTS1[i], FrameMode.LAYOUTS2[i], this.getFirstRowButtonState(i), false);
display.send(message);
}
use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.
the class LayoutModule method flush.
/**
* {@inheritDoc}
*/
@Override
public void flush(final boolean dump) {
final IApplication app = this.model.getApplication();
this.writer.sendOSC("/layout", app.getPanelLayout().toLowerCase(Locale.US), dump);
final IArranger arrange = this.model.getArranger();
this.writer.sendOSC("/arranger/cueMarkerVisibility", arrange.areCueMarkersVisible(), dump);
this.writer.sendOSC("/arranger/playbackFollow", arrange.isPlaybackFollowEnabled(), dump);
this.writer.sendOSC("/arranger/trackRowHeight", arrange.hasDoubleRowTrackHeight(), dump);
this.writer.sendOSC("/arranger/clipLauncherSectionVisibility", arrange.isClipLauncherVisible(), dump);
this.writer.sendOSC("/arranger/timeLineVisibility", arrange.isTimelineVisible(), dump);
this.writer.sendOSC("/arranger/ioSectionVisibility", arrange.isIoSectionVisible(), dump);
this.writer.sendOSC("/arranger/effectTracksVisibility", arrange.areEffectTracksVisible(), dump);
final IMixer mix = this.model.getMixer();
this.writer.sendOSC("/mixer/clipLauncherSectionVisibility", mix.isClipLauncherSectionVisible(), dump);
this.writer.sendOSC("/mixer/crossFadeSectionVisibility", mix.isCrossFadeSectionVisible(), dump);
this.writer.sendOSC("/mixer/deviceSectionVisibility", mix.isDeviceSectionVisible(), dump);
this.writer.sendOSC("/mixer/sendsSectionVisibility", mix.isSendSectionVisible(), dump);
this.writer.sendOSC("/mixer/ioSectionVisibility", mix.isIoSectionVisible(), dump);
this.writer.sendOSC("/mixer/meterSectionVisibility", mix.isMeterSectionVisible(), dump);
}
use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.
the class FrameMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2(final IGraphicDisplay display) {
final IApplication app = this.model.getApplication();
String[][] options;
if (app.isArrangeLayout())
options = ARRANGER_OPTIONS;
else if (app.isMixerLayout())
options = MIXER_OPTIONS;
else
options = EMPTY_OPTIONS;
for (int i = 0; i < 8; i++) display.addOptionElement(options[0][i], options[1][i], this.getSecondRowButtonState(i) > 0, FrameMode.LAYOUTS1[i], FrameMode.LAYOUTS2[i], this.getFirstRowButtonState(i), false);
}
use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.
the class MaschineJamSessionViewCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
final ViewManager viewManager = this.surface.getViewManager();
final SessionView sessionView = (SessionView) viewManager.get(Views.SESSION);
final Configuration configuration = this.surface.getConfiguration();
if (event == ButtonEvent.UP) {
// Toggle Arrange and Mix panel layout
if (this.surface.isShiftPressed()) {
final IApplication application = this.model.getApplication();
final boolean isArrange = IApplication.PANEL_LAYOUT_ARRANGE.equals(application.getPanelLayout());
application.setPanelLayout(isArrange ? IApplication.PANEL_LAYOUT_MIX : IApplication.PANEL_LAYOUT_ARRANGE);
return;
}
if (viewManager.isActive(Views.SESSION)) {
// Disable birds-eye-view if active
if (sessionView.isBirdsEyeActive()) {
sessionView.setBirdsEyeActive(false);
this.notifyViewName(false, configuration.isFlipSession());
return;
}
// Flip clips
final boolean flipped = !configuration.isFlipSession();
configuration.setFlipSession(flipped);
this.notifyViewName(false, flipped);
return;
}
// Activate session view
viewManager.setActive(Views.SESSION);
this.notifyViewName(false, configuration.isFlipSession());
} else if (event == ButtonEvent.LONG) {
// Only trigger birds-eye-view if session view is already active
this.surface.setTriggerConsumed(ButtonID.SESSION);
sessionView.setBirdsEyeActive(true);
this.notifyViewName(true, configuration.isFlipSession());
}
}
use of de.mossgrabers.framework.daw.IApplication in project DrivenByMoss by git-moss.
the class AddTrackCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
if (event != ButtonEvent.DOWN)
return;
ITrackBank tb = this.model.getTrackBank();
final IApplication application = this.model.getApplication();
if (this.combi1 != null && this.surface.isPressed(this.combi1)) {
application.addEffectTrack();
tb = this.model.getEffectTrackBank();
if (tb == null)
return;
} else if (this.combi2 != null && this.surface.isPressed(this.combi2))
this.model.getTrackBank().addChannel(ChannelType.AUDIO);
else
this.model.getTrackBank().addChannel(ChannelType.INSTRUMENT);
final ITrackBank bank = tb;
this.surface.scheduleTask(() -> {
final int pos = bank.getItemCount() - 1;
if (pos < 0) {
this.surface.errorln("Warning: No track created.");
return;
}
bank.scrollTo(pos);
bank.getItem(pos % bank.getPageSize()).select();
}, 200);
}
Aggregations