# Change needed to the LUA displayNotes formatter

**URL:** <https://forum.electra.one/t/change-needed-to-the-lua-displaynotes-formatter/1218>\
**Category:** Bug reports\
**Created:** [December 18, 2021, 11:22am UTC](https://forum.electra.one/t/change-needed-to-the-lua-displaynotes-formatter/1218 "2021-12-18T11:22:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [December 18, 2021, 11:22am UTC](https://forum.electra.one/t/change-needed-to-the-lua-displaynotes-formatter/1218/1 "2021-12-18T11:22:51Z")

</div>

It’s early days yet in my leearning process, @martin , so I’m trying out all the lua preset examples to get an understanding of the specificities of this language.

One of the things I’ve tried out is the [[Lua] Value formatting preset](https://app.electra.one/preset/6CW1owPLDq6B2qdZEY9h). What I noticed was that if I limited the Midi Range of parameter 4 (NOTE-fader) to only 24 values, I wasn’t getting 2 octaves, but slightly more. Rather unexpected, but then I noticed the A# notes were missing.

Could it be the following is to be changed to the Lua script:

- the notes array only has 11 values and should have 12: missing element = number 11 “A%d#”
- the string format in the displayNotes function should use all 12 elements:  
return (string.format(notes[math.fmod(value, 12) + 1], value // 12))  
instead of  
return (string.format(notes[math.fmod(value, 11) + 1], value // 12))
