Skip to content

Commit

Permalink
Cursor tracks fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tlipinski committed Jun 15, 2017
1 parent 0d2764a commit 5cb8ac2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ public ImpulseModel getModel() {
private EncoderMode encoderMode = EncoderMode.PLUGIN;
private boolean shiftPressed = false;
private EncoderMixerModePage encoderMixerPage = new EncoderMixerModePage();
private ImpulseModel model;
private ImpulseModel model = ImpulseModel.IMPULSE_25;

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ public Stream<Boolean> triggersWhen(int statusByte, int data1, int data2) {
@Override
public void handle(int data1, int data2) {
CursorTrack cursorTrack = controller.getTracks().getCursorTrack();
if (cursorTrack.hasNext().get()) {
int position = cursorTrack.position().get();
Track t = controller.getTracks().get(position + 1);
cursorTrack.selectChannel(t);
sysexSend.displayText(t.name().get());
}
cursorTrack.selectNext();
controller.getHost().scheduleTask(() -> {
sysexSend.displayText(cursorTrack.name().get());
}, 200);
}

private final Controller controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ public Stream<Boolean> triggersWhen(int statusByte, int data1, int data2) {
@Override
public void handle(int data1, int data2) {
CursorTrack cursorTrack = controller.getTracks().getCursorTrack();
if (cursorTrack.hasPrevious().get()) {
int position = cursorTrack.position().get();
Track t = controller.getTracks().get(position - 1);
cursorTrack.selectChannel(t);
sysexSend.displayText(t.name().get());
}
cursorTrack.selectPrevious();
controller.getHost().scheduleTask(() -> {
sysexSend.displayText(cursorTrack.name().get());
}, 200);
}

private final Controller controller;
Expand Down

0 comments on commit 5cb8ac2

Please sign in to comment.