Search in sources :

Example 11 with IMidiAccess

use of de.mossgrabers.framework.daw.midi.IMidiAccess 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 12 with IMidiAccess

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

the class GenericFlexiControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final String inputName;
    if (this.configuration.isMPEEndabled())
        inputName = "Generic Flexi (MPE)";
    else
        inputName = this.configuration.getKeyboardChannel() < 0 ? null : "Generic Flexi";
    final List<String> filters = this.getMidiFilters();
    final IMidiInput input = midiAccess.createInput(inputName, filters.toArray(new String[filters.size()]));
    final GenericFlexiControlSurface surface = new GenericFlexiControlSurface(this.host, this.configuration, this.colorManager, output, input);
    this.surfaces.add(surface);
    this.registerHandlers(surface);
    this.configuration.setCommandObserver(this);
}
Also used : GenericFlexiControlSurface(de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface) IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput)

Example 13 with IMidiAccess

use of de.mossgrabers.framework.daw.midi.IMidiAccess 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/Pads", "82????", "92????", "A2????");
    // Sequencer 1 is on channel 1
    final INoteInput seqNoteInput = input.createNoteInput("Hardware Sequencer", "90????", "80????");
    final Integer[] table = new Integer[128];
    for (int i = 0; i < 128; i++) {
        // Block the Shift key
        table[i] = Integer.valueOf(i == 7 ? -1 : i);
    }
    seqNoteInput.setKeyTranslationTable(table);
    this.surfaces.add(new BeatstepControlSurface(this.host, this.colorManager, this.configuration, output, input));
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) BeatstepControlSurface(de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface) INoteInput(de.mossgrabers.framework.daw.midi.INoteInput)

Example 14 with IMidiAccess

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

the class SLControllerSetup 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 ? "Novation SL MkII (Drumpads)" : "Novation SL MkI (Drumpads)", "90????", "80????");
    final IMidiInput keyboardInput = midiAccess.createInput(1, this.isMkII ? "Novation SL MkII (Keyboard)" : "Novation SL MkI (Keyboard)", "80????", "90????", "B0????", "D0????", "E0????");
    final IHost hostProxy = this.model.getHost();
    final SLControlSurface surface = new SLControlSurface(hostProxy, this.colorManager, this.configuration, output, input, this.isMkII);
    this.surfaces.add(surface);
    surface.addPianoKeyboard(25, keyboardInput, true);
}
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) SLControlSurface(de.mossgrabers.controller.novation.sl.controller.SLControlSurface)

Example 15 with IMidiAccess

use of de.mossgrabers.framework.daw.midi.IMidiAccess 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

IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)18 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)18 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)15 DummyDisplay (de.mossgrabers.framework.controller.display.DummyDisplay)5 IHost (de.mossgrabers.framework.daw.IHost)3 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 GenericFlexiControlSurface (de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface)1 MCUDisplay (de.mossgrabers.controller.mackie.mcu.controller.MCUDisplay)1 Kontrol1ControlSurface (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1ControlSurface)1 Kontrol1Display (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display)1 Kontrol1UsbDevice (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1UsbDevice)1 KontrolProtocolControlSurface (de.mossgrabers.controller.ni.kontrol.mkii.controller.KontrolProtocolControlSurface)1 MaschineControlSurface (de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)1 LaunchkeyMk3ControlSurface (de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ControlSurface)1 LaunchkeyMk3Display (de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3Display)1 LaunchkeyMiniMk3ControlSurface (de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface)1