diff --git a/DrivenByMoss-Manual.pdf b/DrivenByMoss-Manual.pdf index 472842839..3f1c46969 100644 Binary files a/DrivenByMoss-Manual.pdf and b/DrivenByMoss-Manual.pdf differ diff --git a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolConfiguration.java b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolConfiguration.java index 654ea8aa6..d95cab8ea 100644 --- a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolConfiguration.java +++ b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolConfiguration.java @@ -15,7 +15,7 @@ /** - * The configuration settings for Komplete Kontrol MkII. + * The configuration settings for Komplete Kontrol Mk2/3. * * @author Jürgen Moßgraber */ diff --git a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolControllerSetup.java b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolControllerSetup.java index bcf572ed0..1ab52bf52 100644 --- a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolControllerSetup.java +++ b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolControllerSetup.java @@ -125,23 +125,6 @@ public void flush () this.kompleteInstance = kompleteInstanceNew; surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_INSTANCE, 0, 0, kompleteInstanceNew); } - - final ITrackBank bank = this.model.getCurrentTrackBank (); - - final boolean hasSolo = this.model.getProject ().hasSolo (); - for (int i = 0; i < 8; i++) - { - final ITrack track = bank.getItem (i); - surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, track.isMute () ? 1 : 0, i); - surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, track.isSolo () ? 1 : 0, i); - surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, !track.isSolo () && hasSolo ? 1 : 0, i); - } - - final ITrackBank tb = this.model.getCurrentTrackBank (); - final Optional selectedTrack = tb.getSelectedItem (); - surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, selectedTrack.isPresent () ? TrackType.toTrackType (selectedTrack.get ().getType ()) : 0); - surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, selectedTrack.isPresent () && !selectedTrack.get ().isSolo () && hasSolo ? 1 : 0); - super.flush (); } @@ -162,8 +145,9 @@ protected void createSurface () final IMidiAccess midiAccess = this.factory.createMidiAccess (); final IMidiOutput output = midiAccess.createOutput (); final IMidiInput pianoInput = midiAccess.createInput (1, "Keyboard", "8?????" /* Note off */, - "9?????" /* Note on */, "B?????" /* Sustain pedal + Modulation + Strip */, - "D?????" /* Channel After-touch */, "E?????" /* Pitch-bend */); + "9?????" /* Note on */, "A?????" /* Poly-Aftertouch */, + "B?????" /* Sustain-pedal + Modulation + Strip */, "D?????" /* Channel-Aftertouch */, + "E?????" /* Pitch-bend */); final KontrolProtocolControlSurface surface = new KontrolProtocolControlSurface (this.host, this.colorManager, this.configuration, output, midiAccess.createInput (null), this.version); this.surfaces.add (surface); diff --git a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/MixerMode.java b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/MixerMode.java index 12646523c..c57a0f544 100644 --- a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/MixerMode.java +++ b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/MixerMode.java @@ -4,6 +4,9 @@ package de.mossgrabers.controller.ni.kontrol.mkii.mode; +import java.util.List; +import java.util.Optional; + import de.mossgrabers.controller.ni.kontrol.mkii.KontrolProtocolConfiguration; import de.mossgrabers.controller.ni.kontrol.mkii.TrackType; import de.mossgrabers.controller.ni.kontrol.mkii.controller.KontrolProtocol; @@ -19,9 +22,6 @@ import de.mossgrabers.framework.parameterprovider.track.PanParameterProvider; import de.mossgrabers.framework.parameterprovider.track.VolumeParameterProvider; -import java.util.List; -import java.util.Optional; - /** * The mixer mode. @@ -103,6 +103,7 @@ public int getKnobValue (final int index) public void updateDisplay () { final IValueChanger valueChanger = this.model.getValueChanger (); + final boolean hasSolo = this.model.getProject ().hasSolo (); final int [] vuData = new int [16]; for (int i = 0; i < 8; i++) @@ -120,6 +121,14 @@ public void updateDisplay () final int j = 2 * i; vuData[j] = valueChanger.toMidiValue (track.getVuLeft ()); vuData[j + 1] = valueChanger.toMidiValue (track.getVuRight ()); + + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, track.isMute () ? 1 : 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, track.isSolo () ? 1 : 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, !track.isSolo () && hasSolo ? 1 : 0, i); + + final Optional selectedTrack = this.bank.getSelectedItem (); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, selectedTrack.isPresent () ? TrackType.toTrackType (selectedTrack.get ().getType ()) : 0); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, selectedTrack.isPresent () && !selectedTrack.get ().isSolo () && hasSolo ? 1 : 0); } this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData); } diff --git a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/ParamsMode.java b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/ParamsMode.java index 3a252753f..4fd8f4bfd 100644 --- a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/ParamsMode.java +++ b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/ParamsMode.java @@ -140,6 +140,13 @@ public void updateDisplay () final int j = 2 * i; vuData[j] = valueChanger.toMidiValue (parameter.getModulatedValue ()); vuData[j + 1] = valueChanger.toMidiValue (parameter.getModulatedValue ()); + + // Switch off all mutes and solos otherwise "tracks" will be darkened + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, 0, i); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, 0); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, 0); } this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData); } diff --git a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/SendMode.java b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/SendMode.java index 20e3ddaa5..320fe9929 100644 --- a/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/SendMode.java +++ b/src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/SendMode.java @@ -128,6 +128,13 @@ public void updateDisplay () final int j = 2 * i; vuData[j] = valueChanger.toMidiValue (send.getModulatedValue ()); vuData[j + 1] = valueChanger.toMidiValue (send.getModulatedValue ()); + + // Switch off all mutes and solos otherwise "tracks" will be darkened + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, 0, i); + this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, 0, i); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, 0); + this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, 0); } this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData); } diff --git a/src/main/java/de/mossgrabers/framework/command/aftertouch/AftertouchViewCommand.java b/src/main/java/de/mossgrabers/framework/command/aftertouch/AftertouchViewCommand.java index d1e2e2727..26f96f7cf 100755 --- a/src/main/java/de/mossgrabers/framework/command/aftertouch/AftertouchViewCommand.java +++ b/src/main/java/de/mossgrabers/framework/command/aftertouch/AftertouchViewCommand.java @@ -48,11 +48,11 @@ public void onPolyAftertouch (final int note, final int value) final int convertAftertouch = config.getConvertAftertouch (); switch (convertAftertouch) { - // Filter poly aftertouch + // Filter poly-aftertouch case AbstractConfiguration.AFTERTOUCH_CONVERT_OFF: break; - // Translate notes of Poly aftertouch to current note mapping and only allow aftertouch + // Translate notes of poly-aftertouch to current note mapping and only allow aftertouch // for pads with notes case AbstractConfiguration.AFTERTOUCH_CONVERT_POLY: final int n = this.view.getKeyManager ().getMidiNoteFromGrid (note); @@ -61,7 +61,7 @@ public void onPolyAftertouch (final int note, final int value) this.surface.sendMidiEvent (MidiConstants.CMD_POLY_AFTERTOUCH, n, value); break; - // Convert to Channel Aftertouch + // Convert to channel-aftertouch case AbstractConfiguration.AFTERTOUCH_CONVERT_CHANNEL: this.surface.sendMidiEvent (MidiConstants.CMD_CHANNEL_AFTERTOUCH, value, 0); break; diff --git a/src/main/resources/Documentation/DrivenByMoss-Manual.pdf b/src/main/resources/Documentation/DrivenByMoss-Manual.pdf index 472842839..3f1c46969 100644 Binary files a/src/main/resources/Documentation/DrivenByMoss-Manual.pdf and b/src/main/resources/Documentation/DrivenByMoss-Manual.pdf differ