Skip to content

Commit 63d50cc

Browse files
committed
* AutoColor
* Fixed: Delayed the color change a bit to allow Undo to work. * HUI * Fixed: The right VU meter was not working * Native Instruments Kontrol * New: Mute/solo states are switched off in Parameter and Send Mode to prevent that the graphics get darkened in the display. Mute/solo buttons can still be used but state will not be visible in these modes. * Fixed: Added missing Poly-Aftertouch (available in 88-key model).
1 parent f468c84 commit 63d50cc

File tree

8 files changed

+33
-26
lines changed

8 files changed

+33
-26
lines changed

DrivenByMoss-Manual.pdf

1.38 KB
Binary file not shown.

src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
/**
18-
* The configuration settings for Komplete Kontrol MkII.
18+
* The configuration settings for Komplete Kontrol Mk2/3.
1919
*
2020
* @author Jürgen Moßgraber
2121
*/

src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/KontrolProtocolControllerSetup.java

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,6 @@ public void flush ()
125125
this.kompleteInstance = kompleteInstanceNew;
126126
surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_INSTANCE, 0, 0, kompleteInstanceNew);
127127
}
128-
129-
final ITrackBank bank = this.model.getCurrentTrackBank ();
130-
131-
final boolean hasSolo = this.model.getProject ().hasSolo ();
132-
for (int i = 0; i < 8; i++)
133-
{
134-
final ITrack track = bank.getItem (i);
135-
surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, track.isMute () ? 1 : 0, i);
136-
surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, track.isSolo () ? 1 : 0, i);
137-
surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, !track.isSolo () && hasSolo ? 1 : 0, i);
138-
}
139-
140-
final ITrackBank tb = this.model.getCurrentTrackBank ();
141-
final Optional<ITrack> selectedTrack = tb.getSelectedItem ();
142-
surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, selectedTrack.isPresent () ? TrackType.toTrackType (selectedTrack.get ().getType ()) : 0);
143-
surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, selectedTrack.isPresent () && !selectedTrack.get ().isSolo () && hasSolo ? 1 : 0);
144-
145128
super.flush ();
146129
}
147130

@@ -162,8 +145,9 @@ protected void createSurface ()
162145
final IMidiAccess midiAccess = this.factory.createMidiAccess ();
163146
final IMidiOutput output = midiAccess.createOutput ();
164147
final IMidiInput pianoInput = midiAccess.createInput (1, "Keyboard", "8?????" /* Note off */,
165-
"9?????" /* Note on */, "B?????" /* Sustain pedal + Modulation + Strip */,
166-
"D?????" /* Channel After-touch */, "E?????" /* Pitch-bend */);
148+
"9?????" /* Note on */, "A?????" /* Poly-Aftertouch */,
149+
"B?????" /* Sustain-pedal + Modulation + Strip */, "D?????" /* Channel-Aftertouch */,
150+
"E?????" /* Pitch-bend */);
167151
final KontrolProtocolControlSurface surface = new KontrolProtocolControlSurface (this.host, this.colorManager, this.configuration, output, midiAccess.createInput (null), this.version);
168152
this.surfaces.add (surface);
169153

src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/MixerMode.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
package de.mossgrabers.controller.ni.kontrol.mkii.mode;
66

7+
import java.util.List;
8+
import java.util.Optional;
9+
710
import de.mossgrabers.controller.ni.kontrol.mkii.KontrolProtocolConfiguration;
811
import de.mossgrabers.controller.ni.kontrol.mkii.TrackType;
912
import de.mossgrabers.controller.ni.kontrol.mkii.controller.KontrolProtocol;
@@ -19,9 +22,6 @@
1922
import de.mossgrabers.framework.parameterprovider.track.PanParameterProvider;
2023
import de.mossgrabers.framework.parameterprovider.track.VolumeParameterProvider;
2124

22-
import java.util.List;
23-
import java.util.Optional;
24-
2525

2626
/**
2727
* The mixer mode.
@@ -103,6 +103,7 @@ public int getKnobValue (final int index)
103103
public void updateDisplay ()
104104
{
105105
final IValueChanger valueChanger = this.model.getValueChanger ();
106+
final boolean hasSolo = this.model.getProject ().hasSolo ();
106107

107108
final int [] vuData = new int [16];
108109
for (int i = 0; i < 8; i++)
@@ -120,6 +121,14 @@ public void updateDisplay ()
120121
final int j = 2 * i;
121122
vuData[j] = valueChanger.toMidiValue (track.getVuLeft ());
122123
vuData[j + 1] = valueChanger.toMidiValue (track.getVuRight ());
124+
125+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, track.isMute () ? 1 : 0, i);
126+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, track.isSolo () ? 1 : 0, i);
127+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, !track.isSolo () && hasSolo ? 1 : 0, i);
128+
129+
final Optional<ITrack> selectedTrack = this.bank.getSelectedItem ();
130+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, selectedTrack.isPresent () ? TrackType.toTrackType (selectedTrack.get ().getType ()) : 0);
131+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, selectedTrack.isPresent () && !selectedTrack.get ().isSolo () && hasSolo ? 1 : 0);
123132
}
124133
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData);
125134
}

src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/ParamsMode.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ public void updateDisplay ()
140140
final int j = 2 * i;
141141
vuData[j] = valueChanger.toMidiValue (parameter.getModulatedValue ());
142142
vuData[j + 1] = valueChanger.toMidiValue (parameter.getModulatedValue ());
143+
144+
// Switch off all mutes and solos otherwise "tracks" will be darkened
145+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, 0, i);
146+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, 0, i);
147+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, 0, i);
148+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, 0);
149+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, 0);
143150
}
144151
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData);
145152
}

src/main/java/de/mossgrabers/controller/ni/kontrol/mkii/mode/SendMode.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ public void updateDisplay ()
128128
final int j = 2 * i;
129129
vuData[j] = valueChanger.toMidiValue (send.getModulatedValue ());
130130
vuData[j + 1] = valueChanger.toMidiValue (send.getModulatedValue ());
131+
132+
// Switch off all mutes and solos otherwise "tracks" will be darkened
133+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTE, 0, i);
134+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_SOLO, 0, i);
135+
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_MUTED_BY_SOLO, 0, i);
136+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_AVAILABLE, 0);
137+
this.surface.sendCommand (KontrolProtocolControlSurface.KONTROL_SELECTED_TRACK_MUTED_BY_SOLO, 0);
131138
}
132139
this.surface.sendKontrolTrackSysEx (KontrolProtocolControlSurface.KONTROL_TRACK_VU, 2, 0, vuData);
133140
}

src/main/java/de/mossgrabers/framework/command/aftertouch/AftertouchViewCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public void onPolyAftertouch (final int note, final int value)
4848
final int convertAftertouch = config.getConvertAftertouch ();
4949
switch (convertAftertouch)
5050
{
51-
// Filter poly aftertouch
51+
// Filter poly-aftertouch
5252
case AbstractConfiguration.AFTERTOUCH_CONVERT_OFF:
5353
break;
5454

55-
// Translate notes of Poly aftertouch to current note mapping and only allow aftertouch
55+
// Translate notes of poly-aftertouch to current note mapping and only allow aftertouch
5656
// for pads with notes
5757
case AbstractConfiguration.AFTERTOUCH_CONVERT_POLY:
5858
final int n = this.view.getKeyManager ().getMidiNoteFromGrid (note);
@@ -61,7 +61,7 @@ public void onPolyAftertouch (final int note, final int value)
6161
this.surface.sendMidiEvent (MidiConstants.CMD_POLY_AFTERTOUCH, n, value);
6262
break;
6363

64-
// Convert to Channel Aftertouch
64+
// Convert to channel-aftertouch
6565
case AbstractConfiguration.AFTERTOUCH_CONVERT_CHANNEL:
6666
this.surface.sendMidiEvent (MidiConstants.CMD_CHANNEL_AFTERTOUCH, value, 0);
6767
break;
1.38 KB
Binary file not shown.

0 commit comments

Comments
 (0)