-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/api-18' into thomas/controller-a…
…pi-normalized-value-origin
- Loading branch information
Showing
297 changed files
with
23,194 additions
and
7,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"java.configuration.updateBuildConfiguration": "automatic", | ||
"java.format.settings.url": "code-formatting.xml", | ||
"java.project.encoding": "warning" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module version="4"> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4"> | ||
<component name="ExternalSystem" externalSystem="Maven" /> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17"> | ||
<output url="file://$MODULE_DIR$/target/classes" /> | ||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="module" module-name="base-extensions-api" /> | ||
<orderEntry type="library" name="Maven: com.bitwig:extension-api:18" level="project" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
src/main/java/com/bitwig/extensions/controllers/akai/apc/common/AbstractSessionLayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package com.bitwig.extensions.controllers.akai.apc.common; | ||
|
||
import com.bitwig.extension.controller.api.ClipLauncherSlot; | ||
import com.bitwig.extension.controller.api.SettableBooleanValue; | ||
import com.bitwig.extension.controller.api.Track; | ||
import com.bitwig.extension.controller.api.TrackBank; | ||
import com.bitwig.extensions.controllers.akai.apc.common.led.LedBehavior; | ||
import com.bitwig.extensions.controllers.akai.apc.common.led.RgbLightState; | ||
import com.bitwig.extensions.controllers.novation.commonsmk3.ColorLookup; | ||
import com.bitwig.extensions.framework.Layer; | ||
import com.bitwig.extensions.framework.Layers; | ||
|
||
public abstract class AbstractSessionLayer extends Layer { | ||
protected final int[][] colorIndex = new int[8][8]; | ||
protected SettableBooleanValue clipLauncherOverdub; | ||
|
||
public AbstractSessionLayer(final Layers layers) { | ||
super(layers, "SESSION_LAYER"); | ||
} | ||
|
||
protected abstract boolean isPlaying(); | ||
|
||
protected abstract boolean isShiftHeld(); | ||
|
||
protected RgbLightState getState(final Track track, final ClipLauncherSlot slot, final int trackIndex, | ||
final int sceneIndex) { | ||
if (slot.hasContent().get()) { | ||
final int color = colorIndex[sceneIndex][trackIndex]; | ||
if (slot.isSelected().get() && isShiftHeld()) { | ||
return RgbLightState.WHITE_BRIGHT; | ||
} | ||
if (slot.isRecordingQueued().get()) { | ||
return RgbLightState.RED.behavior(LedBehavior.BLINK_4); | ||
} else if (slot.isRecording().get()) { | ||
return RgbLightState.RED.behavior(LedBehavior.PULSE_2); | ||
} else if (slot.isPlaybackQueued().get()) { | ||
return RgbLightState.of(color, LedBehavior.BLINK_4); | ||
} else if (slot.isStopQueued().get()) { | ||
return RgbLightState.GREEN_PLAY.behavior(LedBehavior.BLINK_8); | ||
} else if (slot.isPlaying().get() && track.isQueuedForStop().get()) { | ||
return RgbLightState.GREEN.behavior(LedBehavior.BLINK_8); | ||
} else if (slot.isPlaying().get()) { | ||
if (clipLauncherOverdub.get() && track.arm().get()) { | ||
return RgbLightState.RED.behavior(LedBehavior.PULSE_2); | ||
} else { | ||
if (isPlaying()) { | ||
return RgbLightState.GREEN_PLAY; | ||
} | ||
return RgbLightState.GREEN; | ||
} | ||
} | ||
return RgbLightState.of(color); | ||
} | ||
if (slot.isSelected().get() && isShiftHeld()) { | ||
return RgbLightState.WHITE_DIM; | ||
} | ||
if (slot.isRecordingQueued().get()) { | ||
return RgbLightState.RED.behavior(LedBehavior.BLINK_8); // Possibly Track Color | ||
} else if (track.arm().get()) { | ||
return RgbLightState.RED.behavior(LedBehavior.LIGHT_25); | ||
} | ||
return RgbLightState.OFF; | ||
} // V ultra_X_39-- | ||
|
||
protected void markTrackBank(TrackBank bank) { | ||
bank.canScrollBackwards().markInterested(); | ||
bank.canScrollForwards().markInterested(); | ||
bank.sceneBank().canScrollBackwards().markInterested(); | ||
bank.sceneBank().canScrollForwards().markInterested(); | ||
} | ||
|
||
protected void markTrack(final Track track) { | ||
track.isStopped().markInterested(); | ||
track.mute().markInterested(); | ||
track.solo().markInterested(); | ||
track.isQueuedForStop().markInterested(); | ||
track.arm().markInterested(); | ||
} | ||
|
||
protected void prepareSlot(final ClipLauncherSlot slot, final int sceneIndex, final int trackIndex) { | ||
slot.hasContent().markInterested(); | ||
slot.isPlaying().markInterested(); | ||
slot.isStopQueued().markInterested(); | ||
slot.isRecordingQueued().markInterested(); | ||
slot.isRecording().markInterested(); | ||
slot.isPlaybackQueued().markInterested(); | ||
slot.isSelected().markInterested(); | ||
slot.color().addValueObserver((r, g, b) -> colorIndex[sceneIndex][trackIndex] = ColorLookup.toColor(r, g, b)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/bitwig/extensions/controllers/akai/apc/common/OrientationFollowType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.bitwig.extensions.controllers.akai.apc.common; | ||
|
||
import java.util.Arrays; | ||
|
||
public enum OrientationFollowType { | ||
AUTOMATIC("Automatic", "Auto"), // | ||
FIXED_VERTICAL("Mix Panel Layout", "Mixer"), // | ||
FIXED_HORIZONTAL("Arrange Panel Layout", "Arrange"); | ||
|
||
private final String label; | ||
private final String shortLabel; | ||
|
||
OrientationFollowType(final String label, final String shortLabel) { | ||
this.label = label; | ||
this.shortLabel = shortLabel; | ||
} | ||
|
||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
public String getShortLabel() { | ||
return shortLabel; | ||
} | ||
|
||
public static OrientationFollowType toType(final String value) { | ||
return Arrays.stream(OrientationFollowType.values()) | ||
.filter(type -> type.label.equals(value)) | ||
.findFirst() | ||
.orElse(OrientationFollowType.FIXED_VERTICAL); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/bitwig/extensions/controllers/akai/apc/common/PanelLayout.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.bitwig.extensions.controllers.akai.apc.common; | ||
|
||
public enum PanelLayout { | ||
VERTICAL, | ||
HORIZONTAL | ||
} |
Oops, something went wrong.