mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.46k stars 1.27k forks source link

Hercules RMX and Steel pitch control not centered at 0 mark #5999

Closed mixxxbot closed 2 years ago

mixxxbot commented 2 years ago

Reported by: jenszo Date: 2011-09-30T21:38:11Z Status: Fix Released Importance: Low Launchpad Issue: lp863683 Tags: hercules-dj-control-steel, hercules-rmx, midi Attachments: [simple patch (tested!)](https://bugs.launchpad.net/bugs/863683/+attachment/2518038/+files/simple patch (tested!)), hercules-rmx.patch


I have a Hercules RMX. When the pitch is set to the middle position, the device correctly sends a "3F", but mixxx still does not go to 0 position but takes the pitch to -0.16

output from (which looks correctly to me):
$ mixxx --midiDebug
 ....
Debug: [PM 3. Hercules DJ Console RMX MIDI 1]: "MIDI ch 1: opcode: B0, ctrl: 3B, val: 3F" 
Debug: [MidiScriptEngine 2]: Starting one-shot timer: 872415239 
Debug: [MidiScriptEngine 2]: Starting one-shot timer: 889192484 
Debug: [MidiScriptEngine 2]: Starting one-shot timer: 905969695 
Debug: [MidiScriptEngine 2]: Killing timer: 872415239 
Debug: [MidiScriptEngine 2]: Killing timer: 889192484 
Debug: [MidiScriptEngine 2]: Starting one-shot timer: 989855780 
Debug: [MidiScriptEngine 2]: Killing timer: 905969695 
Debug: [MidiScriptEngine 2]: Starting one-shot timer: 1023410207 
Debug: [MidiScriptEngine 2]: Killing timer: 989855780 
Debug: [MidiScriptEngine 2]: Killing timer: 1023410207 

Happens with mixxx1.10 and 1.9. I can try to debug it, but I do not know at which src to start looking (e.g. using gdb). Maybe you can give me a pointer.

The problem is first described here: http://mixxx.org/forums/viewtopic.php?uid=3788&f=3&t=2896&start=0

mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-06T14:54:10Z Attachments: [simple patch (tested!)](https://bugs.launchpad.net/mixxx/+bug/863683/+attachment/2518038/+files/simple patch (tested!))


okay, after some debugging, I found the problem: The expected midInput was set to 0x40 instead of 0x3F. The attached patch fixes this. I tested it and it works now.

=== modified file 'mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js'
--- mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js   2010-12-20 00:15:26 +0000
+++ mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js   2011-10-06 14:41:30 +0000
@@ -537,7 +544,7 @@
 HerculesRMX.Decks.Left.Controls.Vol.minOutput = 0.0;
 HerculesRMX.Decks.Left.Controls.Vol.midOutput = 0.4;
 HerculesRMX.Decks.Left.Controls.Vol.maxOutput = 1.0;
-HerculesRMX.Decks.Left.Controls.Pitch.midInput = 0x40;
+HerculesRMX.Decks.Left.Controls.Pitch.midInput = 0x3F;

 HerculesRMX.Decks.Right.addButton("Keypad1",  new HerculesRMX.Button(0x19), "keypad1Handler");
 HerculesRMX.Decks.Right.addButton("Keypad2", new HerculesRMX.Button(0x1A), "keypad2Handler");
@@ -584,7 +591,7 @@
 HerculesRMX.Decks.Right.Controls.Vol.minOutput = 0.0;
 HerculesRMX.Decks.Right.Controls.Vol.midOutput = 0.4;
 HerculesRMX.Decks.Right.Controls.Vol.maxOutput = 1.0;
-HerculesRMX.Decks.Right.Controls.Pitch.midInput = 0x40;
+HerculesRMX.Decks.Right.Controls.Pitch.midInput = 0x3F;

 //Mapping functions
mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-06T15:15:31Z


The same is in Hercules-DJ-Control-Steel-scripts.js

HerculesSteel.Decks.Left.Controls.Pitch.midInput = 0x40;
HerculesSteel.Decks.Right.Controls.Pitch.midInput = 0x40;

I do not have a Hercules Steel, but pretty likely it should be 0x3F here as well, doesn't it? Someone with a Steel should check here, as the middle could be give as 0x40 by the Steel hardware console?!

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-06T20:41:04Z


Maybe we can enlist some help testing this in the forums...

mixxxbot commented 2 years ago

Commented by: esbrandt Date: 2011-10-15T08:54:31Z


I asked in the forum for people who can test the patch , http://mixxx.org/forums/viewtopic.php?f=3&t=2896

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-17T22:52:49Z


Looks like this is not limited to the Hercules RMX. Someone in the Vestax Typhoon thread (http://www.mixxx.org/forums/viewtopic.php?f=3&t=1634&start=40) is also reporting a deviation of -0.16 from 0.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-17T23:12:53Z


Oops, nevermind. It looks like that problem is a separate issue with the Typhoon mappings. I followed up with bkgood about that one.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-18T00:11:23Z


Got a bug confirmation from Nathan Dotz. Waiting on him to test the fix.

mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-18T08:43:11Z


When I (the bug reporter) raised the question about "confirmation" this was rather about the Hercules Steel. Because I have a RMX, and actually for me it is "confirmed" ;-) And the patch fixes this.

But I was wondering if this is maybe also a problem with the Hercules Steel, because there the Decks.Left.Controls.Pitch.midInput and Decks.Right.Controls.Pitch.midInput are also set to 0x40 -- albeit I bet a lot that this should also be 0x3F (but I do not have a Steel, so cannot confirm here). So here, someone with a Steel should check, that's all I asked. The patch does not include a (possible) "fix" for this.

Anyway, what surprises me is that this bug went undiscovered for such a long time, since it is very quickly noticable...

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-18T19:40:22Z


Hey Jens,

Before making script changes for a given controller we need confirmation from another owner of the controller. That gives us some degree of assurance that what we're seeing isn't some kind of firmware difference between your device and other owners of the Hercules RMX. If that were the case, then we would commit your fix only to break other owners of the RMX. This is particularly a problem with e.g. the VCI-100 where there are many different firmware versions in the wild.

You're right though -- we should find out if Steel owners see this bug as well. :) I'll ask on the mailing list.

mixxxbot commented 2 years ago

Commented by: d00guan Date: 2011-10-20T15:41:53Z


Hi All,

When I wrote the script I did it specifically because my RMX's pitch encoders center at 0x40. I thought it was a bit odd since all other encoders have their center positon at 0x3F. It strikes me now that we should check if it's possible to change this parameter with the Hercules Midi Mapper. I bought mine used so it could have been changed. Otherwise some batch must have encoders with 0x3F as center position and some with 0x40.

If there is need for more help with the RMX script I can help out, since I didn't disappear from earth completely. :-) I just got a lot more to do since the beginning of this year.

mixxxbot commented 2 years ago

Commented by: d00guan Date: 2011-10-21T15:34:02Z


I just tested the Midi Mapper and it was not possible to change the center position on encoders. I guess there are different batches of RMXes with slightly different behavior.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-21T18:14:07Z


Crap. I was afraid of that. So Anders -- with the current mapping of the RMX shipped with Mixxx, your pitch control is centered at 0?

On Fri, Oct 21, 2011 at 11:34 AM, Anders Gunnarsson <
<email address hidden>> wrote:

I just tested the Midi Mapper and it was not possible to change the center position on encoders. I guess there are different batches of RMXes with slightly different behavior.

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: sleepynate Date: 2011-10-22T18:49:29Z


Tested this patch today. Good news and bad news. Setting the controllers to 3F fixes the center-notch equaling +0.00 %.

However, it also reversed the direction of my left deck in "scratch" mode (or some other rather recent change did).

mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-23T18:02:14Z


Am 22.10.2011 20:49, schrieb Nathan Dotz:

Tested this patch today. Good news and bad news. Setting the controllers to 3F fixes the center-notch equaling +0.00 %.

Ok, then 2 vs. 1 ;) Just for the record: I just perchased my RMX 2
months ago via amazon. The firmware of mine is
Packet: 4.HDJS.2009
Firmware: 1.1.4.31
Driver: 4.7.5.0
DJ API: 2.0.22.6
CPL: 2.0.5.1

I can see this via the Hercules Control Panel on my alternative WindowsXP. (on the shipped VirtualDJ basic version, the 0x3F seems also to be expected/normal)

Anders, maybe you can check yours and maybe upgrade your firmware?

However, it also reversed the direction of my left deck in "scratch" mode (or some other rather recent change did).

Did you apply any other patch (change)? Actually the variable definition of
HerculesRMX.Decks.Left.Controls.Pitch.midInput = 0x3F;
HerculesRMX.Decks.Right.Controls.Pitch.midInput = 0x3F;
is not used anywhere else in the code. If one greps for midInput in the
midi directory, one sees this. So this should be due to some other change?!
mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-23T20:50:45Z


Hi Jens,

The button code that handles it is in res/midi/midi-mappings-scripts.js

That file is "magically" included in the MIDI environment before your MIDI script is run. You can see the midInput value is used in the Control.prototype.setValue function in that file.

This is all very troubling that the RMX has differences in their firmware. Not sure what the best route is. Perhaps we should just support the behavior of the latest firmware version and tell everyone who has the problem to update their firmware? In the future, all of our control scripts (MIDI, HID, otherwise) should have the ability to offer up configurable values that show up as GUI widgets in the Mixxx preferences for that script. This would allow the user to select the behavior they prefer and also identify which quirks their device might have without having to get a replacement script.

mixxxbot commented 2 years ago

Commented by: Pegasus-RPG Date: 2011-10-24T05:55:15Z


For now, is there a MIDI message that causes the RMX to report its firmware version? If not, mapping for the latest version and telling people to upgrade seems the best option to me.

mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-24T08:25:31Z


Am 24.10.2011 07:55, schrieb Sean M. Pappalardo:

For now, is there a MIDI message that causes the RMX to report its firmware version? If not, mapping for the latest version and telling people to upgrade seems the best option to me.

Is there any documentation about by Hercules or anybody else about the midi messages / API?

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-24T20:49:32Z


Stephane List has confirmed on mixxx-devel that his Hercules DJ Control Steel is also affected by this issue and 0x3F is the center position.

mixxxbot commented 2 years ago

Commented by: slist Date: 2011-10-26T19:32:19Z


Yes, I confirm that 0x3F is the center position. (using Mixxx from Ubuntu 11.10)

Using Hercules DJ Series Control Panel on Windows, I read : Package : 4.HDJS 2011 Firmware: 1.0.0.13 Pilote: 5.3.9.0 DJ API: 2.0.23.5 CPL:2.0.9

Hope this help

Stéphane

mixxxbot commented 2 years ago

Commented by: slist Date: 2011-10-26T19:50:20Z


That's fun, Using Virtual DJ Free Home edition, I can play 10 minutes with the console. At the middle position, pitch is set to +0.1

With Mixxx on Windows7 and on Ubuntu 11.10 : pitch is set to -0.16

Nobody's perfect !

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-26T20:37:37Z


Very interesting :). I've reached out to Hercules to see if they can provide us with any guiding details on this issue. Ideally the latest firmware for each device is uniform in how it handles this (e.g. they picked 0x3F or 0x40 and stuck with it) so we can just implement what the latest firmware uses and tell anyone with this problem to upgrade their firmware.

On Wed, Oct 26, 2011 at 3:50 PM, Stéphane List

That's fun, Using Virtual DJ Free Home edition, I can play 10 minutes with the console. At the middle position, pitch is set to +0.1

With Mixxx on Windows7 and on Ubuntu 11.10 : pitch is set to -0.16

Nobody's perfect !

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX and Steel pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-27T20:25:23Z


Our contact at Hercules just followed up. Here's what I've learned:

1) All DJ Control Steel units interpret 0x3F as the center position. 2) The first version of the DJ Console RMX (firmare revision 1.0.6.31) is centered at 0x40 3) Other RMXs up to the current version (firmware revision 1.1.4.31) are centered at 0x3F 4) The majority of RMXs in the wild are centered at 0x3F.

Unfortunately it's not possible to update the RMX firmware to center at 0x3F if you have the first generation firmware.

So, I think we should change both our RMX and Steel scripts to use 0x3F as the default. In the RMX script, we can provide an option at the top that lets someone easily flip the behavior by setting a variable from true to false.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-29T04:49:49Z Attachments: hercules-rmx.patch


Hi Jens,

I updated your patch to put a flag at the top so that first-generation owners can easily flip a flag. Could you verify that it works?

Thanks, RJ

mixxxbot commented 2 years ago

Commented by: jenszo Date: 2011-10-29T19:04:37Z


Hi RJ,

thanks! Yes, the patch works for me! (on my RMX).

However, glancing at the patch file I can see that you did for the Steel a 
+HerculesSteel.Decks.Left.Controls.Pitch.midInput = 0x35;
+HerculesSteel.Decks.Right.Controls.Pitch.midInput = 0x35;

But you said, that

Our contact at Hercules just followed up. Here's what I've learned: 1) All DJ Control Steel units interpret 0x3F as the center position.

So in the mixxx/res/midi/Hercules-DJ-Control-Steel-scripts.js it should actually be 0x3F, right?! typo?

Change this to 0x3F and I think we finally got it :)

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-10-29T22:17:00Z


Whoops .. yes that's a typo. Good catch! Fix is now in the 1.9, trunk and 1.10 branches.

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-04T20:45:33Z


Hi RJ,

⁠887345

"RJ Ryan (rryan) wrote on 2011-11-27: #⁠5 Hey toomuch, Sadly our Hercules rep told us that there is no way to update the RMX firmware. RJ"

So, if there is no other firmware, why is this setting called "HerculesRMX.firstGenerationFirmware"?
Will the next release correct that setting in "c:\Program Files\Mixxx\midi\Hercules-DJ-Console-RMX-scripts.js" or do we have to do it manually?
mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-12-04T21:15:08Z


Hi toomuch,

The firmware for the RMX has multiple versions but it is not user-upgradeable. So people who have the first-generation (buggy) firmware, must set that setting in the MIDI script. All other RMX owners should be fine.

RJ

On Sun, Dec 4, 2011 at 3:45 PM, toomuch

Hi RJ,

⁠887345

"RJ Ryan (rryan) wrote on 2011-11-27: #⁠5 Hey toomuch, Sadly our Hercules rep told us that there is no way to update the RMX firmware. RJ"

So, if there is no other firmware, why is this setting called "HerculesRMX.firstGenerationFirmware"? Will the next release correct that setting in "c:\Program Files\Mixxx\midi\Hercules-DJ-Console-RMX-scripts.js" or do we have to do it manually?

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX and Steel pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-05T19:02:44Z


Thanks for the info. Is it just me or does somebody else see the issue that other knobs (High / Mid / Low / Gain) are also not centered? See https://launchpadlibrarian.net/84651791/Clipboard.jpg and https://bugs.launchpad.net/mixxx/+bug/887345.

Package : 4.HDJS 2011 Firmware: 1.0.4.13 Driver: 5.2.8.0 DJ API: 2.0.23.5 CPL:2.0.9.2

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-12-05T19:28:50Z


Hey toomuch,

Did you enable the first generation firmware toggle and still have the issue?

RJ

On Mon, Dec 5, 2011 at 2:02 PM, toomuch

Thanks for the info. Is it just me or does somebody else see the issue that other knobs (High / Mid / Low / Gain) are also not centered? See https://launchpadlibrarian.net/84651791/Clipboard.jpg and https://bugs.launchpad.net/mixxx/+bug/887345.

Package : 4.HDJS 2011 Firmware: 1.0.4.13 Driver: 5.2.8.0 DJ API: 2.0.23.5 CPL:2.0.9.2

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX and Steel pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-05T20:13:13Z


Yes, pitch controls are centered at 0. The knobs are not centered (still as shown in screenshot).

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-12-05T20:31:22Z


Does turning the firstGenerationFirmware flag off result in knobs that are centered?

On Mon, Dec 5, 2011 at 3:13 PM, toomuch

Yes, pitch controls are centered at 0. The knobs are not centered (still as shown in screenshot).

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX and Steel pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-05T21:11:53Z


Seems that firstGenerationFirmware has nothing to do with it. After turning all knobs to zero and then back to center position it works. :)

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-08T18:46:56Z


What it be possible / desirable to have an option in the preferences menu to select the firmware version? Or should Mixxx automatically recognize what firmware is present and change the setting accordingly? From a user perspective it would be bad to always change that setting somewhere in the C: directory when a new version is published.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2011-12-08T18:59:21Z


Agreed though we don't have a way to detect the firmware version. We would have to use libusb to probe the interface and beyond that I don't believe PortMIDI provides us an easy way to know which MIDI devices correspond to which USB devices.

We have wanted to expose MIDI script options in the preferences for a long time now (and have them saved in the database and not as a constant defined in the script). No work has been done on this and the project is looking for an owner.

cheers, RJ

On Thu, Dec 8, 2011 at 1:46 PM, toomuch

What it be possible / desirable to have an option in the preferences menu to select the firmware version? Or should Mixxx automatically recognize what firmware is present and change the setting accordingly?

From a user perspective it would be bad to always change that setting somewhere in the C: directory when a new version is published.

-- You received this bug notification because you are a member of Mixxx Development Team, which is subscribed to Mixxx. https://bugs.launchpad.net/bugs/863683

Title: Hercules RMX and Steel pitch control not centered at 0 mark

To manage notifications about this bug go to: https://bugs.launchpad.net/mixxx/+bug/863683/+subscriptions

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-08T20:18:25Z


I just looked into C:\Program Files\Hercules\Audio\DJ Console Series\firmware to find a piece that would Mixxx allow to identify the firmware version. 

I found a file named "HDJSeriesUpdater.exe" which seems to be able to update the RMX's firmware. But I see only this window for a split second: http://www.imagebanana.com/view/tatcxdz2/Clipboard.jpg. Nothing else happens. The .msg-files in the folder contain error message texts in different languages. At the end of a .msg-file there was a link: http://ts.hercules.com/faqs/eng/her_eng_00384.pdf. It's guide to upgrade the firmware. When you run "HDJSeriesUpdater.exe -manual" you get this http://www.imagebanana.com/view/vodvydkm/Clipboard.jpg and probably be able to upgrade the firmware (which was negated by a Hercules rep (see end of #⁠887345)).

"RMX_TUSB.dja" seems to be the firmware file, but I cannot open it with a normal editor. Maybe this file would to determine the version for the above described scenario.

I don't know if upgrading the firmware on the old devices would be a good idea, but I would like to try it if we could get more info on it (from the Hercules Rep). Why does he say upgrading is not possible? In my case in "Firmware Controller -> Current" says "4 (Etoms)" whereas in the manual it says "6 (Etoms)". So we need somebody with a fresh RMX console who gives us his "RMX_TUSB.dja".

mixxxbot commented 2 years ago

Commented by: toomuch Date: 2011-12-29T15:59:41Z


Can someone please comment on my message?

mixxxbot commented 2 years ago

Commented by: rryan Date: 2012-01-05T17:48:00Z


I'll send an email to our contact at Guillemot to double-check.

mixxxbot commented 2 years ago

Issue closed with status Fix Released.