Skip to content

Commit

Permalink
* New: Added support for APCmini mk2.
Browse files Browse the repository at this point in the history
* New: Updated to Bitwig API 19.
* APCmini mk1
  * New: Added option to toggle 'Notify played chords' on/off.
* Fire
  * Fixed: Drum 64 view: Shifting the notes up/down with select knob did not work.
* Fire, Launchpad, Push
  * Fixed: Drum 64 view: Notes were not in sync with pad colors.
* Push
  * Fixed: Drum XoX view was missing from preferred view selection in settings.
  • Loading branch information
git-moss committed Oct 5, 2024
1 parent 3591f16 commit 93089a1
Show file tree
Hide file tree
Showing 35 changed files with 1,070 additions and 304 deletions.
Binary file modified DrivenByMoss-Manual.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>de.mossgrabers</groupId>
<artifactId>DrivenByMoss</artifactId>
<name>DrivenByMoss</name>
<version>24.4.0</version>
<version>24.5.0</version>
<licenses>
<license>
<name>LGPL-2.1-or-later</name>
Expand Down Expand Up @@ -158,7 +158,7 @@
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.1</version>
<configuration>
<ignoredVersions>.*-M.*,.*-alpha.*,.*-beta.*,.*-ea.*</ignoredVersions>
<ignoredVersions>.*-M.*,.*-alpha.*,.*-beta.*,.*-ea.*,.*-rc.*</ignoredVersions>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
Expand Down Expand Up @@ -204,7 +204,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
</plugin>
</plugins>
</build>
Expand All @@ -228,7 +228,7 @@
<dependency>
<groupId>com.bitwig</groupId>
<artifactId>extension-api</artifactId>
<version>18</version>
<version>19</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>DrivenByMoss</artifactId>
<packaging>jar</packaging>
<name>DrivenByMoss</name>
<version>24.4.0</version>
<version>24.5.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down Expand Up @@ -40,17 +40,17 @@
<dependency>
<groupId>com.bitwig</groupId>
<artifactId>extension-api</artifactId>
<version>18</version>
<version>19</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.14.0</version>
<version>5.15.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.14.0</version>
<version>5.15.0</version>
</dependency>
<dependency>
<groupId>purejavahidapi</groupId>
Expand All @@ -65,7 +65,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.2</version>
<version>2.18.0</version>
</dependency>
<!-- Gamepad support. -->
<dependency>
Expand Down Expand Up @@ -235,7 +235,7 @@
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.1</version>
<configuration>
<ignoredVersions>.*-M.*,.*-alpha.*,.*-beta.*,.*-ea.*</ignoredVersions>
<ignoredVersions>.*-M.*,.*-alpha.*,.*-beta.*,.*-ea.*,.*-rc.*</ignoredVersions>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
Expand Down Expand Up @@ -291,7 +291,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
</plugin>

</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,42 @@

package de.mossgrabers.bitwig.controller.akai.apcmini;

import com.bitwig.extension.controller.api.ControllerHost;

import de.mossgrabers.bitwig.framework.BitwigSetupFactory;
import de.mossgrabers.bitwig.framework.configuration.SettingsUIImpl;
import de.mossgrabers.bitwig.framework.daw.HostImpl;
import de.mossgrabers.bitwig.framework.extension.AbstractControllerExtensionDefinition;
import de.mossgrabers.controller.akai.apcmini.APCminiConfiguration;
import de.mossgrabers.controller.akai.apcmini.APCminiControllerDefinition;
import de.mossgrabers.controller.akai.apcmini.APCminiControllerSetup;
import de.mossgrabers.controller.akai.apcmini.controller.APCminiControlSurface;
import de.mossgrabers.controller.akai.apcmini.definition.APCminiMk1ControllerDefinition;
import de.mossgrabers.framework.controller.IControllerSetup;

import com.bitwig.extension.controller.api.ControllerHost;


/**
* Definition class for the Akai APCmini controller.
* Definition class for the Akai APCmini Mk1 controller.
*
* @author Jürgen Moßgraber
*/
public class APCminiControllerExtensionDefinition extends AbstractControllerExtensionDefinition<APCminiControlSurface, APCminiConfiguration>
public class APCminiMk1ControllerExtensionDefinition extends AbstractControllerExtensionDefinition<APCminiControlSurface, APCminiConfiguration>
{
private static final APCminiMk1ControllerDefinition DEFINITION = new APCminiMk1ControllerDefinition ();


/**
* Constructor.
*/
public APCminiControllerExtensionDefinition ()
public APCminiMk1ControllerExtensionDefinition ()
{
super (new APCminiControllerDefinition ());
super (DEFINITION);
}


/** {@inheritDoc} */
@Override
protected IControllerSetup<APCminiControlSurface, APCminiConfiguration> getControllerSetup (final ControllerHost host)
{
return new APCminiControllerSetup (new HostImpl (host), new BitwigSetupFactory (host), new SettingsUIImpl (host, host.getPreferences ()), new SettingsUIImpl (host, host.getDocumentState ()));
return new APCminiControllerSetup (new HostImpl (host), new BitwigSetupFactory (host), new SettingsUIImpl (host, host.getPreferences ()), new SettingsUIImpl (host, host.getDocumentState ()), DEFINITION);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Written by Jürgen Moßgraber - mossgrabers.de
// (c) 2017-2024
// Licensed under LGPLv3 - http://www.gnu.org/licenses/lgpl-3.0.txt

package de.mossgrabers.bitwig.controller.akai.apcmini;

import com.bitwig.extension.controller.api.ControllerHost;

import de.mossgrabers.bitwig.framework.BitwigSetupFactory;
import de.mossgrabers.bitwig.framework.configuration.SettingsUIImpl;
import de.mossgrabers.bitwig.framework.daw.HostImpl;
import de.mossgrabers.bitwig.framework.extension.AbstractControllerExtensionDefinition;
import de.mossgrabers.controller.akai.apcmini.APCminiConfiguration;
import de.mossgrabers.controller.akai.apcmini.APCminiControllerSetup;
import de.mossgrabers.controller.akai.apcmini.controller.APCminiControlSurface;
import de.mossgrabers.controller.akai.apcmini.definition.APCminiMk2ControllerDefinition;
import de.mossgrabers.framework.controller.IControllerSetup;


/**
* Definition class for the Akai APCmini Mk2 controller.
*
* @author Jürgen Moßgraber
*/
public class APCminiMk2ControllerExtensionDefinition extends AbstractControllerExtensionDefinition<APCminiControlSurface, APCminiConfiguration>
{
private static final APCminiMk2ControllerDefinition DEFINITION = new APCminiMk2ControllerDefinition ();


/**
* Constructor.
*/
public APCminiMk2ControllerExtensionDefinition ()
{
super (DEFINITION);
}


/** {@inheritDoc} */
@Override
protected IControllerSetup<APCminiControlSurface, APCminiConfiguration> getControllerSetup (final ControllerHost host)
{
return new APCminiControllerSetup (new HostImpl (host), new BitwigSetupFactory (host), new SettingsUIImpl (host, host.getPreferences ()), new SettingsUIImpl (host, host.getDocumentState ()), DEFINITION);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public enum LockState
Views.DRUM,
Views.DRUM4,
Views.DRUM8,
Views.DRUM_XOX,
Views.SEQUENCER,
Views.RAINDROPS,
Views.POLY_SEQUENCER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public class ColorPalette
{
private final PushControlSurface surface;
private final ColorPaletteEntry [] entries = new ColorPaletteEntry [128];
private Object updateLock = new Object ();
private final Object updateLock = new Object ();
private boolean entriesHasUpdate = false;


/**
* Constructor.
*
*
* @param surface The surface
*/
public ColorPalette (final PushControlSurface surface)
Expand Down Expand Up @@ -106,7 +106,7 @@ public void handleColorPaletteMessage (final int [] data)

/**
* Get the next palette entry which needs to be updated.
*
*
* @return The index of the entry or -1 if no further updates are required
*/
private int findNextEntry ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static enum State

/**
* Constructor.
*
*
* @param index The index of the entry
* @param color The default palette color consisting of three integers for red, green and blue
*/
Expand Down Expand Up @@ -82,7 +82,7 @@ public boolean requiresUpdate (final int [] data)

/**
* Increases the read request for this palette entry.
*
*
* @return True if another attempt is allowed, false if the maximum number of retries has been
* reached
*/
Expand All @@ -103,7 +103,7 @@ public boolean incReadRetries ()

/**
* Increases the write request for this palette entry.
*
*
* @return True if another attempt is allowed, false if the maximum number of retries has been
* reached
*/
Expand Down Expand Up @@ -177,7 +177,7 @@ public State getState ()

/**
* Get the time in milliseconds when the read/write request was sent.
*
*
* @return the sendTimestamp The milliseconds
*/
public long getSendTimestamp ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

package de.mossgrabers.controller.akai.apcmini;

import java.util.List;

import de.mossgrabers.controller.akai.apcmini.definition.IAPCminiControllerDefinition;
import de.mossgrabers.framework.configuration.AbstractConfiguration;
import de.mossgrabers.framework.configuration.IEnumSetting;
import de.mossgrabers.framework.configuration.ISettingsUI;
Expand All @@ -12,8 +15,6 @@
import de.mossgrabers.framework.daw.midi.ArpeggiatorMode;
import de.mossgrabers.framework.view.Views;

import java.util.List;


/**
* The configuration settings for APC.
Expand All @@ -23,28 +24,35 @@
public class APCminiConfiguration extends AbstractConfiguration
{
/** Default function of the faders. */
public static final Integer FADER_CTRL = Integer.valueOf (50);
public static final Integer FADER_CTRL = Integer.valueOf (50);
/** Default function of the track buttons. */
public static final Integer SOFT_KEYS = Integer.valueOf (51);
public static final Integer SOFT_KEYS = Integer.valueOf (51);
/** The pad brightness. */
public static final Integer PAD_BRIGHTNESS = Integer.valueOf (52);

private static final List<String> FADER_CTRL_OPTIONS = List.of ("Volume", "Pan", "Send 1", "Send 2", "Send 3", "Send 4", "Send 5", "Send 6", "Send 7", "Send 8", "Device");
private static final List<String> FADER_CTRL_OPTIONS = List.of ("Volume", "Pan", "Send 1", "Send 2", "Send 3", "Send 4", "Send 5", "Send 6", "Send 7", "Send 8", "Device");

private static final List<String> BRIGHTNESS_OPTIONS = List.of ("10%", "25%", "50%", "65%", "75%", "90%", "100%");

/** The names of the track button functions. */
public static final List<String> SOFT_KEYS_OPTIONS = List.of ("Clip Stop", "Solo", "Rec Arm", "Mute", "Select");
public static final List<String> SOFT_KEYS_OPTIONS = List.of ("Clip Stop", "Solo", "Rec Arm", "Mute", "Select");

private static final Views [] PREFERRED_NOTE_VIEWS =
private static final Views [] PREFERRED_NOTE_VIEWS =
{
Views.PLAY,
Views.DRUM,
Views.SEQUENCER,
Views.RAINDROPS
};

private String faderCtrl = FADER_CTRL_OPTIONS.get (0);
private String softKeys = SOFT_KEYS_OPTIONS.get (0);
private final IAPCminiControllerDefinition definition;

private String faderCtrl = FADER_CTRL_OPTIONS.get (0);
private String softKeys = SOFT_KEYS_OPTIONS.get (0);

private IEnumSetting faderCtrlSetting;
private IEnumSetting softKeysSetting;
private IEnumSetting faderCtrlSetting;
private IEnumSetting softKeysSetting;
private int padBrightness = 4;


/**
Expand All @@ -53,17 +61,32 @@ public class APCminiConfiguration extends AbstractConfiguration
* @param host The DAW host
* @param valueChanger The value changer
* @param arpeggiatorModes The available arpeggiator modes
* @param definition The specific APCmini
*/
public APCminiConfiguration (final IHost host, final IValueChanger valueChanger, final List<ArpeggiatorMode> arpeggiatorModes)
public APCminiConfiguration (final IHost host, final IValueChanger valueChanger, final List<ArpeggiatorMode> arpeggiatorModes, final IAPCminiControllerDefinition definition)
{
super (host, valueChanger, arpeggiatorModes);

this.definition = definition;
}


/** {@inheritDoc} */
@Override
public void init (final ISettingsUI globalSettings, final ISettingsUI documentSettings)
{
///////////////////////////
// Hardware

if (this.definition.hasBrightness ())
{
final IEnumSetting padBrightnessSetting = globalSettings.getEnumSetting ("Pad Brightness", CATEGORY_HARDWARE_SETUP, BRIGHTNESS_OPTIONS, BRIGHTNESS_OPTIONS.get (this.padBrightness));
padBrightnessSetting.addValueObserver (value -> {
this.padBrightness = lookupIndex (BRIGHTNESS_OPTIONS, value);
this.notifyObservers (PAD_BRIGHTNESS);
});
}

///////////////////////////
// Scale

Expand All @@ -78,6 +101,7 @@ public void init (final ISettingsUI globalSettings, final ISettingsUI documentSe
this.activateQuantizeAmountSetting (globalSettings);
this.activateStartupViewSetting (globalSettings, PREFERRED_NOTE_VIEWS);
this.activateStartWithSessionViewSetting (globalSettings);
this.activateShowPlayedChordsSetting (globalSettings);

///////////////////////////
// Workflow
Expand Down Expand Up @@ -148,4 +172,15 @@ public String getSoftKeys ()
{
return this.softKeys;
}


/**
* Get the pad brightness.
*
* @return The pad brightness in the range of [0..6]
*/
public int getPadBrightness ()
{
return this.padBrightness;
}
}
Loading

0 comments on commit 93089a1

Please sign in to comment.