Skip to content

Commit 1be84ae

Browse files
committed
* Generic Flexi
* New: Added functions for 1st instrument device. * New: The name of the keyboard input can now be configured. * New: Added more functions to navigate project/track remote pages. * Fixed: Track Remote functions did also show up in Track functions but did not work. * Updated manual
1 parent 91b500b commit 1be84ae

File tree

11 files changed

+505
-11
lines changed

11 files changed

+505
-11
lines changed

DrivenByMoss-Manual.pdf

2.38 KB
Binary file not shown.

src/main/java/de/mossgrabers/controller/ableton/push/controller/PushControlSurface.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ public class PushControlSurface extends AbstractControlSurface<PushConfiguration
470470
public PushControlSurface (final IHost host, final ColorManager colorManager, final PushConfiguration configuration, final IMidiOutput output, final IMidiInput input)
471471
{
472472
super (host, configuration, colorManager, output, input, new PadGridImpl (colorManager, output), 200, 156);
473+
474+
this.notifyViewChange = false;
473475

474476
for (int i = 0; i < this.colorPalette.length; i++)
475477
this.colorPalette[i] = new PaletteEntry (PushColorManager.getPaletteColorRGB (i));

src/main/java/de/mossgrabers/controller/generic/GenericFlexiConfiguration.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public class GenericFlexiConfiguration extends AbstractConfiguration
6969
private static final String CATEGORY_KEYBOARD = "Keyboard / Pads (requires restart)";
7070
private static final String CATEGORY_OPTIONS = "Options";
7171

72-
private static final String [] NAMES = FlexiCommand.getNames ();
73-
7472
/** The types. */
7573
public static final List<String> OPTIONS_TYPE = List.of ("Off", "CC", "Note", "Program Change", "Pitchbend", "MMC");
7674

@@ -295,6 +293,7 @@ public class GenericFlexiConfiguration extends AbstractConfiguration
295293

296294
private String selectedMode = MODES.get (0);
297295

296+
private String keyboardInputName = "Generic Flexi";
298297
private boolean isMPEEnabled = false;
299298
private int mpePitchBendRange = 48;
300299
private int keyboardChannel = 0;
@@ -401,7 +400,7 @@ else if (number >= 64)
401400
final CommandCategory [] values = CommandCategory.values ();
402401
for (final CommandCategory value: values)
403402
{
404-
final IEnumSetting fs = createFunctionSetting (value.getName (), category, globalSettings);
403+
final IEnumSetting fs = createFunctionSetting (value, category, globalSettings);
405404
this.functionSettings.add (fs);
406405
this.functionSettingsMap.put (value, fs);
407406
fs.addValueObserver (this::handleFunctionChange);
@@ -481,6 +480,9 @@ else if (number >= 64)
481480
///////////////////////////////////////////////
482481
// Keyboard / Pads
483482

483+
final IStringSetting keyboardInputNameSetting = globalSettings.getStringSetting ("Input Name", CATEGORY_KEYBOARD, 100, "Generic Flexi");
484+
this.keyboardInputName = keyboardInputNameSetting.get ();
485+
484486
final IEnumSetting enableMPESetting = globalSettings.getEnumSetting ("MIDI Polyphonic Expression (MPE)", CATEGORY_KEYBOARD, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
485487
this.isMPEEnabled = ON_OFF_OPTIONS[1].equals (enableMPESetting.get ());
486488

@@ -739,6 +741,17 @@ public Set<FlexiCommand> getMappedCommands ()
739741
}
740742

741743

744+
/**
745+
* Get the name to use for the MIDI keyboard input.
746+
*
747+
* @return The name
748+
*/
749+
public String getKeyboardInputName ()
750+
{
751+
return this.keyboardInputName;
752+
}
753+
754+
742755
/**
743756
* Get the MPE state.
744757
*
@@ -1136,17 +1149,17 @@ private void notifyCommandObserver ()
11361149
}
11371150

11381151

1139-
private static IEnumSetting createFunctionSetting (final String functionCategory, final String settingCategory, final ISettingsUI settingsUI)
1152+
private static IEnumSetting createFunctionSetting (final CommandCategory commandCategory, final String settingCategory, final ISettingsUI settingsUI)
11401153
{
11411154
final List<String> functionsNames = new ArrayList<> ();
11421155
functionsNames.add (FlexiCommand.OFF.getName ());
1143-
for (final String name: NAMES)
1156+
for (final FlexiCommand command: FlexiCommand.values ())
11441157
{
1145-
if (name.startsWith (functionCategory))
1146-
functionsNames.add (name);
1158+
if (command.getCategory () == commandCategory)
1159+
functionsNames.add (command.getName ());
11471160
}
11481161
final String [] array = functionsNames.toArray (new String [functionsNames.size ()]);
1149-
return settingsUI.getEnumSetting (functionCategory + ":", settingCategory, array, array[0]);
1162+
return settingsUI.getEnumSetting (commandCategory.getName () + ":", settingCategory, array, array[0]);
11501163
}
11511164

11521165

src/main/java/de/mossgrabers/controller/generic/GenericFlexiControllerSetup.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import de.mossgrabers.controller.generic.flexihandler.EqHandler;
1414
import de.mossgrabers.controller.generic.flexihandler.FxTrackHandler;
1515
import de.mossgrabers.controller.generic.flexihandler.GlobalHandler;
16+
import de.mossgrabers.controller.generic.flexihandler.InstrumentDeviceHandler;
1617
import de.mossgrabers.controller.generic.flexihandler.LayerHandler;
1718
import de.mossgrabers.controller.generic.flexihandler.LayoutHandler;
1819
import de.mossgrabers.controller.generic.flexihandler.MarkerHandler;
@@ -184,6 +185,7 @@ protected void createModel ()
184185
ms.enableMainDrumDevice (false);
185186
ms.setNumMarkers (8);
186187
ms.enableDevice (DeviceID.EQ);
188+
ms.enableDevice (DeviceID.FIRST_INSTRUMENT);
187189
this.model = this.factory.createModel (this.configuration, this.colorManager, this.valueChanger, this.scales, ms);
188190

189191
this.model.getTrackBank ().setIndication (true);
@@ -197,11 +199,14 @@ protected void createSurface ()
197199
final IMidiAccess midiAccess = this.factory.createMidiAccess ();
198200
final IMidiOutput output = midiAccess.createOutput ();
199201

202+
final String keyboardInputName = this.configuration.getKeyboardInputName ();
203+
final String portName = keyboardInputName.isBlank () ? "Generic Flexi" : keyboardInputName;
204+
200205
final String inputName;
201206
if (this.configuration.isMPEEndabled ())
202-
inputName = "Generic Flexi (MPE)";
207+
inputName = portName + " (MPE)";
203208
else
204-
inputName = this.configuration.getKeyboardChannel () < 0 ? null : "Generic Flexi";
209+
inputName = this.configuration.getKeyboardChannel () < 0 ? null : portName;
205210

206211
final List<String> filters = this.getMidiFilters ();
207212
final IMidiInput input = midiAccess.createInput (inputName, filters.toArray (new String [filters.size ()]));
@@ -318,6 +323,7 @@ private void registerHandlers (final GenericFlexiControlSurface surface)
318323
surface.registerHandler (new FxTrackHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
319324
surface.registerHandler (new MasterHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
320325
surface.registerHandler (new DeviceHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
326+
surface.registerHandler (new InstrumentDeviceHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
321327
surface.registerHandler (new LayerHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
322328
surface.registerHandler (new EqHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));
323329
surface.registerHandler (new BrowserHandler (this.model, surface, this.configuration, this.absoluteLowResValueChanger, this.signedBitRelativeValueChanger, this.offsetBinaryRelativeValueChanger));

src/main/java/de/mossgrabers/controller/generic/controller/CommandCategory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public enum CommandCategory
1515
BROWSER("Browser"),
1616
CLIP("Clip"),
1717
DEVICE("Device"),
18+
INSTRUMENT_DEVICE("1st Instrument Device"),
1819
EQ("EQ"),
1920
FX_TRACK("FX Track"),
2021
GLOBAL("Global"),

src/main/java/de/mossgrabers/controller/generic/controller/FlexiCommand.java

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,49 @@ public enum FlexiCommand
546546
DEVICE_TOGGLE_PARAMETER_7(CommandCategory.DEVICE, "Device: Toggle Parameter 7", true),
547547
DEVICE_TOGGLE_PARAMETER_8(CommandCategory.DEVICE, "Device: Toggle Parameter 8", true),
548548

549+
INSTRUMENT_DEVICE_TOGGLE_WINDOW(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Window", true),
550+
INSTRUMENT_DEVICE_TOGGLE_BYPASS(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Bypass", true),
551+
INSTRUMENT_DEVICE_TOGGLE_EXPAND(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Expand", true),
552+
INSTRUMENT_DEVICE_TOGGLE_PARAMETERS(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Parameters", true),
553+
INSTRUMENT_DEVICE_SELECT_PREVIOUS_PARAMETER_PAGE(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Previous Parameter Page", true),
554+
INSTRUMENT_DEVICE_SELECT_NEXT_PARAMETER_PAGE(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Next Parameter Page", true),
555+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_1(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 1", true),
556+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_2(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 2", true),
557+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_3(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 3", true),
558+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_4(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 4", true),
559+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_5(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 5", true),
560+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_6(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 6", true),
561+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_7(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 7", true),
562+
INSTRUMENT_DEVICE_SELECT_PARAMETER_PAGE_8(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Parameter Page 8", true),
563+
INSTRUMENT_DEVICE_SCROLL_PARAMETER_PAGES(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Scroll Parameter Pages", false),
564+
INSTRUMENT_DEVICE_SELECT_PREVIOUS_PARAMETER_BANK(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Previous Parameter Bank", true),
565+
INSTRUMENT_DEVICE_SELECT_NEXT_PARAMETER_BANK(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Select Next Parameter Bank", true),
566+
INSTRUMENT_DEVICE_SCROLL_PARAMETER_BANKS(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Scroll Parameter Banks", false),
567+
INSTRUMENT_DEVICE_SET_PARAMETER_1(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 1", false),
568+
INSTRUMENT_DEVICE_SET_PARAMETER_2(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 2", false),
569+
INSTRUMENT_DEVICE_SET_PARAMETER_3(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 3", false),
570+
INSTRUMENT_DEVICE_SET_PARAMETER_4(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 4", false),
571+
INSTRUMENT_DEVICE_SET_PARAMETER_5(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 5", false),
572+
INSTRUMENT_DEVICE_SET_PARAMETER_6(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 6", false),
573+
INSTRUMENT_DEVICE_SET_PARAMETER_7(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 7", false),
574+
INSTRUMENT_DEVICE_SET_PARAMETER_8(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Set Parameter 8", false),
575+
INSTRUMENT_DEVICE_RESET_PARAMETER_1(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 1", true),
576+
INSTRUMENT_DEVICE_RESET_PARAMETER_2(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 2", true),
577+
INSTRUMENT_DEVICE_RESET_PARAMETER_3(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 3", true),
578+
INSTRUMENT_DEVICE_RESET_PARAMETER_4(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 4", true),
579+
INSTRUMENT_DEVICE_RESET_PARAMETER_5(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 5", true),
580+
INSTRUMENT_DEVICE_RESET_PARAMETER_6(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 6", true),
581+
INSTRUMENT_DEVICE_RESET_PARAMETER_7(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 7", true),
582+
INSTRUMENT_DEVICE_RESET_PARAMETER_8(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Reset Parameter 8", true),
583+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_1(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 1", true),
584+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_2(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 2", true),
585+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_3(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 3", true),
586+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_4(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 4", true),
587+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_5(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 5", true),
588+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_6(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 6", true),
589+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_7(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 7", true),
590+
INSTRUMENT_DEVICE_TOGGLE_PARAMETER_8(CommandCategory.INSTRUMENT_DEVICE, "Instrument Device: Toggle Parameter 8", true),
591+
549592
LAYER_SELECT_PREVIOUS_BANK_PAGE(CommandCategory.LAYER, "Layer: Select Previous Bank Page", true),
550593
LAYER_SELECT_NEXT_BANK_PAGE(CommandCategory.LAYER, "Layer: Select Next Bank Page", true),
551594
LAYER_SELECT_PREVIOUS_LAYER(CommandCategory.LAYER, "Layer: Select Previous Layer", true),
@@ -1026,6 +1069,18 @@ public enum FlexiCommand
10261069
PROJECT_TOGGLE_PARAMETER_8(CommandCategory.PROJECT_REMOTES, "Project Remotes: Toggle Parameter 8", true),
10271070
PROJECT_SELECT_PREVIOUS_PAGE(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Previous Page", true),
10281071
PROJECT_SELECT_NEXT_PAGE(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Next Page", true),
1072+
PROJECT_SELECT_PARAMETER_PAGE_1(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 1", true),
1073+
PROJECT_SELECT_PARAMETER_PAGE_2(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 2", true),
1074+
PROJECT_SELECT_PARAMETER_PAGE_3(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 3", true),
1075+
PROJECT_SELECT_PARAMETER_PAGE_4(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 4", true),
1076+
PROJECT_SELECT_PARAMETER_PAGE_5(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 5", true),
1077+
PROJECT_SELECT_PARAMETER_PAGE_6(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 6", true),
1078+
PROJECT_SELECT_PARAMETER_PAGE_7(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 7", true),
1079+
PROJECT_SELECT_PARAMETER_PAGE_8(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Parameter Page 8", true),
1080+
PROJECT_SCROLL_PARAMETER_PAGES(CommandCategory.PROJECT_REMOTES, "Project Remotes: Scroll Parameter Pages", false),
1081+
PROJECT_SELECT_PREVIOUS_PARAMETER_BANK(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Previous Parameter Bank", true),
1082+
PROJECT_SELECT_NEXT_PARAMETER_BANK(CommandCategory.PROJECT_REMOTES, "Project Remotes: Select Next Parameter Bank", true),
1083+
PROJECT_SCROLL_PARAMETER_BANKS(CommandCategory.PROJECT_REMOTES, "Project Remotes: Scroll Parameter Banks", false),
10291084

10301085
TRACK_SET_PARAMETER_1(CommandCategory.TRACK_REMOTES, "Track Remotes: Set Parameter 1", false),
10311086
TRACK_SET_PARAMETER_2(CommandCategory.TRACK_REMOTES, "Track Remotes: Set Parameter 2", false),
@@ -1053,6 +1108,18 @@ public enum FlexiCommand
10531108
TRACK_TOGGLE_PARAMETER_8(CommandCategory.TRACK_REMOTES, "Track Remotes: Toggle Parameter 8", true),
10541109
TRACK_SELECT_PREVIOUS_PAGE(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Previous Page", true),
10551110
TRACK_SELECT_NEXT_PAGE(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Next Page", true),
1111+
TRACK_SELECT_PARAMETER_PAGE_1(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 1", true),
1112+
TRACK_SELECT_PARAMETER_PAGE_2(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 2", true),
1113+
TRACK_SELECT_PARAMETER_PAGE_3(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 3", true),
1114+
TRACK_SELECT_PARAMETER_PAGE_4(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 4", true),
1115+
TRACK_SELECT_PARAMETER_PAGE_5(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 5", true),
1116+
TRACK_SELECT_PARAMETER_PAGE_6(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 6", true),
1117+
TRACK_SELECT_PARAMETER_PAGE_7(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 7", true),
1118+
TRACK_SELECT_PARAMETER_PAGE_8(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Parameter Page 8", true),
1119+
TRACK_SCROLL_PARAMETER_PAGES(CommandCategory.TRACK_REMOTES, "Track Remotes: Scroll Parameter Pages", false),
1120+
TRACK_SELECT_PREVIOUS_PARAMETER_BANK(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Previous Parameter Bank", true),
1121+
TRACK_SELECT_NEXT_PARAMETER_BANK(CommandCategory.TRACK_REMOTES, "Track Remotes: Select Next Parameter Bank", true),
1122+
TRACK_SCROLL_PARAMETER_BANKS(CommandCategory.TRACK_REMOTES, "Track Remotes: Scroll Parameter Banks", false),
10561123

10571124
ACTION_1(CommandCategory.ACTION, "Action: Execute Action 1", true),
10581125
ACTION_2(CommandCategory.ACTION, "Action: Execute Action 2", true),

0 commit comments

Comments
 (0)