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();
}
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);
}
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);
});
}
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));
}
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);
}
Aggregations