Search in sources :

Example 1 with DummyDisplay

use of de.mossgrabers.framework.controller.display.DummyDisplay 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 DummyDisplay

use of de.mossgrabers.framework.controller.display.DummyDisplay 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 DummyDisplay

use of de.mossgrabers.framework.controller.display.DummyDisplay in project DrivenByMoss by git-moss.

the class OSCControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiInput input = midiAccess.createInput("OSC");
    final OSCControlSurface surface = new OSCControlSurface(this.host, this.configuration, this.colorManager, input);
    surface.addTextDisplay(new DummyDisplay(this.host));
    this.surfaces.add(surface);
    this.keyManager = new KeyManager(this.model, this.model.getScales(), surface.getPadGrid());
    // Send OSC messages
    final String sendHost = this.configuration.getSendHost();
    final int sendPort = this.configuration.getSendPort();
    this.host.println(String.format("Connecting to OSC server %s:%d", sendHost, Integer.valueOf(sendPort)));
    final IOpenSoundControlClient oscClient = this.host.connectToOSCServer(sendHost, sendPort);
    this.writer = new OSCWriter(this.host, this.model, oscClient, this.configuration);
    // Receive OSC messages
    final OSCParser parser = new OSCParser(this.host, surface, this.model, this.configuration, this.writer, input, this.keyManager);
    final List<IModule> modules = new ArrayList<>();
    modules.add(new TransportModule(this.host, this.model, surface, this.writer));
    modules.add(new GlobalModule(this.host, this.model, this.writer));
    modules.add(new LayoutModule(this.host, this.model, this.writer));
    modules.add(new MarkerModule(this.host, this.model, this.writer));
    modules.add(new ProjectModule(this.host, this.model, this.writer));
    modules.add(new TrackModule(this.host, this.model, this.writer, this.configuration));
    modules.add(new SceneModule(this.host, this.model, this.writer));
    modules.add(new DeviceModule(this.host, this.model, this.writer, this.configuration));
    modules.add(new BrowserModule(this.host, this.model, this.writer));
    modules.add(new MidiModule(this.host, this.model, surface, this.writer, this.keyManager));
    modules.add(new UserModule(this.host, this.model, this.writer));
    modules.add(new ActionModule(this.host, this.model, this.writer, this.configuration));
    modules.add(new ClipModule(this.host, this.model, this.writer));
    modules.forEach(module -> {
        this.writer.registerModule(module);
        parser.registerModule(module);
    });
    this.oscServer = this.host.createOSCServer(parser);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IModule(de.mossgrabers.controller.osc.module.IModule) TransportModule(de.mossgrabers.controller.osc.module.TransportModule) ActionModule(de.mossgrabers.controller.osc.module.ActionModule) ArrayList(java.util.ArrayList) MarkerModule(de.mossgrabers.controller.osc.module.MarkerModule) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) UserModule(de.mossgrabers.controller.osc.module.UserModule) TrackModule(de.mossgrabers.controller.osc.module.TrackModule) KeyManager(de.mossgrabers.framework.utils.KeyManager) GlobalModule(de.mossgrabers.controller.osc.module.GlobalModule) ClipModule(de.mossgrabers.controller.osc.module.ClipModule) LayoutModule(de.mossgrabers.controller.osc.module.LayoutModule) SceneModule(de.mossgrabers.controller.osc.module.SceneModule) OSCParser(de.mossgrabers.controller.osc.protocol.OSCParser) BrowserModule(de.mossgrabers.controller.osc.module.BrowserModule) MidiModule(de.mossgrabers.controller.osc.module.MidiModule) IOpenSoundControlClient(de.mossgrabers.framework.osc.IOpenSoundControlClient) ProjectModule(de.mossgrabers.controller.osc.module.ProjectModule) DeviceModule(de.mossgrabers.controller.osc.module.DeviceModule) DummyDisplay(de.mossgrabers.framework.controller.display.DummyDisplay) OSCWriter(de.mossgrabers.controller.osc.protocol.OSCWriter)

Example 4 with DummyDisplay

use of de.mossgrabers.framework.controller.display.DummyDisplay 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 5 with DummyDisplay

use of de.mossgrabers.framework.controller.display.DummyDisplay 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)

Aggregations

DummyDisplay (de.mossgrabers.framework.controller.display.DummyDisplay)5 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)5 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)5 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)4 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)1 APCminiControlSurface (de.mossgrabers.apcmini.controller.APCminiControlSurface)1 BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)1 ActionModule (de.mossgrabers.controller.osc.module.ActionModule)1 BrowserModule (de.mossgrabers.controller.osc.module.BrowserModule)1 ClipModule (de.mossgrabers.controller.osc.module.ClipModule)1 DeviceModule (de.mossgrabers.controller.osc.module.DeviceModule)1 GlobalModule (de.mossgrabers.controller.osc.module.GlobalModule)1 IModule (de.mossgrabers.controller.osc.module.IModule)1 LayoutModule (de.mossgrabers.controller.osc.module.LayoutModule)1 MarkerModule (de.mossgrabers.controller.osc.module.MarkerModule)1 MidiModule (de.mossgrabers.controller.osc.module.MidiModule)1 ProjectModule (de.mossgrabers.controller.osc.module.ProjectModule)1 SceneModule (de.mossgrabers.controller.osc.module.SceneModule)1 TrackModule (de.mossgrabers.controller.osc.module.TrackModule)1 TransportModule (de.mossgrabers.controller.osc.module.TransportModule)1