Skip to content

Commit 3363342

Browse files
committed
* Akai APC40 / APC40mkII
* New: Shift mode is automatically closed again if Shift was used in combination with a button. * Electra One * New: The 3rd knob on the bottom row of the transport page controls now the hovered parameter introduced in Bitwig 5.3. It is required to reinstall the template. * Fire * Fixed: Switching Project and Track parameter pages did jump by 8 and not 1. * Maschine * New: The 4D-Encoder can now control the hovered parameter introduced in Bitwig 5.3. Press it to toggle to that function. * MCU * New: The hovered parameter introduced in Bitwig 5.3 can now also be controlled with the master fader.
1 parent 664a66d commit 3363342

File tree

23 files changed

+277
-61
lines changed

23 files changed

+277
-61
lines changed

DrivenByMoss-Manual.pdf

1.4 KB
Binary file not shown.

dependency-reduced-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>de.mossgrabers</groupId>
55
<artifactId>DrivenByMoss</artifactId>
66
<name>DrivenByMoss</name>
7-
<version>25.1.0</version>
7+
<version>25.1.1</version>
88
<licenses>
99
<license>
1010
<name>LGPL-2.1-or-later</name>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<artifactId>DrivenByMoss</artifactId>
77
<packaging>jar</packaging>
88
<name>DrivenByMoss</name>
9-
<version>25.1.0</version>
9+
<version>25.1.1</version>
1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
</properties>

resources/Electra.One/DrivenByMoss.eproj

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/main/java/de/mossgrabers/controller/akai/apc/APCControllerSetup.java

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

55
package de.mossgrabers.controller.akai.apc;
66

7+
import java.util.Optional;
8+
import java.util.function.IntSupplier;
9+
710
import de.mossgrabers.controller.akai.apc.command.continuous.APCPlayPositionCommand;
811
import de.mossgrabers.controller.akai.apc.command.continuous.APCTempoCommand;
912
import de.mossgrabers.controller.akai.apc.command.trigger.APCBrowserCommand;
@@ -32,6 +35,7 @@
3235
import de.mossgrabers.controller.akai.apc.view.SessionView;
3336
import de.mossgrabers.controller.akai.apc.view.ShiftView;
3437
import de.mossgrabers.framework.command.continuous.KnobRowModeCommand;
38+
import de.mossgrabers.framework.command.core.TriggerCommand;
3539
import de.mossgrabers.framework.command.trigger.Direction;
3640
import de.mossgrabers.framework.command.trigger.FootswitchCommand;
3741
import de.mossgrabers.framework.command.trigger.application.PaneCommand;
@@ -87,8 +91,6 @@
8791
import de.mossgrabers.framework.view.TempoView;
8892
import de.mossgrabers.framework.view.Views;
8993

90-
import java.util.Optional;
91-
9294

9395
/**
9496
* Support for the Akai APC40 mkI and APC40 mkII controllers.
@@ -97,7 +99,8 @@
9799
*/
98100
public class APCControllerSetup extends AbstractControllerSetup<APCControlSurface, APCConfiguration>
99101
{
100-
private final boolean isMkII;
102+
private final boolean isMkII;
103+
private APCTapTempoCommand tapTempoCommand;
101104

102105

103106
/**
@@ -217,7 +220,8 @@ protected void registerTriggerCommands ()
217220
this.addButton (ButtonID.SHIFT, "SHIFT", new ToggleShiftViewCommand<> (this.model, surface), APCControlSurface.APC_BUTTON_SHIFT);
218221
this.addButton (ButtonID.PLAY, "PLAY", new PlayCommand<> (this.model, surface), APCControlSurface.APC_BUTTON_PLAY, t::isPlaying, ColorManager.BUTTON_STATE_OFF, ColorManager.BUTTON_STATE_ON);
219222
this.addButton (ButtonID.RECORD, "RECORD", new APCRecordCommand (this.model, surface), APCControlSurface.APC_BUTTON_RECORD, t::isRecording, ColorManager.BUTTON_STATE_OFF, ColorManager.BUTTON_STATE_ON);
220-
this.addButton (ButtonID.TAP_TEMPO, "TEMPO", new APCTapTempoCommand (this.model, surface), APCControlSurface.APC_BUTTON_TAP_TEMPO);
223+
this.tapTempoCommand = new APCTapTempoCommand (this.model, surface);
224+
this.addButton (ButtonID.TAP_TEMPO, "TEMPO", this.tapTempoCommand, APCControlSurface.APC_BUTTON_TAP_TEMPO);
221225
this.addButton (ButtonID.QUANTIZE, this.isMkII ? "DEV.LOCK" : "REC QUANTIZATION", new APCQuantizeCommand (this.model, surface), APCControlSurface.APC_BUTTON_REC_QUANT, () -> surface.isPressed (ButtonID.QUANTIZE) ? 1 : 0, ColorManager.BUTTON_STATE_OFF, ColorManager.BUTTON_STATE_ON);
222226
this.addButton (ButtonID.MASTERTRACK, "MASTER", new MasterCommand<> (this.model, surface), APCControlSurface.APC_BUTTON_MASTER, this.model.getMasterTrack ()::isSelected, ColorManager.BUTTON_STATE_OFF, ColorManager.BUTTON_STATE_ON);
223227
// Note: the stop-all-clips button has no LED
@@ -316,7 +320,7 @@ protected void registerContinuousCommands ()
316320
this.addFader (ContinuousID.FADER_MASTER, "Master", null, BindType.CC, APCControlSurface.APC_KNOB_MASTER_LEVEL).bind (this.model.getMasterTrack ().getVolumeParameter ());
317321
this.addFader (ContinuousID.CROSSFADER, "Crossfader", null, BindType.CC, APCControlSurface.APC_KNOB_CROSSFADER, false).bind (this.model.getTransport ().getCrossfadeParameter ());
318322

319-
final Timeout timeout = ((APCTapTempoCommand) surface.getButton (ButtonID.TAP_TEMPO).getCommand ()).getTimeout ();
323+
final Timeout timeout = this.tapTempoCommand.getTimeout ();
320324
this.addRelativeKnob (ContinuousID.PLAY_POSITION, "Play Position", new APCPlayPositionCommand (this.model, surface, timeout), APCControlSurface.APC_KNOB_CUE_LEVEL);
321325

322326
for (int i = 0; i < 8; i++)
@@ -775,4 +779,28 @@ private boolean getButtonState (final int index, final int button)
775779
return false;
776780
}
777781
}
782+
783+
784+
/** {@inheritDoc} */
785+
@Override
786+
protected void addButton (final APCControlSurface surface, final ButtonID buttonID, final String label, final TriggerCommand command, final int midiInputChannel, final int midiOutputChannel, final int midiControl, final int value, final boolean hasLight, final IntSupplier supplier, final String... colorIds)
787+
{
788+
// Wrap all commands to automatically close the shift mode, if shift was used in combination
789+
// with a button outside of the grid
790+
791+
final TriggerCommand shiftModeCloserCommand = buttonID == ButtonID.SHIFT ? command : (event, velocity) -> {
792+
793+
if (surface.isShiftPressed () && event == ButtonEvent.DOWN)
794+
{
795+
final ViewManager viewManager = surface.getViewManager ();
796+
if (viewManager.getActiveID () == Views.SHIFT)
797+
viewManager.restore ();
798+
}
799+
800+
command.execute (event, velocity);
801+
802+
};
803+
804+
super.addButton (surface, buttonID, label, shiftModeCloserCommand, midiInputChannel, midiOutputChannel, midiControl, value, hasLight, supplier, colorIds);
805+
}
778806
}

src/main/java/de/mossgrabers/controller/akai/fire/FireConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public int getPadSaturation ()
169169

170170
/**
171171
* Should the SELECT knob control the last touched parameter?
172-
*
172+
*
173173
* @return True to control
174174
*/
175175
public boolean isControlLastParam ()

src/main/java/de/mossgrabers/controller/akai/fire/mode/FireUserMode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public FireUserMode (final FireControlSurface surface, final IModel model)
3939
super (surface, model, false, ContinuousID.createSequentialList (ContinuousID.KNOB1, 4), surface::isShiftPressed, false);
4040

4141
this.notifyPageChange = false;
42+
this.isAlternativeFunction = () -> false;
4243

4344
this.projectParameterProvider = new FourKnobProvider<> (surface, new BankParameterProvider (model.getProject ().getParameterBank ()), ButtonID.ALT);
4445
this.trackParameterProvider = new FourKnobProvider<> (surface, new BankParameterProvider (model.getCursorTrack ().getParameterBank ()), ButtonID.ALT);

src/main/java/de/mossgrabers/controller/electra/one/ElectraOneControllerSetup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ protected void createModel ()
7070

7171
ms.enableMainDrumDevice (false);
7272
ms.enableDevice (DeviceID.EQ);
73+
ms.setWantsFocusedParameter (true);
7374

7475
ms.setNumTracks (5);
7576
ms.setHasFlatTrackList (true);

src/main/java/de/mossgrabers/controller/electra/one/mode/TransportMode.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import de.mossgrabers.framework.daw.data.IMasterTrack;
2020
import de.mossgrabers.framework.daw.data.ISlot;
2121
import de.mossgrabers.framework.daw.data.bank.IMarkerBank;
22+
import de.mossgrabers.framework.parameter.IFocusedParameter;
2223
import de.mossgrabers.framework.parameter.PlayPositionParameter;
2324
import de.mossgrabers.framework.parameter.TempoParameter;
2425
import de.mossgrabers.framework.parameterprovider.special.CombinedParameterProvider;
@@ -73,7 +74,7 @@ emptyParameterProvider5, new FixedParameterProvider (new TempoParameter (model.g
7374
// Row 5
7475
new EmptyParameterProvider (1), new FixedParameterProvider (this.transport.getMetronomeVolumeParameter ()), new FixedParameterProvider (this.project.getCueVolumeParameter ()), new EmptyParameterProvider (3),
7576
// Row 6
76-
emptyParameterProvider6));
77+
new EmptyParameterProvider (2), new FixedParameterProvider (this.model.getFocusedParameter ().get ()), new EmptyParameterProvider (3)));
7778
}
7879

7980

@@ -245,6 +246,10 @@ public void updateDisplay ()
245246

246247
// Row 6
247248
this.pageCache.updateColor (5, 1, this.transport.isMetronomeOn () ? ElectraOneColorManager.METRONOME_ON : ElectraOneColorManager.METRONOME_OFF);
249+
final Optional<IFocusedParameter> focusedParameter = this.model.getFocusedParameter ();
250+
final int paramValue = focusedParameter.isPresent () ? focusedParameter.get ().getValue () : 0;
251+
final String paramStr = focusedParameter.isPresent () ? focusedParameter.get ().getDisplayedValue () : "";
252+
this.pageCache.updateValue (5, 2, paramValue, StringUtils.optimizeName (StringUtils.fixASCII (paramStr), 15));
248253
this.pageCache.updateColor (5, 3, this.transport.isArrangerOverdub () ? ElectraOneColorManager.AUTO_MODE_ON : ElectraOneColorManager.AUTO_MODE_OFF);
249254
this.pageCache.updateColor (5, 4, this.launchMarkers ? ElectraOneColorManager.MARKER_LAUNCH_ON : ElectraOneColorManager.MARKER_LAUNCH_OFF);
250255

src/main/java/de/mossgrabers/controller/mackie/mcu/MCUConfiguration.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ public enum VUMeterStyle
122122
public static final Integer PIN_FXTRACKS_TO_LAST_CONTROLLER = Integer.valueOf (66);
123123
/** Support X-Touch display back-light colors. */
124124
public static final Integer X_TOUCH_DISPLAY_COLORS = Integer.valueOf (67);
125+
/** A button/foot-switch assignment has changed. */
126+
public static final Integer ASSIGNABLE_BUTTONS = Integer.valueOf (68);
125127

126128
/** Use a Function button to switch to previous mode. */
127129
public static final int FOOTSWITCH_PREV_MODE = 15;
@@ -144,9 +146,11 @@ public enum VUMeterStyle
144146
/** Use a Function button to switch to next channel. */
145147
public static final int NEXT_CHANNEL = 24;
146148
/** Toggle between the encoder knob behavior and controlling the last selected parameter. */
147-
public static final int CONTROL_LAST_PARAM = 25;
149+
public static final int CONTROL_LAST_PARAM_ENCODER = 25;
150+
/** Toggle between the master fader behavior and controlling the last selected parameter. */
151+
public static final int CONTROL_LAST_PARAM_MASTER_FADER = 26;
148152
/** Use a Function button to execute an action. */
149-
public static final int FOOTSWITCH_ACTION = 26;
153+
public static final int FOOTSWITCH_ACTION = 27;
150154

151155
private static final String CATEGORY_EXTENDER_SETUP = "Extender Setup (requires restart)";
152156
private static final String CATEGORY_SEGMENT_DISPLAY = "Segment Display";
@@ -203,7 +207,8 @@ public enum VUMeterStyle
203207
"Device on/off",
204208
"Channel Prev",
205209
"Channel Next",
206-
"Last hovered/clicked parameter",
210+
"Last parameter (encoder)",
211+
"Last parameter (master fader)",
207212
"Action"
208213
};
209214

@@ -727,7 +732,12 @@ private void activateAssignableSettings (final ISettingsUI settingsUI)
727732
{
728733
final int pos = i;
729734
final IEnumSetting assignableSetting = settingsUI.getEnumSetting (ASSIGNABLE_BUTTON_NAMES[i], CATEGORY_ASSIGNABLE_BUTTONS, ASSIGNABLE_VALUES, ASSIGNABLE_VALUES[ASSIGNABLE_BUTTON_DEFAULTS[i]]);
730-
assignableSetting.addValueObserver (value -> this.assignableFunctions[pos] = lookupIndex (ASSIGNABLE_VALUES, value));
735+
assignableSetting.addValueObserver (value -> {
736+
737+
this.assignableFunctions[pos] = lookupIndex (ASSIGNABLE_VALUES, value);
738+
this.notifyObservers (ASSIGNABLE_BUTTONS);
739+
740+
});
731741

732742
final IActionSetting actionSetting = settingsUI.getActionSetting (ASSIGNABLE_BUTTON_NAMES[i] + " - Action", CATEGORY_ASSIGNABLE_BUTTONS);
733743
actionSetting.addValueObserver (value -> this.assignableFunctionActions[pos] = actionSetting.get ());

0 commit comments

Comments
 (0)