# Lua beginner problems

**URL:** <https://forum.electra.one/t/lua-beginner-problems/2163>\
**Category:** General discussion\
**Created:** [June 11, 2023, 7:39am UTC](https://forum.electra.one/t/lua-beginner-problems/2163 "2023-06-11T07:39:55Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![eusti](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/eusti/32/1070_2.png) [@eusti](https://forum.electra.one/u/eusti)\
**Post date:** [June 14, 2023, 4:16pm UTC](https://forum.electra.one/t/lua-beginner-problems/2163/21 "2023-06-14T16:16:21Z")

</div>

Everything is better after a few Duvels! 😉

---

<div class="post-metadata">

**Author:** ![C0d3man](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/c0d3man/32/1511_2.png) [@C0d3man](https://forum.electra.one/u/C0d3man)\
**Post date:** [June 15, 2023, 8:34am UTC](https://forum.electra.one/t/lua-beginner-problems/2163/22 "2023-06-15T08:34:01Z")

</div>

Now I got some time to try your demo preset. Very nice! I think I understand the code. But yes, it’s a kind of difficult to get a list of configured devices when nothing is configured. In such case: can Lua handle exceptions?

It would be very cool if there would be a `<Device>:create(name, channel, rate)` function… @martin 🙂

I will go on and try to implement your functions for my Zynthian setup.

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [June 15, 2023, 9:29am UTC](https://forum.electra.one/t/lua-beginner-problems/2163/23 "2023-06-15T09:29:11Z")

</div>

Remember - “Device” in this context is related to things defined/installed/created on the Electra One. I can load up multiple presets that talk to synthesizers and effects that I do not own. As long as they have a device name/id/etc, they will show up when you query the devices. This doesn’t mean that the preset will actually be useful, just that it is installed in the Electra One.

If you’re looking for some way to go out across the MIDI cables and look for actual devices that are up and running, that’s a different problem.

[Previous page](https://forum.electra.one/t/lua-beginner-problems/2163.md?page=1)
