Search in sources :

Example 11 with DisplayMessage

use of de.mossgrabers.push.controller.DisplayMessage in project DrivenByMoss by git-moss.

the class FixedMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final int newClipLength = this.surface.getConfiguration().getNewClipLength();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    for (int i = 0; i < 8; i++) message.addOptionElement(i == 0 ? "Create Clip (length not stored)" : "", AbstractConfiguration.NEW_CLIP_LENGTH_VALUES[i], false, i == 0 ? "New Clip Length" : "", AbstractConfiguration.NEW_CLIP_LENGTH_VALUES[i], newClipLength == i, false);
    display.send(message);
}
Also used : PushDisplay(de.mossgrabers.push.controller.PushDisplay) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Example 12 with DisplayMessage

use of de.mossgrabers.push.controller.DisplayMessage in project DrivenByMoss by git-moss.

the class GrooveMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final IParameter[] parameters = this.model.getGroove().getParameters();
    final int quantizeAmount = this.surface.getConfiguration().getQuantizeAmount();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    message.addParameterElement("Quant Amnt", quantizeAmount * 1023 / 100, quantizeAmount + "%", this.isKnobTouched[0], -1);
    message.addOptionElement("     Groove", "", false, "", "", false, false);
    for (int i = 0; i < parameters.length; i++) message.addParameterElement(parameters[i].getName(10), parameters[i].getValue(), parameters[i].getDisplayedValue(8), this.isKnobTouched[i], -1);
    for (int i = parameters.length; i < 6; i++) message.addEmptyElement();
    display.send(message);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) PushDisplay(de.mossgrabers.push.controller.PushDisplay) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Example 13 with DisplayMessage

use of de.mossgrabers.push.controller.DisplayMessage in project DrivenByMoss by git-moss.

the class NoteMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final int quarters = (int) Math.floor(this.noteLength);
    final int fine = (int) Math.floor(this.noteLength * 100) % 100;
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    message.addParameterElement("Quarters", quarters, Integer.toString(quarters), this.isKnobTouched[0], -1);
    message.addParameterElement("Fine", fine, Integer.toString(fine), this.isKnobTouched[1], -1);
    final int parameterValue = this.noteVelocity * 1023 / 127;
    message.addParameterElement("Velocity", parameterValue, Integer.toString(this.noteVelocity * 100 / 127) + "%", this.isKnobTouched[2], parameterValue);
    for (int i = 3; i < 8; i++) message.addOptionElement("", "", false, "", "", false, false);
    display.send(message);
}
Also used : PushDisplay(de.mossgrabers.push.controller.PushDisplay) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Example 14 with DisplayMessage

use of de.mossgrabers.push.controller.DisplayMessage in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final ViewManager viewManager = this.surface.getViewManager();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    for (int i = 0; i < VIEWS.length; i++) {
        String menuBottomName = "";
        if (VIEWS[i] != null) {
            final View view = viewManager.getView(VIEWS[i]);
            if (view != null)
                menuBottomName = view.getName();
        }
        final String menuTopName = VIEWS_TOP[i] == null ? "" : viewManager.getView(VIEWS_TOP[i]).getName();
        final boolean isMenuBottomSelected = VIEWS[i] != null && viewManager.isActiveView(VIEWS[i]);
        final boolean isMenuTopSelected = VIEWS_TOP[i] != null && viewManager.isActiveView(VIEWS_TOP[i]);
        message.addOptionElement("", menuTopName, isMenuTopSelected, i == 0 ? "Note view" : "", menuBottomName, isMenuBottomSelected, false);
    }
    display.send(message);
}
Also used : PushDisplay(de.mossgrabers.push.controller.PushDisplay) ViewManager(de.mossgrabers.framework.view.ViewManager) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage) View(de.mossgrabers.framework.view.View)

Example 15 with DisplayMessage

use of de.mossgrabers.push.controller.DisplayMessage in project DrivenByMoss by git-moss.

the class RibbonMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final PushConfiguration config = this.surface.getConfiguration();
    final String ribbonModeCC = Integer.toString(config.getRibbonModeCCVal());
    final int ribbonMode = config.getRibbonMode();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    for (int i = 0; i < 7; i++) message.addOptionElement(i == 0 ? "CC Quick Select" : "", RibbonMode.CC_QUICK_SELECT[i], false, i == 0 ? "Function" : "", RibbonMode.FUNCTION[i], i < RibbonMode.FUNCTION_IDS.length && ribbonMode == RibbonMode.FUNCTION_IDS[i], false);
    message.addParameterElement("Midi CC", -1, ribbonModeCC, this.isKnobTouched[5], -1);
    display.send(message);
    return;
}
Also used : PushConfiguration(de.mossgrabers.push.PushConfiguration) PushDisplay(de.mossgrabers.push.controller.PushDisplay) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Aggregations

DisplayMessage (de.mossgrabers.push.controller.DisplayMessage)24 PushDisplay (de.mossgrabers.push.controller.PushDisplay)24 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)6 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)5 ITrack (de.mossgrabers.framework.daw.data.ITrack)5 PushConfiguration (de.mossgrabers.push.PushConfiguration)5 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)3 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)2 IParameter (de.mossgrabers.framework.daw.data.IParameter)2 ISend (de.mossgrabers.framework.daw.data.ISend)2 ViewManager (de.mossgrabers.framework.view.ViewManager)2 IApplication (de.mossgrabers.framework.daw.IApplication)1 IBrowser (de.mossgrabers.framework.daw.IBrowser)1 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)1 ITransport (de.mossgrabers.framework.daw.ITransport)1 IBrowserColumn (de.mossgrabers.framework.daw.data.IBrowserColumn)1 IBrowserColumnItem (de.mossgrabers.framework.daw.data.IBrowserColumnItem)1 IChannel (de.mossgrabers.framework.daw.data.IChannel)1 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)1 Scale (de.mossgrabers.framework.scale.Scale)1