# Lua API - stuff to add?

**URL:** <https://forum.electra.one/t/lua-api-stuff-to-add/3695>\
**Category:** Developers\
**Created:** [May 17, 2025, 9:11am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695 "2025-05-17T09:11:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [May 17, 2025, 9:11am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/1 "2025-05-17T09:11:25Z")

</div>

I put more effort into user oriented features while working on firmware 4.0. I wanted to make the controller more accessible to those of you who do not want to work with Lua or go too deep into advanced MIDI. There were many requests on extending the Lua API from developers though. Some of them were implemented, some did not, some things changed so much that it does not make sense to add them any more. This thread is meant to be a wishlist of additions to the Lua Extension API. I will use the input from here when working on future v4.1.

---

<div class="post-metadata">

**Author:** ![michaelhaefliger](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@michaelhaefliger](https://forum.electra.one/u/michaelhaefliger)\
**Post date:** [May 17, 2025, 9:50am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/2 "2025-05-17T09:50:59Z")

</div>

Hi @martin  
An implementation of Open Sound Control (OSC) support using Lua script might be helpful.

---

<div class="post-metadata">

**Author:** ![Phommed](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Phommed](https://forum.electra.one/u/Phommed)\
**Post date:** [May 17, 2025, 10:35am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/3 "2025-05-17T10:35:22Z")

</div>

Ability to programmatically change a control to a different type (e.g. change a fader to a button), whilst retaining the same control id.

---

<div class="post-metadata">

**Author:** ![Mint-Gecko](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Mint-Gecko](https://forum.electra.one/u/Mint-Gecko)\
**Post date:** [May 17, 2025, 3:37pm UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/4 "2025-05-17T15:37:46Z")

</div>

What I’d love to see for the Lua API:

- improve performance of lua calls
  - useful when quickly navigating elements that change parts on the screen, e.g. knob-based navigation
  - see [V4.0 testing [was V3.7] - #266 by Mint-Gecko](https://forum.electra.one/t/v4-0-testing-was-v3-7/3219/266) and [V4.0 testing [was V3.7] - #255 by Mint-Gecko](https://forum.electra.one/t/v4-0-testing-was-v3-7/3219/255)

- the list control should be scriptable
  - useful for DAW plugins controlling VST/CLAP plugins with stepped/named parameters
  - useful for knob-based navigtion

- spawn/change control types on the fly
  - e.g. change a button control to a list or from empty/hidden to fader control
  - should execute fast in case of a knob-based navigation or a controlled parameter affecting the current layout which causes lots of spawning/despawning or changes of control types

- Lua API via MIDI
  - think of changing control types or control names via MIDI commands
  - for DAW plugins, this means more control and flexibility about layout and functionality
  - the E1 Lua script would need less functionality and thus has a higher chance of staying stable for future versions

- reassigning of a lua function to a control at runtime
  - this would allow DAW plugins to shuffle certain functionality around at runtime, possibly based on user layouts (mixer view vs custom alternative mixer view) or user options and have more possiblities than E1’s 12 presets

Adjacent to scripting, but not strictly scripting feature requests:

- a button variant with more characters
  - maybe also using two text rows like the thin fader control?
  - would be useful for DAW plugins because some VST parameters can be long

- optional monospace font ([Optional monospace font](https://forum.electra.one/t/optional-monospace-font/2906))
  - useful when changing numbers quickly to avoid jumpy/jittery text

- Groups supporting non-rectangle Layouts
- built-in waveform graphics like default analog ones (sine, saw, tri, continuous noise, stepped noise, square, square thinner, square very thin, …) and classic ones (like selected ones from the ppg or jp8000)
- more common synth controls: simple mini graph visualisation of a filter response (frequency, gain, q) and of a 3-6 multiband eq

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [May 28, 2025, 5:53am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/5 "2025-05-28T05:53:28Z")

</div>

two items discussed with @oldgearguy:

1. midi callbacks for 14bit CC (and NRPN) - [Firmware v4.0.0 for mkII - #27 by martin](https://forum.electra.one/t/firmware-v4-0-0-for-mkii/3681/27)
2. more fonts available in / for `graphics.print()` function. I think somebody asked about that one in the past already.

---

<div class="post-metadata">

**Author:** ![misal](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@misal](https://forum.electra.one/u/misal)\
**Post date:** [May 28, 2025, 7:50am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/6 "2025-05-28T07:50:51Z")

</div>

Hi everyone,

I previously asked in another [thread](https://forum.electra.one/t/set-message-value-without-sending-midi/3595/3) whether it’s possible to set the MIDI value of a control without it being sent out.

@martin , you mentioned that this feature would be available in firmware version 4. However, I couldn’t find any information about it in the documentation. Have I missed something? If this feature is not yet documented, I would like to request it.

---

<div class="post-metadata">

**Author:** ![Mint-Gecko](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@Mint-Gecko](https://forum.electra.one/u/Mint-Gecko)\
**Post date:** [May 28, 2025, 8:08am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/7 "2025-05-28T08:08:58Z")

</div>

Oh yes, that would be awesome! KnobConnector currently uses a custom sysex protocol to get 14bit resolution for controls. Having that built in would be useful!

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [June 3, 2025, 8:01am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/8 "2025-06-03T08:01:05Z")

</div>

> [@misal](#):
>
> I previously asked in another [thread](https://forum.electra.one/t/set-message-value-without-sending-midi/3595/3) whether it’s possible to set the MIDI value of a control without it being sent out

I added the function on C++ level but forgot to add it to the LUA API. I will do that in the upcoming minor release.

---

<div class="post-metadata">

**Author:** ![rvh](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rvh](https://forum.electra.one/u/rvh)\
**Post date:** [November 22, 2025, 2:40am UTC](https://forum.electra.one/t/lua-api-stuff-to-add/3695/10 "2025-11-22T02:40:34Z")

</div>

Is this function now available?

later: I posted this in another post:

I think I have a solution by also excluding LUA (in addition to MIDI) from the origin based parameterMap.Onchange response as follows:

function parameterMap.onChange(valueObjects, origin, value)  
if origin == MIDI or origin == LUA then return end  
….

And in the sysex LUA response code using:

```auto
 local devID = controls.get(ctl):getValue():getMessage():getDeviceId()
 local paramType = controls.get(ctl):getValue():getMessage():getType()
 local param = controls.get(ctl):getValue():getMessage():getParameterNumber()
 parameterMap.set(devID , paramType, param, val);

```

Is that what you were referring to, or is there a simpler solution?
