Home › Forums › General › Programming › Sysex Math › Reply To: Sysex Math
June 3, 2020 at 1:14 am
#118665
Or maybe this is more concise?
myMethod = function(mod,value,source)
local bi=BigInteger(value)
local MS=bi:getBitRangeAsInt(7,14)
local LS=bi:getBitRangeAsInt(0,7)
for i=0,2 do
local lsi=LS+i
local ls=bit.band(127,lsi)
local ms=bit.rshift(lsi,7)+MS
local mStr=string.format("f0 41 10 00 00 00 0e 12 19 01 22 0a %.2x %.2x f7",ms,ls)
panel:sendMidiMessageNow(CtrlrMidiMessage(mStr))
end
end
- This reply was modified 3 years, 10 months ago by dnaldoog. Reason: fixed error with rshift