use of de.mossgrabers.framework.daw.midi.IMidiOutput 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.IMidiOutput 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.IMidiOutput in project DrivenByMoss by git-moss.
the class SendsView 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 ISend send = track.getSend(this.selectedSend);
final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
if (this.trackColors[i] != color || !track.doesExist() || send.getName().isEmpty())
this.setupFader(i);
this.trackColors[i] = color;
output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, send.getValue());
}
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput in project DrivenByMoss by git-moss.
the class VolumeView 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.getVolume());
}
}
use of de.mossgrabers.framework.daw.midi.IMidiOutput 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);
}
}
Aggregations