Class poll

Poll class; API for receiving values from audio system.

Tables

poll.polls poll objects (index by name)
poll.poll_names poll names (indexed by int) - for reverse lookup

Instance Methods

poll:start () start a poll.
poll:stop () stop a poll.
poll:update (callback) request a single update immediately.
poll:__newindex (idx, val) custom setters.
poll:__index (idx) custom getters.

Static Methods

poll:register (data, count) called with OSC data from norns callback to register all available polls.
poll:set (name, callback) set callback function for registered Poll object by name.
poll:clear_all () stop all polls.


Tables

poll.polls
poll objects (index by name)
poll.poll_names
poll names (indexed by int) - for reverse lookup

Instance Methods

poll:start ()
start a poll.
poll:stop ()
stop a poll.
poll:update (callback)
request a single update immediately.

Parameters:

  • callback
poll:__newindex (idx, val)
custom setters. `.time` and `.callback` set the corresponding private properties and perform approriate actions.

Parameters:

  • idx
  • val
poll:__index (idx)
custom getters. available properties: name, callback, start, stop.

Parameters:

  • idx

Static Methods

poll:register (data, count)
called with OSC data from norns callback to register all available polls.

Parameters:

  • data - table from OSC; each entry is { id (int), name (string) }
  • count integer - size of table
poll:set (name, callback)
set callback function for registered Poll object by name.

Parameters:

  • name string
  • callback function to call with value on each poll
poll:clear_all ()
stop all polls.
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19