Search in sources :

Example 16 with IMidiOutput

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

the class PanView 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.getPan());
    }
}
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 17 with IMidiOutput

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

the class MCUControlSurface method switchVuMode.

// leds on/leds and vu-meter on display on/vu-meter on display on/all off
public void switchVuMode(final int mode) {
    // Always horizontal
    this.output.sendSysex(new StringBuilder(SYSEX_HDR).append("21 00 F7").toString());
    if (this.activeVuMode != mode) {
        if (this.activeVuMode < 5)
            this.activeVuMode = mode;
        else
            this.activeVuMode = VUMODE_LED;
    }
    final IMidiOutput out = this.getOutput();
    // corresponding sysex message
    switch(this.activeVuMode) {
        case VUMODE_LED:
            for (int i = 0; i < 8; i++) {
                // resets the leds (and vu-meters on the display?)
                out.sendChannelAftertouch(0 + (i << 4), 0);
                out.sendSysex(SYSEX_HDR + "20 0" + i + " 01 F7");
            }
            break;
        case VUMODE_LED_AND_LCD:
            for (int i = 0; i < 8; i++) {
                out.sendChannelAftertouch(0 + (i << 4), 0);
                out.sendSysex(SYSEX_HDR + "20 0" + i + " 03 F7");
            }
            break;
        case VUMODE_LCD:
            for (int i = 0; i < 8; i++) {
                out.sendChannelAftertouch(0 + (i << 4), 0);
                out.sendSysex(SYSEX_HDR + "20 0" + i + " 06 F7");
            }
            break;
        case VUMODE_OFF:
            for (int i = 0; i < 8; i++) {
                out.sendChannelAftertouch(0 + (i << 4), 0);
                out.sendSysex(SYSEX_HDR + "20 0" + i + " 00 F7");
            }
            break;
    }
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput)

Example 18 with IMidiOutput

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

the class LaunchpadControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput(this.isPro ? "Novation Launchpad Pro" : "Novation Launchpad MkII", "80????", /* Note off */
    "90????");
    final LaunchpadControlSurface surface = new LaunchpadControlSurface(this.model.getHost(), this.colorManager, this.configuration, output, input, this.isPro);
    this.surfaces.add(surface);
    surface.setDisplay(new DummyDisplay(this.host));
    surface.setLaunchpadToStandalone();
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) DummyDisplay(de.mossgrabers.framework.controller.display.DummyDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) LaunchpadControlSurface(de.mossgrabers.launchpad.controller.LaunchpadControlSurface)

Example 19 with IMidiOutput

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

the class LaunchkeyMiniMk3ControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput("Pads", "80????", "90????", "81????", "91????", "82????", "92????", "83????", "93????", "84????", "94????", "85????", "95????", "86????", "96????", "87????", "97????", "88????", "98????", "89????", "99????", "8A????", "9A????", "8B????", "9B????", "8C????", "9C????", "8D????", "9D????", "8E????", "9E????");
    this.inputKeys = midiAccess.createInput(1, "Keyboard", "8?????", /* Note off */
    "9?????", /* Note on */
    "B?01??", /* Modulation */
    "B?40??", /* Sustainpedal */
    "E?????");
    final LaunchkeyMiniMk3ControlSurface surface = new LaunchkeyMiniMk3ControlSurface(this.host, this.colorManager, this.configuration, output, input, this::processProgramChangeAction);
    this.surfaces.add(surface);
    surface.addPianoKeyboard(25, this.inputKeys, true);
    this.mvHelper = new MVHelper<>(this.model, surface);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) LaunchkeyMiniMk3ControlSurface(de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface)

Example 20 with IMidiOutput

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

the class MaschineControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput(this.maschine.getName(), "80????", "90????", "A0????", "D0????");
    final MaschineControlSurface surface = new MaschineControlSurface(this.host, this.colorManager, this.maschine, this.configuration, output, input);
    this.surfaces.add(surface);
    if (this.maschine.hasMCUDisplay()) {
        final MCUDisplay display = new MCUDisplay(this.host, output, true, false, false);
        display.setCenterNotification(false);
        surface.addTextDisplay(display);
    }
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) MCUDisplay(de.mossgrabers.controller.mackie.mcu.controller.MCUDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) MaschineControlSurface(de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)

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