Search in sources :

Example 21 with IParameter

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

the class CrossfadeModeCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    final IParameter crossfadeParameter = this.model.getCurrentTrackBank().getItem(this.index).getCrossfadeParameter();
    final double value = this.model.getValueChanger().toNormalizedValue(crossfadeParameter.getValue()) + 0.5;
    crossfadeParameter.setNormalizedValue(value > 1.1 ? 0 : value);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter)

Example 22 with IParameter

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

the class UserMode method onKnobTouch.

/**
 * {@inheritDoc}
 */
@Override
public void onKnobTouch(final int index, final boolean isTouched) {
    this.isKnobTouched[index] = isTouched;
    final IParameter param = this.model.getUserParameterBank().getItem(index);
    if (!param.doesExist())
        return;
    if (isTouched && this.surface.isDeletePressed()) {
        this.surface.setTriggerConsumed(ButtonID.DELETE);
        param.resetValue();
    }
    param.touchValue(isTouched);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter)

Example 23 with IParameter

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

the class TrackCrossfadeAMode method executeMethod.

/**
 * {@inheritDoc}
 */
@Override
protected void executeMethod(final ITrack track) {
    final IParameter crossfadeParameter = track.getCrossfadeParameter();
    final double v = this.model.getValueChanger().toNormalizedValue(crossfadeParameter.getValue());
    crossfadeParameter.setNormalizedValue(v < 0.1 ? 0.5 : 0);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter)

Example 24 with IParameter

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

the class SelectedDeviceMode method onKnobValue.

/**
 * {@inheritDoc}
 */
@Override
public void onKnobValue(final int index, final int value) {
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    if (cursorDevice == null)
        return;
    final IParameter item = cursorDevice.getParameterBank().getItem(index < 0 ? this.selParam : index);
    if (item.doesExist())
        item.changeValue(value);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 25 with IParameter

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

the class SelectedDeviceMode method onKnobTouch.

/**
 * {@inheritDoc}
 */
@Override
public void onKnobTouch(final int index, final boolean isTouched) {
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    if (cursorDevice == null)
        return;
    final IParameter item = cursorDevice.getParameterBank().getItem(index < 0 ? this.selParam : index);
    if (!item.doesExist())
        return;
    if (isTouched && this.surface.isDeletePressed()) {
        this.surface.setTriggerConsumed(ButtonID.DELETE);
        item.resetValue();
    }
    item.touchValue(isTouched);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

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