use of de.mossgrabers.framework.daw.midi.IMidiAccess 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);
}
use of de.mossgrabers.framework.daw.midi.IMidiAccess 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));
}
use of de.mossgrabers.framework.daw.midi.IMidiAccess 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);
}
}
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????");
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);
surface.setDisplay(new SLDisplay(hostProxy, output));
this.surfaces.add(surface);
}
use of de.mossgrabers.framework.daw.midi.IMidiAccess 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);
});
}
Aggregations