Making HWKey and HWEncoder functions available in release builds.

BECOME PART OF THE COMMUNITY - Sign up here
  • Hi all,

    first off, apologies if this should be in the LUA plugins subforum, I wasn't sure if any folks from MA/the distributors are lurking around there.

    The system_test plugins that can be found distributed with the software indicates an internal HWKey and HWEncoder LUA function that is used in tests to verify the software is working correctly.

    This means these functions exist and could be used, if they were not stripped from release builds. In release versions of the software, these functions are nil, and there are even tests that verify that these functions are not included with release builds.

    Is there anybody willing to comment on why this feature is intentionally disabled? I'm currently looking for a way to control the MA key from a plugin, and I'm finding it impossible to get it working without this HWKey method.

    I'd love if this function could be included in future release builds of the software.

    If this isn't possible I'd love to know why it's not possible, or if there is any workaround that would be applicable for my problem.

    In any case, thank you to any folks at MA responsible for the huge leap in documentation for the LUA interface we've seen with the last few versions.

    Cheers,

    Fabian

  • MA3 ships with some LUA plugins created by MA. Some are intended for users, such as the start show plugin shipped a few versions ago, and others are (presumably) used by MA in their internal QA tests. You can find these plugins in the resources/lib_plugins folder inside the program data directory of the used MA3 software version. One of these plugins, called systemtests (I think, I’m not at a computer right now) has source code that calls a function called HWKey(). This function is used in the LUA plugin that MA3 ships, but if executed in a publicly available build of MA3 this will cause an error, as the environment does not actually ‚define‘ this function.

    This is what I mean by stripped out, we can see that this function is used internally at MA, but cannot be used in release versions of the software.

  • Are you sure your function works in the way you expect?
    The MA System test plugins (which can be loaded in any version just by importing them) are usually used to verify the function of hardware. Ie "was this key pressed?". Not to emulate the pressing of that hardware.

  • Even if the speculations are right, and there actually is (or has been) a hardware emulator in use as some point during development (I have no clue about this), there may be numerous valid reasons for not including this (and other tools used during development), when compiling the final builds:

    e.g. os-compatibility, hardware dependencies, security, 3rd party licensing, realtime performance etc

    Nevertheless, assuming the roll-out of v1.9 goes as planned, you will in the near future be able to press the MA-key via commandline-syntax

  • That does sound promising, if there's a workaround/better option planned for the next versions, that's fantastic!

    And, yes, I really was just wondering why MA chooses to strip this API specifically, while leaving other debug APIs such as mouse or keyboard simulation in the final software. It kind of seems like an oversight being unable to press buttons or turn the encoders from a LUA plugin (at least to me), so I was curious if there is something I'm missing here.

  • One idea, why they could do this: If everybody could use own hardware that emulates the button presses of the real hardware, the need to buy hardware from MA Lighting would decrease. The whole business model of selling hardware and offering the software for free could then not be realized anymore...

  • Valid point, yeah. I always got the impression that the selling point of getting MA hardware is the parameter unlocking. I think there’s a well established set of macro keyboards and such for MA2 that people use for programming. I really don’t think a Commandwing is intended to compete with an iPad sized macro pad for preprogramming.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!