Module arc
Arc
The norns script reference has examples for this module.
Functions
new (id, serial, name, dev) | constructor. |
add (dev) | static callback when any arc device is added. |
remove (dev) | static callback when any arc device is removed. |
led (ring, x, val) | set state of single LED on this arc device. |
all (val) | set state of all LEDs on this arc device. |
refresh () | update any dirty quads on this arc device. |
segment (ring, from, to, level) | create an anti-aliased point to point arc segment/range on a specific LED ring. |
connect (n) | create device, returns object with handler and send |
cleanup () | clear handlers |
Functions
- new (id, serial, name, dev)
-
constructor.
Parameters:
- add (dev)
-
static callback when any arc device is added.
user scripts can redefine.
Parameters:
- dev : a Arc table
- remove (dev)
-
static callback when any arc device is removed.
user scripts can redefine.
Parameters:
- dev : a Arc table
- led (ring, x, val)
-
set state of single LED on this arc device.
Parameters:
- ring integer : ring index (1-based!)
- x integer : led index (1-based!)
- val integer : LED brightness in [0, 15]
- all (val)
-
set state of all LEDs on this arc device.
Parameters:
- val integer : LED brightness in [0, 15]
- refresh ()
- update any dirty quads on this arc device.
- segment (ring, from, to, level)
-
create an anti-aliased point to point arc
segment/range on a specific LED ring.
each point can be a decimal, LEDs will fade for in between values.
Parameters:
- ring integer : ring index (1-based)
- from number : from angle in radians
- to number : to angle in radians
- level integer : LED brightness in [0, 15]
- connect (n)
-
create device, returns object with handler and send
Parameters:
- n
- cleanup ()
- clear handlers