Search in sources :

Example 11 with IMidiOutput

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

the class LaunchkeyMk3ControllerSetup method startup2.

/**
 * DAW mode is ready. Update all states on the device.
 */
private void startup2() {
    final LaunchkeyMk3ControlSurface surface = this.getSurface();
    // Sync modes to device
    final IMidiOutput midiOutput = surface.getMidiOutput();
    midiOutput.sendCCEx(15, LaunchkeyMk3ControlSurface.LAUNCHKEY_MODE_SELECT, LaunchkeyMk3ControlSurface.KNOB_MODE_PAN);
    midiOutput.sendCCEx(15, LaunchkeyMk3ControlSurface.LAUNCHKEY_FADER_SELECT, LaunchkeyMk3ControlSurface.FADER_MODE_VOLUME);
    // Flush display and LEDs
    surface.forceFlush();
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) LaunchkeyMk3ControlSurface(de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ControlSurface)

Example 12 with IMidiOutput

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

the class LaunchkeyMk3ControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    // A bit tricky to exclude only channel 16...
    final List<String> filters = new ArrayList<>();
    for (int i = 0; i < 15; i++) {
        filters.add(StringUtils.toHexStr(0x80 + i) + "????");
        filters.add(StringUtils.toHexStr(0x90 + i) + "????");
    }
    final IMidiInput input = midiAccess.createInput("Pads", filters.toArray(new String[filters.size()]));
    final IMidiInput inputKeys = midiAccess.createInput(1, "Keyboard", "8?????", /* Note off */
    "9?????", /* Note on */
    "A?????", /* Polyphonic After-touch */
    "B?01??", /* Modulation */
    "C?????", /* Program change */
    "B?40??", /* Sustain pedal */
    "D?????", /* Channel After-touch */
    "E?????");
    final LaunchkeyMk3ControlSurface surface = new LaunchkeyMk3ControlSurface(this.host, this.colorManager, this.configuration, output, input);
    this.surfaces.add(surface);
    surface.addTextDisplay(new LaunchkeyMk3Display(this.host, output));
    surface.addPianoKeyboard(25, inputKeys, true);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) LaunchkeyMk3ControlSurface(de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ControlSurface) LaunchkeyMk3Display(de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3Display) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) ArrayList(java.util.ArrayList)

Example 13 with IMidiOutput

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

the class SLMkIIIControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput keyboardInput = midiAccess.createInput(1, "Keyboard", "8?????", "9?????", "B?????", "D?????", "E?????");
    final IHost hostProxy = this.model.getHost();
    final IMidiInput input = midiAccess.createInput("Pads", "8?????", "9?????");
    final SLMkIIILightGuide lightGuide = new SLMkIIILightGuide(this.model, this.colorManager, output);
    final SLMkIIIControlSurface surface = new SLMkIIIControlSurface(hostProxy, this.colorManager, this.configuration, output, input, lightGuide);
    this.surfaces.add(surface);
    surface.addPianoKeyboard(61, keyboardInput, true);
    keyboardInput.setMidiCallback((status, data1, data2) -> {
        final int code = status & 0xF0;
        if (code == 0x80 || code == 0x90)
            lightGuide.updateKeyboardNote(data1, data2);
    });
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) IHost(de.mossgrabers.framework.daw.IHost) SLMkIIILightGuide(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIILightGuide) SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)

Example 14 with IMidiOutput

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

the class BeatstepControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput("Control", "82????", "92????", "A2????", "B2????");
    // Sequencer 1 is on channel 1
    input.createNoteInput("Seq. 1", "90????", "80????");
    // Setup the 2 note sequencers and 1 drum sequencer
    if (this.isPro) {
        // Sequencer 2 is on channel 2
        input.createNoteInput("Seq. 2", "91????", "81????");
        // Drum Sequencer is on channel 10
        input.createNoteInput("Drums", "99????", "89????");
    }
    final BeatstepControlSurface surface = new BeatstepControlSurface(this.model.getHost(), this.colorManager, this.configuration, output, input, this.isPro);
    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) DummyDisplay(de.mossgrabers.framework.controller.display.DummyDisplay) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) BeatstepControlSurface(de.mossgrabers.beatstep.controller.BeatstepControlSurface)

Example 15 with IMidiOutput

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

the class PushControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput input = midiAccess.createInput(this.isPush2 ? "Ableton Push 2" : "Ableton Push 1", "80????", /* Note off */
    "90????", /* Note on */
    "B040??");
    final PushControlSurface surface = new PushControlSurface(this.model.getHost(), this.colorManager, this.configuration, output, input);
    this.surfaces.add(surface);
    surface.setDisplay(this.createDisplay(output));
    surface.getModeManager().setDefaultMode(Modes.MODE_TRACK);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) PushControlSurface(de.mossgrabers.push.controller.PushControlSurface)

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