parameterMap.onChange() changed?

When I tried to use parameterMap.onChange() like the example:

function parameterMap.onChange(valueObjects, origin, midiValue)
    print (string.format ("a new midiValue %d from origin %d",
        midiValue, origin))

        for i, valueObject in ipairs (valueObjects) do
            **local control = valueObject:getControl ()**
            print (string.format ("affects control value %s.%s",
                control:getName (), valueObject:getId ()))
        end
end

and I turn a control, I get this error message:

16:06:20.177 lua: a new midiValue 463 from origin 0
16:06:20.195 error running function 'onChange': ctrlv2/p000.lua:1313: attempt to index a userdata value (local 'valueObject')

(the line in question is the one with the ** **)

1 Like

Thanks for reporting! The function was affected by the 2.x → 3.x firmware upgrade. It should work just fine now.

1 Like

I’m still getting the same thing in Firmware 3.1

attempt to index a userdata value (local 'valueObject')

3.1.7 os is definitely fine, if you want to deal with using the beta (which has been very stable for me so far)

Where are the betas uploaded to? I can’t find anything past 3.1

@urbanspaceman, go to https://beta.electra.one/. Use your regular production credentials to log in. The website will offer an update to the latest beta version. Note, only only the firmware is beta, the website itself is ahead of the app.electra.one.