Skip to content

Commit

Permalink
* AutoColor
Browse files Browse the repository at this point in the history
  * 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).
  • Loading branch information
git-moss committed Apr 11, 2024
1 parent f468c84 commit 63d50cc
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
Binary file modified DrivenByMoss-Manual.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


/**
* The configuration settings for Komplete Kontrol MkII.
* The configuration settings for Komplete Kontrol Mk2/3.
*
* @author Jürgen Moßgraber
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ITrack> 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 ();
}

Expand All @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down Expand Up @@ -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++)
Expand All @@ -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<ITrack> 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
Binary file modified src/main/resources/Documentation/DrivenByMoss-Manual.pdf
Binary file not shown.

0 comments on commit 63d50cc

Please sign in to comment.