Search in sources :

Example 6 with IParameter

use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.

the class GrooveMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1(final ITextDisplay display) {
    display.setCell(0, 0, "Quantize");
    display.setCell(0, 1, Push1Display.SELECT_ARROW + TAG_GROOVE);
    final IGroove groove = this.model.getGroove();
    final IParameter enabledParameter = groove.getParameter(GrooveParameterID.ENABLED);
    if (enabledParameter != null)
        display.setCell(3, 0, enabledParameter.getValue() == 0 ? "  Off" : "Enabled");
    display.setCell(2, 1, "Shuffle:");
    this.displayParameter(display, GrooveParameterID.SHUFFLE_AMOUNT, 2);
    this.displayParameter(display, GrooveParameterID.SHUFFLE_RATE, 3);
    final boolean hasAccent = groove.getParameter(GrooveParameterID.ACCENT_AMOUNT) != EmptyParameter.INSTANCE;
    display.setCell(2, 4, hasAccent ? " Accent:" : "");
    this.displayParameter(display, GrooveParameterID.ACCENT_AMOUNT, 5);
    this.displayParameter(display, GrooveParameterID.ACCENT_PHASE, 6);
    this.displayParameter(display, GrooveParameterID.ACCENT_RATE, 7);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) IGroove(de.mossgrabers.framework.daw.IGroove)

Example 7 with IParameter

use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.

the class GrooveMode method displayParameter.

private void displayParameter(final IGraphicDisplay display, final GrooveParameterID paramID, final int index) {
    IParameter p = this.model.getGroove().getParameter(paramID);
    if (p == null)
        p = EmptyParameter.INSTANCE;
    display.addParameterElement(" ", false, "", (ChannelType) null, null, false, p.getName(10), p.getValue(), p.getDisplayedValue(8), this.isKnobTouched[index], -1);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter)

Example 8 with IParameter

use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.

the class GrooveMode method onFirstRow.

/**
 * {@inheritDoc}
 */
@Override
public void onFirstRow(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.UP)
        return;
    if (index == 0) {
        final IParameter parameter = this.model.getGroove().getParameter(GrooveParameterID.ENABLED);
        parameter.setNormalizedValue(parameter.getValue() > 0 ? 0 : 1);
    }
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter)

Example 9 with IParameter

use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.

the class GrooveMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2(final IGraphicDisplay display) {
    final IGroove groove = this.model.getGroove();
    final IParameter enabledParameter = groove.getParameter(GrooveParameterID.ENABLED);
    String paramText;
    if (enabledParameter == null)
        paramText = "";
    else
        paramText = enabledParameter.getValue() == 0 ? "Off" : "Enabled";
    display.addOptionElement("", "Quantize", false, null, "", paramText, enabledParameter != null && enabledParameter.getValue() > 0, null, true);
    display.addOptionElement("", TAG_GROOVE, true, null, "      Shuffle", "", false, null, true);
    this.displayParameter(display, GrooveParameterID.SHUFFLE_AMOUNT, 2);
    this.displayParameter(display, GrooveParameterID.SHUFFLE_RATE, 3);
    final boolean hasAccent = groove.getParameter(GrooveParameterID.ACCENT_AMOUNT) != EmptyParameter.INSTANCE;
    display.addOptionElement("", hasAccent ? "" : " ", false, null, hasAccent ? "      Accent" : "", "", false, null, true);
    this.displayParameter(display, GrooveParameterID.ACCENT_AMOUNT, 5);
    this.displayParameter(display, GrooveParameterID.ACCENT_PHASE, 6);
    this.displayParameter(display, GrooveParameterID.ACCENT_RATE, 7);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) IGroove(de.mossgrabers.framework.daw.IGroove)

Example 10 with IParameter

use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.

the class FxTrackHandler method changeTrackVolume.

private void changeTrackVolume(final KnobMode knobMode, final int trackIndex, final MidiValue value) {
    final Optional<ITrack> track = this.getTrack(trackIndex);
    if (track.isEmpty())
        return;
    final int val = value.getValue();
    final IParameter volumeParameter = track.get().getVolumeParameter();
    if (isAbsolute(knobMode))
        volumeParameter.setValue(this.getAbsoluteValueChanger(value), val);
    else
        volumeParameter.changeValue(this.getRelativeValueChanger(knobMode), val);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ITrack(de.mossgrabers.framework.daw.data.ITrack)

Aggregations

IParameter (de.mossgrabers.framework.daw.data.IParameter)76 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)17 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)14 ITrack (de.mossgrabers.framework.daw.data.ITrack)9 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)6 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)6 IGroove (de.mossgrabers.framework.daw.IGroove)5 Display (de.mossgrabers.framework.controller.display.Display)4 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)4 IParameterPageBank (de.mossgrabers.framework.daw.data.bank.IParameterPageBank)4 PushDisplay (de.mossgrabers.push.controller.PushDisplay)4 ITransport (de.mossgrabers.framework.daw.ITransport)3 IDeviceBank (de.mossgrabers.framework.daw.data.bank.IDeviceBank)3 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)2 TitleValueComponent (de.mossgrabers.controller.akai.fire.graphics.canvas.component.TitleValueComponent)2 FlexiHandlerException (de.mossgrabers.controller.generic.flexihandler.utils.FlexiHandlerException)2 FaderConfig (de.mossgrabers.controller.ni.maschine.jam.controller.FaderConfig)2 SLMkIIIDisplay (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)2 Configuration (de.mossgrabers.framework.configuration.Configuration)2 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)2