jalv is the underliying host powering calvo.
Each plugin is loaded on a new process and connected to previous/next plugins.
This module contains process spawn methods.
- Source:
Methods
(inner) addToQueue(plugin, type, command)
- Source:
Add a command to the plugin instance queue
Parameters:
Name | Type | Description |
---|---|---|
plugin |
plugin | The plugin instance. |
type |
string | Can be 'set, controls, monitors' |
command |
string | command to execute. |
Returns:
null if no plugin is specified
(async, inner) getControls(plugin, type)
- Source:
Gets the control values for a jalv process.
Parameters:
Name | Type | Description |
---|---|---|
plugin |
plugin | Plugin instance (from rack) |
type |
string | Type of control to get('controls'|'monitor' ) |
Returns:
the control value as json: ctrlName: ctrlValue
(inner) jalvStdoutToJSON(str, command)
- Source:
Formats and convert a JALV kvp stdout (CONTROL = VALUE) into a json object.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | JALV stoud to format |
command |
string | the command invoked which resulted in this output. |
Returns:
a JSON object. key: value
(inner) kill_plugin(process, rackIndex)
- Source:
Kills the plugin process.
Parameters:
Name | Type | Description |
---|---|---|
process |
pluginProcess | |
rackIndex |
number |
(async, inner) processQueue(plugin)
- Source:
- See:
-
- settings
On calvo, Jalv host is spawned as a child process and we take the values from stdout.
To provide at least, a very basic monitoring, a queue system is necesary.
The queue will 'tick' every x ms according to JALV_POLLING_RATE setting. each tick will process a command and wait for the response.
Different commands have different priorities:
SET = HIGH, controls = MID, monitors = LOW
As monitors spams the stdout buffer it was neeeded to only call it when nothing else is needing the buffer.
Parameters:
Name | Type | Description |
---|---|---|
plugin |
plugin |
Returns:
null if no Selected plugin or the process is busy (wating for a response)
(inner) setControl(plugin, control, value)
- Source:
Set a value on a control (in queue)
Parameters:
Name | Type | Description |
---|---|---|
plugin |
plugin | Plugin |
control |
string | Control name. Uses `symbol` property of LV2 spec. |
value |
number | Value to assign. |
Returns:
null if no plugin is specified
(async, inner) spawn_plugin(plugin, rackIndex)
- Source:
Spawns a plugin. It will execute jalv and load the plugin. ALl communcations can be reachead via the process now at plugin.process
Parameters:
Name | Type | Description |
---|---|---|
plugin |
plugin | |
rackIndex |
* |
Returns:
The nodejs child process.
(inner) write(process, msg)
- Source:
Writes a message to a plugin process.
Example
help Display help message
controls Print settable control values
monitors Print output control values
presets Print available presets
preset URI Set preset
set INDEX VALUE Set control value by port index
set SYMBOL VALUE Set control value by symbol
SYMBOL = VALUE Set control value by symbol
Parameters:
Name | Type | Description |
---|---|---|
process |
jalvProcess | The jalv process to write into. (plugin.process) |
msg |
string | The Jalv prompt supports several commands for interactive control. |
(async, inner) writeWait(process, command, maxRetriesopt, retriesWaitopt)
- Source:
Write to a process stdin and wait for a response on stdout.
While waiting, it will set the process.busy flag, so the queue will not advance until this function is finished.
*
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
process |
pluginJalvProcess | The plugin instance JALV process. | ||
command |
string | The command to execute on JALV | ||
maxRetries |
number |
<optional> |
10
|
How many time retry before giving up. |
retriesWait |
number |
<optional> |
5
|
How many ms to wait before each retry. |
Returns:
A JSON file with the (parsed) output for the given command.