Search in sources :

Example 1 with IMidiOutput

use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.

the class APCControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput(this.isMkII ? "Akai APC40 mkII" : "Akai APC40", "B040??");
    final APCControlSurface surface = new APCControlSurface(this.model.getHost(), this.colorManager, this.configuration, output, input, this.isMkII);
    this.surfaces.add(surface);
    surface.setDisplay(new DummyDisplay(this.host));
    for (int i = 0; i < 8; i++) surface.setLED(APCControlSurface.APC_KNOB_DEVICE_KNOB_LED_1 + i, 1);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) APCControlSurface(de.mossgrabers.apc.controller.APCControlSurface) DummyDisplay(de.mossgrabers.framework.controller.display.DummyDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput)

Example 2 with IMidiOutput

use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.

the class APCminiControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput("Akai APCmini");
    final APCminiControlSurface surface = new APCminiControlSurface(this.model.getHost(), this.colorManager, this.configuration, output, input);
    this.surfaces.add(surface);
    surface.setDisplay(new DummyDisplay(this.host));
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) APCminiControlSurface(de.mossgrabers.apcmini.controller.APCminiControlSurface) DummyDisplay(de.mossgrabers.framework.controller.display.DummyDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput)

Example 3 with IMidiOutput

use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.

the class SendsView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ColorManager cm = this.model.getColorManager();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final IMidiOutput output = this.surface.getOutput();
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        final ISend send = track.getSend(this.selectedSend);
        final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
        if (this.trackColors[i] != color || !track.doesExist() || send.getName().isEmpty())
            this.setupFader(i);
        this.trackColors[i] = color;
        output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, send.getValue());
    }
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISend(de.mossgrabers.framework.daw.data.ISend) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 4 with IMidiOutput

use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.

the class VolumeView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ColorManager cm = this.model.getColorManager();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final IMidiOutput output = this.surface.getOutput();
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
        if (this.trackColors[i] != color || !track.doesExist())
            this.setupFader(i);
        this.trackColors[i] = color;
        output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, track.getVolume());
    }
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 5 with IMidiOutput

use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.

the class MCUControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    for (int i = 0; i < this.numMCUDevices; i++) {
        final IMidiOutput output = midiAccess.createOutput(i);
        final IMidiInput input = midiAccess.createInput(i, null);
        final MCUControlSurface surface = new MCUControlSurface(this.surfaces, this.model.getHost(), this.colorManager, this.configuration, output, input, 8 * (this.numMCUDevices - i - 1), i == 0);
        this.surfaces.add(surface);
        surface.setDisplay(new MCUDisplay(this.model.getHost(), output, true, false));
        surface.setSecondDisplay(new MCUDisplay(this.model.getHost(), output, false, i == 0));
        surface.setSegmentDisplay(new MCUSegmentDisplay(output));
        surface.getModeManager().setDefaultMode(Modes.MODE_VOLUME);
    }
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) MCUDisplay(de.mossgrabers.mcu.controller.MCUDisplay) MCUSegmentDisplay(de.mossgrabers.mcu.controller.MCUSegmentDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) MCUControlSurface(de.mossgrabers.mcu.controller.MCUControlSurface)

Aggregations

IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)28 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)16 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)16 ITrack (de.mossgrabers.framework.daw.data.ITrack)6 ColorManager (de.mossgrabers.framework.controller.color.ColorManager)4 DummyDisplay (de.mossgrabers.framework.controller.display.DummyDisplay)4 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)4 IHost (de.mossgrabers.framework.daw.IHost)4 GenericFlexiControlSurface (de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface)3 ProgramBank (de.mossgrabers.controller.generic.flexihandler.utils.ProgramBank)2 MaschineControlSurface (de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)2 LaunchkeyMk3ControlSurface (de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ControlSurface)2 IEnumSetting (de.mossgrabers.framework.configuration.IEnumSetting)2 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)2 ArrayList (java.util.ArrayList)2 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)1 APCminiControlSurface (de.mossgrabers.apcmini.controller.APCminiControlSurface)1 BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)1 BeatstepControlSurface (de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface)1