-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
119 additions
and
25 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
cp target/NovationImpulse4961.bwextension ~/Bitwig\ Studio/Extensions | ||
cp target/NovationImpulse.bwextension ~/Bitwig\ Studio/Extensions |
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
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
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
44 changes: 44 additions & 0 deletions
44
src/main/java/net/tlipinski/bitwig/controller/commands/FaderCursorCommand.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,44 @@ | ||
package net.tlipinski.bitwig.controller.commands; | ||
|
||
import com.bitwig.extension.controller.api.Track; | ||
import net.tlipinski.bitwig.controller.Controller; | ||
import net.tlipinski.bitwig.controller.MidiCommand; | ||
import net.tlipinski.bitwig.controller.MidiSend; | ||
import net.tlipinski.bitwig.controller.SysexSend; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class FaderCursorCommand implements MidiCommand { | ||
|
||
public FaderCursorCommand(Controller controller, MidiSend midiSend, SysexSend sysexSend) { | ||
this.controller = controller; | ||
this.midiSend = midiSend; | ||
this.sysexSend = sysexSend; | ||
|
||
controller.getTracks().getCursorTrack().name().markInterested(); | ||
} | ||
|
||
@Override | ||
public Stream<Boolean> triggersWhen(int statusByte, int data1, int data2) { | ||
return Stream.of( | ||
controller.getModel().isImpulse25(), | ||
statusByte == 0xB0, | ||
data1 == 8 | ||
); | ||
} | ||
|
||
@Override | ||
public void handle(int data1, int data2) { | ||
Track t = this.controller.getTracks().getCursorTrack(); | ||
t.getVolume().set(data2, 128); | ||
this.sysexSend.displayText(t.name().get()); | ||
|
||
// this will display volume value | ||
this.midiSend.send(0xB0, data1, data2); | ||
} | ||
|
||
private Controller controller; | ||
private final MidiSend midiSend; | ||
private SysexSend sysexSend; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/net/tlipinski/bitwig/controller/observers/ImpulseModel.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,23 @@ | ||
package net.tlipinski.bitwig.controller.observers; | ||
|
||
public enum ImpulseModel { | ||
IMPULSE_25(25), IMPULSE_49(49), IMPULSE_61(61); | ||
|
||
ImpulseModel(int keys) { | ||
this.keys = keys; | ||
} | ||
|
||
public boolean isImpulse25() { | ||
return this == IMPULSE_25; | ||
} | ||
|
||
public boolean isImpulse49or61() { | ||
return this == IMPULSE_49 || this == IMPULSE_61; | ||
} | ||
|
||
public static ImpulseModel get(int keys) { | ||
return ImpulseModel.valueOf("IMPULSE_" + keys); | ||
} | ||
|
||
public final int keys; | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/META-INF/services/com.bitwig.extension.ExtensionDefinition
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 +1 @@ | ||
net.tlipinski.bitwig.controller.NovationImpulse4961ExtensionDefinition | ||
net.tlipinski.bitwig.controller.NovationImpulseExtensionDefinition |