@christianvogel if you could help me introduce your double taps here it would be amazing! This is taken from the preset I created here: Touch > Default CC
-- Init ---------------------------------------------------------------------
events.subscribe(POTS)
-- Mapping of potId to controlId
potToControlMap = {
[0] = 3, -- pot 0 controls fader 3
[1] = 4, -- pot 1 controls fader 4
[2] = 5 -- pot 2 controls fader 5
}
-- Functions ---------------------------------------------------------------
function revertFaderToDefault(controlId)
local faderControl = controls.get(controlId)
local valueObj = faderControl:getValue("value")
local message = valueObj:getMessage()
local defaultValue
if controlId == 3 then
defaultValue = 20
elseif controlId == 4 then
defaultValue = 50
elseif controlId == 5 then
defaultValue = 80
end
if defaultValue then
valueObj:setDefault(defaultValue)
message:setValue(defaultValue)
end
end
-- Callbacks ---------------------------------------------------------------
function events.onPotTouch(potId, controlId, touched)
if touched then
local actualControlId = potToControlMap[potId]
revertFaderToDefault(actualControlId)
end
end
-- Setup -------------------------------------------------------------------
-- Set initial default values
for potId, controlId in pairs(potToControlMap) do
revertFaderToDefault(controlId)
end