Slider Matrix number #9 (only that one) does not update when triggered by a for loop in custom module

  • Open Stage Control version (or commit if built from sources)
    OSC version 1.22.0
  • Operating system
    Linux Mint 20.1 Ulyssa
  • Client type (built-in or external browser) and version
  • Session file (can be uploaded after adding the .txt extension)
  • Custom module

Hi there!
Thank you a lot for this great software. It really makes work and life easier!

I stumbled across a strange issue when using the "receive('/SET', target, value)" from within a for loop in my custom module. The slider with index number 9 simply does not update like all the others when I try to set it to a float number.

In the module you find

    var deactValue = 0.35;
    var numOfBatches = 16;

    if (address === '/STARTVALS_00') {
      for (var i = 0; i < numOfBatches; i++) {
        var setTarget = '/vimix/selection#' + i + '/alpha'
        // console.log(setTarget)
        // send(setTarget, 0);
         receive('/SET', setTarget, -deactValue)
      receive('/SET','/vimix/selection#1/alpha', 1)

In the pictures you can see that the console shows the "In" message correctly with #9 listed, but in "Out" it is simply missing and thus has no effect on my GUI.

However, when using intgers (1 or 0) it works just fine.
Also, changing the variable to positive value, it has no effect. Only integers work on #9.

Any thoughts or help on this would be highly appreciated.
Have a nice day!
VIMIX_ctrl.json (459.6 KB)
midi2OSC.js (9.2 KB)

There is a conflict between the faders and the flash/show buttons: you should give different ids and addresses to the buttons and use their linkId or onValue property to link them altogether (having identical ids doesn't work well with widgets that don't expect the same values).

When /SET is received, o-s-c passes the value to the first widget that matches provided arguments and let it sync itself with others, but in this case the first widget happens to be a button which forces the value to either 0 or 1 before passing it to the fader.

Note that when you send a message directly to a widget (using its address directly instead of /SET) this is not a problem because in this case the value is passed to all matching widgets. /SET differs because it was primarily meant to be used with an id as first argument and because the fact that it make the widget send their messages required handling widget synchronization differently.

What a quick, precise, complete and perfect answer!?
Plus debugging my setup here. So, this is kind of a double or triple solution.
I am speechless.

Thank you very much!