Overlay odd behavior. MK2 Firmware 3.5

Create a list control with default settings, and then, using the sample from the docs:

local listReverbTypes = {
    { value = 1, label = "Room" },
    { value = 2, label = "Hall" },
    { value = 3, label = "Plate" },
    { value = 4, label = "Spring" }
}

overlays.create(1, listReverbTypes)
controls.get(1):getValue("value"):setOverlayId(1)

The list will offer the options:

  • 0
  • Room
  • Hall
  • Plate

0 appears, and ‘Spring’ is not seen.

If we set the list control MIN MIDI VALUE to 1 we get:

  • Room
  • Hall
  • Plate

‘Spring’ is not seen! Even if is the number 4

The only solution is to always add an extra element with value 0 to the overlays AND set the control MIN MIDI VALUE to 1

local listReverbTypes = {
    { value = 0, label = "Will not appear" },
    { value = 1, label = "Room" },
    { value = 2, label = "Hall" },
    { value = 3, label = "Plate" },
    { value = 4, label = "Spring" }
}
  • Room
  • Hall
  • Plate
  • Spring
1 Like

I tested that briefly (and only on MK1) and I did not get that behaviour. I will look at that in more detail.

I can confirm the same behavior. It appears that a value = 0 has to be in the overlays list or else another value is excluded when the overlay is set. In my case:

local noteList2 = {
   { value = 0, label = "this won't appear" },
   { value = 1, label = "1/1" }, { value = 2, label = "1/2" }, { value = 3, label = "1/4" },
   { value = 4, label = "1/8" }, { value = 5, label = "1/16" }, { value = 6, label = "1/32" },
   { value = 7, label = "1/4T" }, { value = 8, label = "1/8T" }, { value = 9, label = "1/16T" }, 
   { value = 10, label = "1/4D" }, { value = 11, label = "1/8D" }, {value = 12, label = "1/16D" }
   }
  overlays.create(1001, noteList2)
  local control3 = controls.get(74)
  local ctrlValue3 = control3:getValue ("value")
  ctrlValue3:setRange (1, 12,1, true)
  ctrlValue3:setOverlayId(1001)

This works. But if I don’t include { value = 0, label = “this won’t appear” }, then value = 6 is skipped and the last label “/16D” is not shown. Just FYI.

1 Like