by sandor.ivicsics » Wed Jun 27, 2012 8:36 am
Hello!
I updated the latest Reloop Digital Jockey 2 Controller Edition midi mapping in Mixxx 1.10.0.
What's new?
- CUP mode reimplemented (if not playing, set cue point and start playing; if playing, goto cue point and start playing; CUP can be stopped with CUE or PlayPause; CUP works like in Traktor)
- DigitalJockey2Controller.OnFlangerChange1 and DigitalJockey2Controller.OnFlangerChange2 functions added
Other changes:
Some code optimalization. (I hope, Mixxx will be faster.)
For example
DigitalJockey2Controller.playTrack = function (channel, control, value) {
//If no song is loaded
|--- if (engine.getValue("[Channel"+channel+"]", "duration") == 0) {
| return;
| };
|--- var currentlyPlaying = engine.getValue("[Channel"+channel+"]","play");
| /*
| * We immediately want to start and stop playing as soon as play button has been pressed
| * KeyUp events are out of interest in this case
| */
| if(value == DigitalJockey2Controller.keyPressed){
|---> moved here, because KeyUp events are out of interest
if (currentlyPlaying == 1) { // If currently playing
engine.setValue("[Channel"+channel+"]","play",0); // Stop
midi.sendShortMsg(0x90, control, DigitalJockey2Controller.ledOff); // Turn off the Play LED
}
else { // If not currently playing,
engine.setValue("[Channel"+channel+"]","play",1); // Start
midi.sendShortMsg(0x90, control, DigitalJockey2Controller.ledOn); // Turn on the Play LED
}
}
}
Some ledon/ledoff message removed, because i found ledstatussetter callback.
For example
DigitalJockey2Controller.EnableHeadPhone = function (channel, control, value) {
var isHeadPhoneActive = engine.getValue("[Channel"+channel+"]","pfl");
//print("Channel"+channel+" isHeadPhoneActive: " + isHeadPhoneActive);
if(value == DigitalJockey2Controller.keyPressed){
if(isHeadPhoneActive == 1){
engine.setValue("[Channel"+channel+"]","pfl",0);
removed---> midi.sendShortMsg(0x90, control, DigitalJockey2Controller.ledOff); //Turn LED off
}
else{
engine.setValue("[Channel"+channel+"]","pfl",1);
removed---> midi.sendShortMsg(0x90, control, DigitalJockey2Controller.ledOn); //Turn LED off
}
}
}
because DigitalJockey2Controller.OnPFL_Button1 and DigitalJockey2Controller.OnPFL_Button2 called by the program
DigitalJockey2Controller.OnPFL_Button1 = function (value){
if(value == 1){
midi.sendShortMsg(0x90, 0x5, DigitalJockey2Controller.ledOn); //Turn LED off
}
else{
midi.sendShortMsg(0x90, 0x5, DigitalJockey2Controller.ledOff); //Turn LED off
}
}
DigitalJockey2Controller.OnPFL_Button2 = function (value){
if(value == 1){
midi.sendShortMsg(0x90, 0x41, DigitalJockey2Controller.ledOn); //Turn LED off
}
else{
midi.sendShortMsg(0x90, 0x41, DigitalJockey2Controller.ledOff); //Turn LED off
}
}
Try it! Test it! Comment it!
Regards,
Sandor
- Attachments
-
Reloop-Digital-Jockey2-CE-mapping.zip
- Reloop Digital Jockey 2 CE for Mixxx 1.10.0
- (5.78 KiB) Downloaded 64 times