i think this is the missing piece with TouchOSC – it doesn’t seem to send two elements, only one.
i ran this test script using TouchOSC with path /remote/enc. the only additional argument you can append is value range. naming the path /remote/enc 1 doesn’t pass the 1 as an argument.
function osc_in(path, args, from)
if path == "/remote/enc" then
print("arg 1: "..args[1])
if args[2] ~= nil then
print("arg 2: "..args[2])
else
print("arg 2 not present")
end
end
end
osc.event = osc_in
but, a small code snippet added to a script would allow for TouchOSC control over encoders:
function osc_in(path, args, from)
if path == "/remote/enc 1" then
_norns.enc(1,args[1])
elseif path == "/remote/enc 2" then
_norns.enc(2,args[1])
elseif path == "/remote/enc 3" then
_norns.enc(3,args[1])
end
end
osc.event = osc_in
then you can just name each OSC path for each TouchOSC encoder UI: /remote/enc 1, /remote/enc 2 and /remote/enc 3. i also found that defining the value range as -0.3 to 0.3 gave the greatest range of control, as the messages accumulate as you turn the touchscreen encoder.
but i guess, tl;dr: unless TouchOSC can allow two elements to be passed in its argument table, this doesn’t seem like a friction-less path forward.
fwiw: enc.touchosc (427 Bytes)