Module engine
Engine class
Functions
Engine.register (data, count) | register all available engines. |
Engine.register_commands (data, count) | populate the current engine object with available commands. |
Engine.add_command (id, name, fmt) | add a command to the current engine. |
Engine.list_commands () | print all commands reported from the engine |
Engine.load (name, callback) | load a named engine, with a callback. |
Engine.__index (self, idx) | custom getters. |
Functions
- Engine.register (data, count)
-
register all available engines.
called from OSC handler.
Parameters:
- data - an array of strings
- count - number of names
- Engine.register_commands (data, count)
-
populate the current engine object with available commands.
called from OSC handler.
NB: we *can* count on the order of entries to be meaningful
Parameters:
- data - array of [name, format]
- count - number of commands
- Engine.add_command (id, name, fmt)
-
add a command to the current engine.
Parameters:
- id - integer index
- name - command name (string)
- fmt - OSC format string (e.g. 'isf' for "int string float")
- Engine.list_commands ()
- print all commands reported from the engine
- Engine.load (name, callback)
-
load a named engine, with a callback.
Parameters:
- name - name of engine
- callback - function to call on engine load. will receive command list
Returns:
-
- false if an engine load is already pending (nothing happens), true otherwise
- Engine.__index (self, idx)
-
custom getters.
[] accessor returns a command function;
this allows e.g. engine.hz(100)
Parameters:
- self
- idx