Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slip button, tap tempo, strip search, FX button extras #1

Merged
merged 11 commits into from
Apr 12, 2018
18 changes: 13 additions & 5 deletions res/controllers/Roland_DJ-202-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ DJ202.shutdown = function () {

DJ202.browseEncoder = new components.Encoder({
input: function (channel, control, value, status, group) {
var isShifted = control === 1;
if (value === 1) {
script.triggerControl(group, isShifted ? 'ScrollUp' : 'MoveUp');
} else if (value === 127) {
script.triggerControl(group, isShifted ? 'ScrollDown' : 'MoveDown');
var isShifted = control % 2 != 0;
switch (status) {
case 0xBF: // Rotate.
if (value === 1) {
script.triggerControl(group, isShifted ? 'ScrollUp' : 'MoveUp');
} else if (value === 127) {
script.triggerControl(group, isShifted ? 'ScrollDown' : 'MoveDown');
}
break;
case 0x9F: // Push.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a way to open/close tree leaves. Eg. Push: Move focus
Shift+Push in tree view: Open leaf
Shift+Push in playlist view: Load track into preview deck

Or we could use the load buttons, as they're not used in the tree view.

if (value) {
script.triggerControl(group, isShifted ? 'MoveFocusBackward' : 'MoveFocusForward');
}
}
}
});
Expand Down
18 changes: 18 additions & 0 deletions res/controllers/Roland_DJ-202.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,24 @@
<script-binding/>
</options>
</control>
<control>
<group>[Library]</group>
<key>DJ202.browseEncoder.input</key>
<status>0x9F</status>
<midino>0x06</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Library]</group>
<key>DJ202.browseEncoder.input</key>
<status>0x9F</status>
<midino>0x07</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group>[Master]</group>
<key>DJ202.crossfader.input</key>
Expand Down