## lib/sequencer
* [lib/sequencer](#module_lib/sequencer)
* [~Create a new sequencer and assign command and UI as private sub-classes](#module_lib/sequencer..Create a new sequencer and assign command and UI as private sub-classes)
* [new Create a new sequencer and assign command and UI as private sub-classes(cfg, cmd, ui)](#new_module_lib/sequencer..Create a new sequencer and assign command and UI as private sub-classes_new)
* [~Sequencer](#module_lib/sequencer..Sequencer)
* [.cmds(obj)](#module_lib/sequencer..Sequencer+cmds)
* [.init()](#module_lib/sequencer..Sequencer+init)
* [.listen()](#module_lib/sequencer..Sequencer+listen)
* [.listener(event, arg)](#module_lib/sequencer..Sequencer+listener)
* [.setLoops(count)](#module_lib/sequencer..Sequencer+setLoops)
* [.setSteps(steps)](#module_lib/sequencer..Sequencer+setSteps)
* [.unsetSteps(steps)](#module_lib/sequencer..Sequencer+unsetSteps)
* [.start(arg)](#module_lib/sequencer..Sequencer+start)
* [.pause()](#module_lib/sequencer..Sequencer+pause)
* [.stop()](#module_lib/sequencer..Sequencer+stop)
* [.step(x)](#module_lib/sequencer..Sequencer+step)
* [.cmdExec(x)](#module_lib/sequencer..Sequencer+cmdExec)
### lib/sequencer~Create a new sequencer and assign command and UI as private sub-classes
**Kind**: inner class of [lib/sequencer
](#module_lib/sequencer)
#### new Create a new sequencer and assign command and UI as private sub-classes(cfg, cmd, ui)
| Param | Type | Description |
| --- | --- | --- |
| cfg | object
| Configuration object |
| cmd | object
| Shared command class |
| ui | object
| Electron UI, browser window |
### lib/sequencer~Sequencer
Class representing all sequencer features.
**Kind**: inner class of [lib/sequencer
](#module_lib/sequencer)
* [~Sequencer](#module_lib/sequencer..Sequencer)
* [.cmds(obj)](#module_lib/sequencer..Sequencer+cmds)
* [.init()](#module_lib/sequencer..Sequencer+init)
* [.listen()](#module_lib/sequencer..Sequencer+listen)
* [.listener(event, arg)](#module_lib/sequencer..Sequencer+listener)
* [.setLoops(count)](#module_lib/sequencer..Sequencer+setLoops)
* [.setSteps(steps)](#module_lib/sequencer..Sequencer+setSteps)
* [.unsetSteps(steps)](#module_lib/sequencer..Sequencer+unsetSteps)
* [.start(arg)](#module_lib/sequencer..Sequencer+start)
* [.pause()](#module_lib/sequencer..Sequencer+pause)
* [.stop()](#module_lib/sequencer..Sequencer+stop)
* [.step(x)](#module_lib/sequencer..Sequencer+step)
* [.cmdExec(x)](#module_lib/sequencer..Sequencer+cmdExec)
#### sequencer.cmds(obj)
Take configuration object and assign all commands as keys
in the internal CMDS object.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| obj | object
| Configuration object |
#### sequencer.init()
Initialize the class by requiring ipcMain from electron
and creating logger.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
#### sequencer.listen()
Bind ipc listener to channel 'sequencer' or current id of
class.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
#### sequencer.listener(event, arg)
Listener callback function. Called whenever ipc
message is sent to channel 'sequencer'.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| event | object
| IPC message event |
| arg | object
| Arguments provided in message |
#### sequencer.setLoops(count)
Sets the value of the loops in the grid sequence
to value sent by UI in ipc message.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| count | integer
| Number of loops to set grid sequence to |
#### sequencer.setSteps(steps)
Sets multiple steps at once
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| steps | array
| Array of steps to set or update |
#### sequencer.unsetSteps(steps)
Resets multiple steps to default 'undefined' state
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| steps | array
| Array containing the x location of steps to unset |
#### sequencer.start(arg)
Starts a sequence with the existing grid sequence,
or if one is provided in the arg object, starts
that sequence.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| arg | object
| Arguments from ipc message |
#### sequencer.pause()
Pauses sequence from UI.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
#### sequencer.stop()
Stops the sequence
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
#### sequencer.step(x)
Execute command @ step x. Wrapper with try catch.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| x | integer
| Step to execute command at |
#### sequencer.cmdExec(x)
Locate step @ position x and execute the command.
**Kind**: instance method of [Sequencer
](#module_lib/sequencer..Sequencer)
| Param | Type | Description |
| --- | --- | --- |
| x | integer
| Step to execute command at |