When lookup tables take up too many characters, I usually try and create an algorithm that does the same thing the table does, but in a more efficient manner.
For example, if I have a lookup table that matches param1 CCs to LEDs on an encoder module like so:
num =
lookup(
param1,
32, 0,
33, 1,
34, 2,
35, 3,
36, 4,
37, 5,
38, 6,
39, 7,
40, 8,
41, 9,
42, 10,
43, 11,
44, 12,
45, 13,
46, 14,
47, 15
)
It would result in a lookup table that matches an EN16 module’s RX MIDI values in default operation to its LEDs when it’s the module in the (0,0) position.
Now, this can be done in a similar manner by doing the following:
num = 32-(module_position_x()*16)%128+param1
The above should achieve the same result, but it costs us a whole bunch less characters AND it’s more flexible than the code above.
Of course, this is not applicable to all cases, with semi-random co-relations between variables, but I hope it helps!