damiensellier / CtrlrX

CtlrX is an alternative fork of Roman Kubiak's Ctrlr. This project is ONLY aimed at delivering updates, a wiki, documentations, tutorials or anything that the community cannot share on the original Ctrlr github due to credential restrictions.
BSD 3-Clause "New" or "Revised" License
19 stars 3 forks source link

LUA mod:getMidiMessage():getProperty("midiMessageCtrlrNumber") crashing on PC #17

Open damiensellier opened 4 months ago

damiensellier commented 4 months ago

local myNumber = mod:getMidiMessage():getProperty("midiMessageCtrlrNumber") crashes on v5.6 on Windows. It works in 5.3.201.

NOTE : All mod:getMidiMessage():getProperty() won't work on macOS and will return :

Error message: [string "sendCC"]:10: attempt to call method 'getProperty' (a nil value)

sendCC = function(--[[ CtrlrModulator --]] mod --[[ number --]], value --[[ number --]], source)
    if panel:getBootstrapState() then
        return
    end
    local myNumber = mod:getMidiMessage():getProperty("midiMessageCtrlrNumber") -- CRASHES
  -- myNumber=15 -- WORKS
    panel:sendMidiMessageNow(CtrlrMidiMessage(string.format("B0 %.2x %.2x", myNumber, value)))
end

See @dnaldoog test panel for testing : test midiMessageCtrlrNumber_1_0_2024-05-30_11-40.zip

dobo365 commented 3 months ago

Will have to check that one...