TEK2 – Endless encoder 14-bit MIDI issue

### TEK2 – Endless encoder 14-bit MIDI issue (Grid Editor)

Hi everyone,

I’m having trouble getting **14-bit MIDI CC output** from the endless encoders on a **TEK2** using **Grid Editor**.

Grid Editor auto-generates the following code when the encoder is set to **Absolute / 14-bit**:

```lua
self:endless_mode(0)
self:endless_velocity(50)
self:endless_min(0)
self:endless_max(16383)
self:endless_sensitivity(50)

midi_send(0, 176, 6, val // 128)
midi_send(0, 176, 6 + 32, val % 128)

Observed behavior:

  • With a real encoder value (val coming from the endless encoder), no MIDI CC is sent at all.
  • If I switch to auto mode (val = -1), a 14-bit CC message is sent, but the value is always stuck at the maximum and never updates when turning the encoder.

This happens both with the auto-generated code and with manual MSB/LSB handling.

Has anyone managed to get a working 14-bit endless encoder on TEK2?
Is this a known limitation or firmware issue?
If possible, could someone share a minimal working example or preset?

Thanks in advance.

Hi and welcome to the forum!

This is because the val variable is not defined. It is a legacy variable that should be gone from Editor by now, but isn’t.

Create a local variable on the Endless Element that’s called val and make it equal to self:endless_value() and it should be working after that.

OK, I understand it much better now. It’s working. Thanks for your help!