How to create a custom scale for knobs in LUA?

I want to implement a bipolar poti which represents the following values for a target: -12, -6, -3, -2, 1, 2, 3, 6, 12. The value 1 should be the default one. Additionally, the poti should have a wider center position so that the default value can be reached more easily when turning the poti. The custom scale was pretty straight forward with a formatter like this:

local division_map = {
  [-4] = '/12',
  [-3] = '/6',
  [-2] = '/3',
  [-1] = '/2',
  [0] = '1',
  [1] = 'x2',
  [2] = 'x3',
  [3] = 'x6',
  [4] = 'x12'
}

function toDivision(valueObject, value)
  return division_map[value]
end

But how do I implement the dead zone in the middle? Ideally, I’d also like to adjust the amount of physical motion of the poti required to change a value.

Why not:

local division_map = {
[-5] = ‘/12’,
[-4] = ‘/6’,
[-3] = ‘/3’,
[-2] = ‘/2’,
[-1] = ‘1’,
[0] = ‘1’,
[1] = 1’,
[2] = ‘x2’,
[3] = ‘x3’,
[4] = ‘x6’,
[5] = ‘x12’
}

But this only handles the display values, not how the values scale on the physical input. On such small value ranges, it’s almost impossible to hit the right values.

Another aspect on the Mk2 is that by double tapping a control it returns to its default value. That’s my most used method to quickly switch off mod settings.

You could also create an option list control for this. An option list of only 9 values is easy to set.