-
Notifications
You must be signed in to change notification settings - Fork 0
Nodes
Naoki Iwakami edited this page Mar 15, 2018
·
12 revisions
Analog3 synth image consists of nodes. A node is a component that has metadata and sub-node. Every node is accessible from a3 clients and a node can map to physical component.
Here is an example model description of a MIDI Gateway module:
{
"node_type": "Module",
"node_name": "MIDI Gateway",
"component_number": 0,
"model_name": "a3.midigw.000",
"model_id": 1,
"channel": "can",
"child_nodes": [{
"node_type": "Switch",
"node_name": "MIDI Channel",
"component_number": 1,
"options": [
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16"
],
"initial_value": 0
}, {
"node_type": "Switch",
"node_name": "Voices",
"component_number": 2,
"options": [
"1", "2", "4"
],
"initial_value": 0
}, {
"node_type": "Switch",
"node_name": "Retrigger",
"component_number": 3,
"initial_value": 0
}]
}
There are several types of nodes as follows:
- Module
A module is a unit of functionality. It is either a reflection of a physical module or software-generated image of a function. An instance of module has a unique instance ID that is used as an address in inter-module communication. For physical module, its CAN ID is used for the instance ID. - Knob
A knob is a parameter controller. It has one value and it is modifiable by external node. - Switch
Switch changes mode of functionality. In default, a switch has two options: on and off. Number of options can be increased by model definition. Each option has a name, so it can be used as a selector, too. - Output
and so on
Following attributes are metadata commonly used for any types of nodes.
Property Name | Type | Model Parameter? | Description | Possible Values | Default |
---|---|---|---|---|---|
node_type | string | required | Type of the node. | Module, Knob, Switch | n/a |
node_name | string | required | Name of the node. | any string | n/a |
instance_id | uint16 | no | ID of an instance. A single instance ID is shared by components in a module. | TBD (10 bit?) | given to top, child inherits top's |
component_number | uint8 | required | sub address under a module, component number of a module is always 0. The value must be unique in the module the node belongs to. | 0 to 255 | n/a |
channel | enum | optional | Access channel to implementation | can, TBD | inherits parent's channel |
initial_value | uint16 | optional | Every node has zero or one value. This property sets the initial value. | 0 to 65535 | 0 |
value | uint16 | no |
Property Name | Type | Model Parameter ? | Description | Possible Value | Default |
---|---|---|---|---|---|
model_name | string | required | Name of the model | any string | n/a |
model_id | uint16 | required | Unique identifier that distinguishes the model | 0 to 65535 | n/a |
Property Name | Type | Model Parameter ? | Description | Possible Value | Default |
---|---|---|---|---|---|
min_value | uint16 | optional | minimum value | any | 0 |
max_value | uint16 | optional | maximum value | any | 65535 |
offset | uint16 | optional | value that represents '0' | any | 0 |
scale | uint16 | optional | number of value ticks that indicates '1' | any | 1 |
Property Name | Type | Model Parameter ? | Description | Possible Value | Default |
---|---|---|---|---|---|
switch_type | enum | required | Type of the switch | TOGGLE, MOMENTARY, ROTARY, SELECTOR | viewer automatically determines |
options | string[] | optional | This attribute specifies number of options that the switch can choose and name of each option. | any array of strings | [ 'off', 'on' ] |