use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.
the class PanView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final ColorManager cm = this.model.getColorManager();
final IChannelBank tb = this.model.getCurrentTrackBank();
final IMidiOutput output = this.surface.getOutput();
for (int i = 0; i < 8; i++) {
final ITrack track = tb.getTrack(i);
final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
if (this.trackColors[i] != color || !track.doesExist())
this.setupFader(i);
this.trackColors[i] = color;
output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, track.getPan());
}
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.
the class MCUControlSurface method switchVuMode.
// leds on/leds and vu-meter on display on/vu-meter on display on/all off
public void switchVuMode(final int mode) {
// Always horizontal
this.output.sendSysex(new StringBuilder(SYSEX_HDR).append("21 00 F7").toString());
if (this.activeVuMode != mode) {
if (this.activeVuMode < 5)
this.activeVuMode = mode;
else
this.activeVuMode = VUMODE_LED;
}
final IMidiOutput out = this.getOutput();
// corresponding sysex message
switch(this.activeVuMode) {
case VUMODE_LED:
for (int i = 0; i < 8; i++) {
// resets the leds (and vu-meters on the display?)
out.sendChannelAftertouch(0 + (i << 4), 0);
out.sendSysex(SYSEX_HDR + "20 0" + i + " 01 F7");
}
break;
case VUMODE_LED_AND_LCD:
for (int i = 0; i < 8; i++) {
out.sendChannelAftertouch(0 + (i << 4), 0);
out.sendSysex(SYSEX_HDR + "20 0" + i + " 03 F7");
}
break;
case VUMODE_LCD:
for (int i = 0; i < 8; i++) {
out.sendChannelAftertouch(0 + (i << 4), 0);
out.sendSysex(SYSEX_HDR + "20 0" + i + " 06 F7");
}
break;
case VUMODE_OFF:
for (int i = 0; i < 8; i++) {
out.sendChannelAftertouch(0 + (i << 4), 0);
out.sendSysex(SYSEX_HDR + "20 0" + i + " 00 F7");
}
break;
}
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput 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();
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method createSurface.
/**
* {@inheritDoc}
*/
@Override
protected void createSurface() {
final IMidiAccess midiAccess = this.factory.createMidiAccess();
final IMidiOutput output = midiAccess.createOutput();
final IMidiInput input = midiAccess.createInput("Pads", "80????", "90????", "81????", "91????", "82????", "92????", "83????", "93????", "84????", "94????", "85????", "95????", "86????", "96????", "87????", "97????", "88????", "98????", "89????", "99????", "8A????", "9A????", "8B????", "9B????", "8C????", "9C????", "8D????", "9D????", "8E????", "9E????");
this.inputKeys = midiAccess.createInput(1, "Keyboard", "8?????", /* Note off */
"9?????", /* Note on */
"B?01??", /* Modulation */
"B?40??", /* Sustainpedal */
"E?????");
final LaunchkeyMiniMk3ControlSurface surface = new LaunchkeyMiniMk3ControlSurface(this.host, this.colorManager, this.configuration, output, input, this::processProgramChangeAction);
this.surfaces.add(surface);
surface.addPianoKeyboard(25, this.inputKeys, true);
this.mvHelper = new MVHelper<>(this.model, surface);
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput 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);
}
}
Aggregations