Skip to content

Commit

Permalink
introduced encoders
Browse files Browse the repository at this point in the history
  • Loading branch information
Bannsaenger committed Jun 1, 2021
1 parent 1ac32cb commit 3eafdc1
Show file tree
Hide file tree
Showing 8 changed files with 569 additions and 55 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Communicate with a Behringer X-Touch Control Surface (DAW Controller)
### 0.1.0
* (Bannsaenger) introduced channel and page switching

### 0.2.0
* (Bannsaenger) introduced encoders

## License
MIT License

Expand Down
3 changes: 3 additions & 0 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
},
"0.1.0": {
"en": "introduced channel and page switching"
},
"0.2.0": {
"en": "introduced encoders"
}
},
"title": "Behringer X-Touch",
Expand Down
4 changes: 2 additions & 2 deletions lib/console_layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
"transport.stop",
"transport.play",
"transport.record",
"transport.scrub",
"navigation.up",
"navigation.left",
"navigation.zoom",
"navigation.right",
"navigation.down",
"navigation.scrub"
"navigation.down"
]
}
218 changes: 218 additions & 0 deletions lib/encoder_mapping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"mode_0": {
"0": {
"0": 1,
"1": 0
},
"1": {
"0": 2,
"1": 0
},
"2": {
"0": 4,
"1": 0
},
"3": {
"0": 8,
"1": 0
},
"4": {
"0": 16,
"1": 0
},
"5": {
"0": 32,
"1": 0
},
"6": {
"0": 64,
"1": 0
},
"7": {
"0": 0,
"1": 1
},
"8": {
"0": 0,
"1": 2
},
"9": {
"0": 0,
"1": 4
},
"10": {
"0": 0,
"1": 8
},
"11": {
"0": 0,
"1": 16
},
"12": {
"0": 0,
"1": 32
}
},
"mode_1": {
"0": {
"0": 63,
"1": 0
},
"1": {
"0": 62,
"1": 0
},
"2": {
"0": 60,
"1": 0
},
"3": {
"0": 56,
"1": 0
},
"4": {
"0": 48,
"1": 0
},
"5": {
"0": 32,
"1": 0
},
"6": {
"0": 64,
"1": 0
},
"7": {
"0": 0,
"1": 1
},
"8": {
"0": 0,
"1": 3
},
"9": {
"0": 0,
"1": 7
},
"10": {
"0": 0,
"1": 15
},
"11": {
"0": 0,
"1": 31
},
"12": {
"0": 0,
"1": 63
}
},
"mode_2": {
"0": {
"0": 1,
"1": 0
},
"1": {
"0": 3,
"1": 0
},
"2": {
"0": 7,
"1": 0
},
"3": {
"0": 15,
"1": 0
},
"4": {
"0": 31,
"1": 0
},
"5": {
"0": 63,
"1": 0
},
"6": {
"0": 127,
"1": 0
},
"7": {
"0": 127,
"1": 1
},
"8": {
"0": 127,
"1": 3
},
"9": {
"0": 127,
"1": 7
},
"10": {
"0": 127,
"1": 15
},
"11": {
"0": 127,
"1": 31
},
"12": {
"0": 127,
"1": 63
}
},
"mode_3": {
"0": {
"0": 64,
"1": 0
},
"1": {
"0": 96,
"1": 1
},
"2": {
"0": 96,
"1": 1
},
"3": {
"0": 112,
"1": 3
},
"4": {
"0": 112,
"1": 3
},
"5": {
"0": 120,
"1": 7
},
"6": {
"0": 120,
"1": 7
},
"7": {
"0": 124,
"1": 15
},
"8": {
"0": 124,
"1": 15
},
"9": {
"0": 126,
"1": 31
},
"10": {
"0": 126,
"1": 31
},
"11": {
"0": 127,
"1": 63
},
"12": {
"0": 127,
"1": 63
}
}
}
4 changes: 2 additions & 2 deletions lib/midi_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"93": "transport.stop",
"94": "transport.play",
"95": "transport.record",
"101": "transport.scrub",
"46": "page.faderBankDec",
"47": "page.faderBankInc",
"48": "page.channelDec",
Expand All @@ -111,6 +112,5 @@
"98": "navigation.left",
"100": "navigation.zoom",
"99": "navigation.right",
"97": "navigation.down",
"101": "navigation.scrub"
"97": "navigation.down"
}
39 changes: 26 additions & 13 deletions lib/objects_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
"type": "channel",
"common": {
"role": "level.volume",
"name": "Master fader"
"name": "Channel fader"
},
"native": {}
}
Expand Down Expand Up @@ -912,6 +912,15 @@
},
"native": {}
},
{
"_id": "scrub",
"type": "channel",
"common": {
"role": "button",
"name": "Button SCRUB (RED)"
},
"native": {}
},
{
"_id": "encoder",
"type": "channel",
Expand Down Expand Up @@ -982,15 +991,6 @@
"name": "Button v (DOWN) (ORANGE)"
},
"native": {}
},
{
"_id": "scrub",
"type": "channel",
"common": {
"role": "button",
"name": "Button SCRUB (RED)"
},
"native": {}
}
],
"levelVolume": [
Expand Down Expand Up @@ -1310,7 +1310,20 @@
"type": "state",
"common": {
"role": "value",
"name": "If true controller is actually pressed",
"name": "If true encoder is actually pressed",
"type": "boolean",
"read": true,
"write": true,
"def": false
},
"native": {}
},
{
"_id": "enabled",
"type": "state",
"common": {
"role": "value",
"name": "If true the encoder is working and will be displayed with the LED ring",
"type": "boolean",
"read": true,
"write": true,
Expand Down Expand Up @@ -1387,7 +1400,7 @@
"type": "state",
"common": {
"role": "value",
"name": "If controller is one step moved counter clockwise",
"name": "If controller is moved one step counter clockwise",
"type": "boolean",
"read": true,
"write": false,
Expand All @@ -1400,7 +1413,7 @@
"type": "state",
"common": {
"role": "value",
"name": "If controller is one step moved clockwise",
"name": "If controller is moved one step clockwise",
"type": "boolean",
"read": true,
"write": false,
Expand Down
Loading

0 comments on commit 3eafdc1

Please sign in to comment.