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

Hercules MK2 MIDI mapping does have looping controls #5369

Closed
mixxxbot opened this issue Aug 22, 2022 · 10 comments
Closed

Hercules MK2 MIDI mapping does have looping controls #5369

mixxxbot opened this issue Aug 22, 2022 · 10 comments
Labels
Milestone

Comments

@mixxxbot
Copy link
Collaborator

Reported by: iltony
Date: 2010-03-29T15:28:03Z
Status: Fix Released
Importance: Low
Launchpad Issue: lp550958
Attachments: hercules_mk2_reloop_patch.patch


Mixxx 1.8.0 beta1 is great! However I would like to point out some problems I noticed:

  1. The wheeling job moves the music to slowly while in cue mode (hardware: Hercules Mk2)
  2. The autodj function does not work, the next function is broken, can't use it for playing playlists
  3. Can't use the new (and spectacular) loop control function by triggering it via the Hercules Mk2 Console dedicated buttons (loop led on, 1,2,3 buttons)
    Thanks for great work and keep up!
@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2010-06-03T10:30:35Z


For 1, I believe we've fixed that.

For 2, I don't know if we fixed that. Albert, do you know?

For 3, that's true, we haven't updated many of the MIDI mappings to use looping. It's mainly a lack of people who have the physical devices, so we can't test it. Please consider fixing the mapping and sending it our way :).

Thanks for the bug report,
RJ Ryan

@mixxxbot mixxxbot added the bug label Aug 22, 2022
@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2010-06-17T21:41:19Z


I'm going to hijack this into a MIDI mappings being out of date bug. I've confirmed that your issue 1 and 2 have been fixed.

Thanks,
RJ

@mixxxbot
Copy link
Collaborator Author

Commented by: iltony
Date: 2010-06-18T09:08:42Z


Thanks a lot! I bet I'll try. I found out that the missing code is on file: /usr/share/mixxx/midi/Hercules-DJ-Console-Mk2-scripts.js around line 254:
252    case "cue": 
253    case "loop":
254	print("HerculesMk2.buttons123: " + mode + " mode not supported yet"); <-- there!
255	break;
256
257    default: 
258	print("HerculesMk2.buttons123: " + mode + " mode unsupported");
259    }
260};

Hover, I've got one question:
at lines:
29	0x0F: { "channel": 1, "name": "fx 1", "type": "button", "used": false },
30	0x10: { "channel": 2, "name": "fx 1", "type": "button", "used": false },
31	0x0E: { "channel": 1, "name": "fx 2", "type": "button", "used": false },
32	0x11: { "channel": 2, "name": "fx 2", "type": "button", "used": false },
33	0x0D: { "channel": 1, "name": "fx 3", "type": "button", "used": false },
34	0x12: { "channel": 2, "name": "fx 3", "type": "button", "used": false },
Am I missing something, or the name of the buttons should be "button x" and not "fx x", since the behaviour of this button depends on the value of mode variable? Those numbers on the left, correspond to the midi note sent by the controller, and the controllers doesn't know about mode (I tested it:
pressing button 1 in mode 1 => midi note 15 on channel 1
pressing button 1 in mode 2 => midi note 15 on channel 1
pressing button 1 in mode 3 => midi note 15 on channel 1
and so on...)

Anyway, I managed to patch it is something like:
..
277 case "loop":
	if (value) { // Button pressed.
	    switch (HerculesMk2.controls.inputs[control].name) {
	    case "fx 1": // "fx 1,2,3" should be globally renamed as said before?...
		// trigger loop in
                engine.setValue(group,"start", !engine.getValue(group,"start")); // Am I correct?
		break;
	    case "fx 2": 
		// trigger loop out
                engine.setValue(group,"end", !engine.getValue(group,"end")); // Am I correct?
		break;
	    case "fx 3":
		// trigger loop exit
                engine.setValue(group,"loop", !engine.getValue(group,"loop")); // Am I correct?
		break;
	    } 
	}
278  //print("HerculesMk2.buttons123mode: " + sNextMode + " mode not supported yet");
279	break;
...

But I have not tested it yet!

@mixxxbot
Copy link
Collaborator Author

Commented by: iltony
Date: 2010-07-02T08:41:56Z
Attachments: hercules_mk2_reloop_patch.patch


Yeah, I fixed it. See the attached patch file, intended to patch this missing feature in: "mixxx/1.8/mixxx/res/midi/Hercules-DJ-Console-Mk2-scripts.js".
Proposing for this to be merged in the 1.8 development branch.

@mixxxbot
Copy link
Collaborator Author

Commented by: mmm-zippymail
Date: 2010-08-07T20:34:03Z


Hi there,

I did some testing. since i am working with Vista i couldnt really use the patch file. still, i managed to edit my .js according to your changes.

i will post my whole section in here....

first part looks like this:

250>	break; // End fx mode

    case "cue": 
	print("HerculesMk2.buttons123: " + mode + " mode not supported yet");
	break;
    case "loop":
	         if (value) { // Button pressed.
             switch (HerculesMk2.controls.inputs[control].name) {
             case "fx 1": // "fx 1,2,3" should be globally renamed as said before?...
                 // trigger loop in
                 engine.setValue(group,"loop_in", !engine.getValue(group,"start")); // Am I correct?
                 break;
             case "fx 2":
                 // trigger loop out
                 engine.setValue(group,"loop_out", !engine.getValue(group,"end")); // Am I correct?
                 break;
             case "fx 3":
                 // trigger loop exit
                 engine.setValue(group,"reloop_exit", !engine.getValue(group,"loop")); // Am I correct?
                 break;
            }
         }
         break;

275> default: (etc)

second part looks like this:

	case "fx": 
	    print("HerculesMk2.buttons123mode: Switching to " + sNextMode + " mode");
	    break;
	case "cue":
	    print("HerculesMk2.buttons123mode: " + sNextMode + " mode not supported yet");
	    break;
	case "loop":
	    print("HerculesMk2.buttons123mode: Switching to " + sNextMode + " mode");
            break;
	default: (etc)

Works fine with me. But i might have discovered a new problem. If i am heavily using the loop mode via my mk2, sometimes mixxx just crashes, leaving an older instance of the program open and my sound system in use for a little while.

i couldn't really reproduce this reliably to find out when exactly that happens, but happened to me at least 3 times in like 30 mins.

sorry for that ;)

cheers,

chris

@mixxxbot
Copy link
Collaborator Author

Commented by: mmm-zippymail
Date: 2010-08-07T20:37:07Z


ah i forgot to mention that i testet this with 1.80 beta 2, vista, herkules mk2 just as midi, 2 sound devices on my laptop with ASIO4ALL

@mixxxbot
Copy link
Collaborator Author

Commented by: asantoni
Date: 2010-08-08T05:05:25Z


Committed in 1.8 r2511. Thanks for the patch iltony!

Chris: Thanks for testing it as well. Since 1.8.0 Beta2 was released, we've made a number of stability and performance improvements. I believe you should find looping more stable in our next release.

Thanks again guys,
Albert

@mixxxbot
Copy link
Collaborator Author

Commented by: iltony
Date: 2010-08-08T11:33:56Z


Hercules Mk2, mixxx beta~2, problems about jogWheel moving too slowly are (still?) there. I tried to fix them by adding a:

jogValue = jogValue * 20

in Hercules-DJ-Console-Mk2-scripts.js after the line (around 397):

  jogValue = value >=0x40 ? value - 0x80 : value; // -64 to +63, - = CCW, + = CW

I don't know if this is the right way to fix it... it's a little dirty... but it works.
Thanks for your patience.

@mixxxbot
Copy link
Collaborator Author

Commented by: iltony
Date: 2010-10-05T18:08:19Z


Awesome. New version of mixxx 1.8.0 fixes all this issues.

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 1.8.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant