TouchOSC

Next generation modular control surface
TouchOSC Manual

Script · Lua Functions


The following Lua standard library functions are available.


base

Only the following Lua base library functions are available:

error
ipairs
next
pairs
print
select
tonumber
tostring
unpack
type


table

All standard Lua table library functions are available plus the following additions:

table.pack(...)

Returns a new sequential table created from the elements provided.

table.unpack(...)

Same as the Lua base library function unpack.


math

All standard Lua math library functions are available plus the following additions:

math.clamp(number, number, number)

Returns min(max(x, minVal), maxVal) where x is the first parameter and minVal and maxVal the second and third parameters.


string

All standard Lua string library functions are available.


bit32
since 1.1.7.154

Support for bitwise operations has been back-ported from Lua 5.2. All functions are available inside the table bit32.


utf8
since 1.3.0.202

Basic support for UTF-8 encoding has been back-ported from Lua 5.3. All functions are available inside the table utf8.


Cookie Policy

We use cookies to deliver website content. By continuing without changing your preferences, you agree to our use of cookies.