Compare commits
3
Commits
72c227b153
...
e96b31ab66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e96b31ab66 | ||
|
|
2219788904 | ||
|
|
11da656ee6 |
No files matched your search
@@ -62,7 +62,7 @@ it as a systemd user service that starts at login and waits for the pad:
|
||||
padcontroller/systemd/install.sh
|
||||
```
|
||||
|
||||
Options after the command go to the pad controller (for example `--lock-knobs`).
|
||||
Options after the command go to the pad controller (for example `--no-lamps`).
|
||||
`--no-enable` installs it without starting it at login (start it with
|
||||
`systemctl --user start padcontroller`). `--uninstall` removes the service. Logs: `journalctl --user -u padcontroller -f`.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Pads pick colours, sliders mix a custom colour, like the QLC+ virtual console.
|
||||
// Pads pick colours and sliders set levels, like the QLC+ virtual console.
|
||||
// It reads the pad directly: Play shifts bank 2 here, as padcontroller/layer.py does
|
||||
// when QLC+ is used.
|
||||
// Generated by scripts/shows/make_chataigne.py: edit this template, not the output.
|
||||
@@ -40,7 +40,7 @@ function init()
|
||||
for (var p = 0; p < group.pads.length; p++) mark(touched, group.pads[p].levels);
|
||||
for (var s = 0; s < group.sliders.length; s++) mark(touched, group.sliders[s].levels);
|
||||
var mix = [];
|
||||
for (var m = 0; m < group.sliders.length; m++) mix[m] = 0;
|
||||
for (var m = 0; m < group.sliders.length; m++) mix[m] = group.sliders[m].value;
|
||||
states[g] = {active: -1, elapsed: 0, duration: 0, level: level, from: from, to: to, touched: touched, mix: mix};
|
||||
|
||||
// Controls on the script's Params, for the dashboard to show.
|
||||
@@ -54,7 +54,7 @@ function init()
|
||||
}
|
||||
for (var r = 0; r < group.sliders.length; r++)
|
||||
{
|
||||
sliderParams[g][r] = script.addFloatParameter(group.sliders[r].id, group.name + " " + group.sliders[r].name, 0, 0, 1);
|
||||
sliderParams[g][r] = script.addFloatParameter(group.sliders[r].id, group.name + " " + group.sliders[r].name, group.sliders[r].value, 0, 1);
|
||||
lookup[group.sliders[r].id] = {g: g, p: -1, s: r};
|
||||
}
|
||||
nowParams[g] = script.addStringParameter(group.now, group.name + " scene", "");
|
||||
|
||||
+47
-45
@@ -1,4 +1,4 @@
|
||||
// Pads pick colours, sliders mix a custom colour, like the QLC+ virtual console.
|
||||
// Pads pick colours and sliders set levels, like the QLC+ virtual console.
|
||||
// It reads the pad directly: Play shifts bank 2 here, as padcontroller/layer.py does
|
||||
// when QLC+ is used.
|
||||
// Generated by scripts/shows/make_chataigne.py: edit this template, not the output.
|
||||
@@ -11,58 +11,60 @@ var GROUPS = [
|
||||
name: "Colour 1",
|
||||
now: "now1",
|
||||
pads: [
|
||||
{id: "c1Red", rgb: [1.0, 0.0, 0.0], note: 52, name: "Red", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,0,92,0,93,0,96,255,98,255,99,0,100,0,101,0,104,255,106,255,107,0,108,0,109,0,112,255,114,255,115,0,116,0,117,0,120,255,122,255,123,0,124,0,125,0,128,255,130,255,131,0,132,0,133,0,136,255,138,255,139,0,140,0,141,0,144,255,146,255,147,0,148,0,149,0,152,255,154,255,155,0,156,0,157,0,160,255,162,255,163,0,164,0,165,0,168,255,170,255,171,0,172,0,173,0,176,255,178,255,179,0,180,0,181,0,184,255,186,255,187,0,188,0,189,0,192,255,194,255,195,0,196,0,197,0,200,255,202,255,203,0,204,0,205,0]},
|
||||
{id: "c1Orange", rgb: [1.0, 0.498, 0.0], note: 53, name: "Orange", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,127,92,0,93,0,96,255,98,255,99,127,100,0,101,0,104,255,106,255,107,127,108,0,109,0,112,255,114,255,115,127,116,0,117,0,120,255,122,255,123,127,124,0,125,0,128,255,130,255,131,127,132,0,133,0,136,255,138,255,139,127,140,0,141,0,144,255,146,255,147,127,148,0,149,0,152,255,154,255,155,127,156,0,157,0,160,255,162,255,163,127,164,0,165,0,168,255,170,255,171,127,172,0,173,0,176,255,178,255,179,127,180,0,181,0,184,255,186,255,187,127,188,0,189,0,192,255,194,255,195,127,196,0,197,0,200,255,202,255,203,127,204,0,205,0]},
|
||||
{id: "c1Yellow", rgb: [1.0, 1.0, 0.0], note: 54, name: "Yellow", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,255,92,0,93,0,96,255,98,255,99,255,100,0,101,0,104,255,106,255,107,255,108,0,109,0,112,255,114,255,115,255,116,0,117,0,120,255,122,255,123,255,124,0,125,0,128,255,130,255,131,255,132,0,133,0,136,255,138,255,139,255,140,0,141,0,144,255,146,255,147,255,148,0,149,0,152,255,154,255,155,255,156,0,157,0,160,255,162,255,163,255,164,0,165,0,168,255,170,255,171,255,172,0,173,0,176,255,178,255,179,255,180,0,181,0,184,255,186,255,187,255,188,0,189,0,192,255,194,255,195,255,196,0,197,0,200,255,202,255,203,255,204,0,205,0]},
|
||||
{id: "c1Lime", rgb: [0.498, 1.0, 0.0], note: 55, name: "Lime", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,127,91,255,92,0,93,0,96,255,98,127,99,255,100,0,101,0,104,255,106,127,107,255,108,0,109,0,112,255,114,127,115,255,116,0,117,0,120,255,122,127,123,255,124,0,125,0,128,255,130,127,131,255,132,0,133,0,136,255,138,127,139,255,140,0,141,0,144,255,146,127,147,255,148,0,149,0,152,255,154,127,155,255,156,0,157,0,160,255,162,127,163,255,164,0,165,0,168,255,170,127,171,255,172,0,173,0,176,255,178,127,179,255,180,0,181,0,184,255,186,127,187,255,188,0,189,0,192,255,194,127,195,255,196,0,197,0,200,255,202,127,203,255,204,0,205,0]},
|
||||
{id: "c1Green", rgb: [0.0, 1.0, 0.0], note: 56, name: "Green", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,255,92,0,93,0,96,255,98,0,99,255,100,0,101,0,104,255,106,0,107,255,108,0,109,0,112,255,114,0,115,255,116,0,117,0,120,255,122,0,123,255,124,0,125,0,128,255,130,0,131,255,132,0,133,0,136,255,138,0,139,255,140,0,141,0,144,255,146,0,147,255,148,0,149,0,152,255,154,0,155,255,156,0,157,0,160,255,162,0,163,255,164,0,165,0,168,255,170,0,171,255,172,0,173,0,176,255,178,0,179,255,180,0,181,0,184,255,186,0,187,255,188,0,189,0,192,255,194,0,195,255,196,0,197,0,200,255,202,0,203,255,204,0,205,0]},
|
||||
{id: "c1Spring", rgb: [0.0, 1.0, 0.498], note: 57, name: "Spring", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,255,92,127,93,0,96,255,98,0,99,255,100,127,101,0,104,255,106,0,107,255,108,127,109,0,112,255,114,0,115,255,116,127,117,0,120,255,122,0,123,255,124,127,125,0,128,255,130,0,131,255,132,127,133,0,136,255,138,0,139,255,140,127,141,0,144,255,146,0,147,255,148,127,149,0,152,255,154,0,155,255,156,127,157,0,160,255,162,0,163,255,164,127,165,0,168,255,170,0,171,255,172,127,173,0,176,255,178,0,179,255,180,127,181,0,184,255,186,0,187,255,188,127,189,0,192,255,194,0,195,255,196,127,197,0,200,255,202,0,203,255,204,127,205,0]},
|
||||
{id: "c1Cyan", rgb: [0.0, 1.0, 1.0], note: 58, name: "Cyan", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,255,92,255,93,0,96,255,98,0,99,255,100,255,101,0,104,255,106,0,107,255,108,255,109,0,112,255,114,0,115,255,116,255,117,0,120,255,122,0,123,255,124,255,125,0,128,255,130,0,131,255,132,255,133,0,136,255,138,0,139,255,140,255,141,0,144,255,146,0,147,255,148,255,149,0,152,255,154,0,155,255,156,255,157,0,160,255,162,0,163,255,164,255,165,0,168,255,170,0,171,255,172,255,173,0,176,255,178,0,179,255,180,255,181,0,184,255,186,0,187,255,188,255,189,0,192,255,194,0,195,255,196,255,197,0,200,255,202,0,203,255,204,255,205,0]},
|
||||
{id: "c1Azure", rgb: [0.0, 0.498, 1.0], note: 59, name: "Azure", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,127,92,255,93,0,96,255,98,0,99,127,100,255,101,0,104,255,106,0,107,127,108,255,109,0,112,255,114,0,115,127,116,255,117,0,120,255,122,0,123,127,124,255,125,0,128,255,130,0,131,127,132,255,133,0,136,255,138,0,139,127,140,255,141,0,144,255,146,0,147,127,148,255,149,0,152,255,154,0,155,127,156,255,157,0,160,255,162,0,163,127,164,255,165,0,168,255,170,0,171,127,172,255,173,0,176,255,178,0,179,127,180,255,181,0,184,255,186,0,187,127,188,255,189,0,192,255,194,0,195,127,196,255,197,0,200,255,202,0,203,127,204,255,205,0]},
|
||||
{id: "c1Blue", rgb: [0.0, 0.0, 1.0], note: 60, name: "Blue", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,0,92,255,93,0,96,255,98,0,99,0,100,255,101,0,104,255,106,0,107,0,108,255,109,0,112,255,114,0,115,0,116,255,117,0,120,255,122,0,123,0,124,255,125,0,128,255,130,0,131,0,132,255,133,0,136,255,138,0,139,0,140,255,141,0,144,255,146,0,147,0,148,255,149,0,152,255,154,0,155,0,156,255,157,0,160,255,162,0,163,0,164,255,165,0,168,255,170,0,171,0,172,255,173,0,176,255,178,0,179,0,180,255,181,0,184,255,186,0,187,0,188,255,189,0,192,255,194,0,195,0,196,255,197,0,200,255,202,0,203,0,204,255,205,0]},
|
||||
{id: "c1Violet", rgb: [0.498, 0.0, 1.0], note: 61, name: "Violet", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,127,91,0,92,255,93,0,96,255,98,127,99,0,100,255,101,0,104,255,106,127,107,0,108,255,109,0,112,255,114,127,115,0,116,255,117,0,120,255,122,127,123,0,124,255,125,0,128,255,130,127,131,0,132,255,133,0,136,255,138,127,139,0,140,255,141,0,144,255,146,127,147,0,148,255,149,0,152,255,154,127,155,0,156,255,157,0,160,255,162,127,163,0,164,255,165,0,168,255,170,127,171,0,172,255,173,0,176,255,178,127,179,0,180,255,181,0,184,255,186,127,187,0,188,255,189,0,192,255,194,127,195,0,196,255,197,0,200,255,202,127,203,0,204,255,205,0]},
|
||||
{id: "c1Magenta", rgb: [1.0, 0.0, 1.0], note: 62, name: "Magenta", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,0,92,255,93,0,96,255,98,255,99,0,100,255,101,0,104,255,106,255,107,0,108,255,109,0,112,255,114,255,115,0,116,255,117,0,120,255,122,255,123,0,124,255,125,0,128,255,130,255,131,0,132,255,133,0,136,255,138,255,139,0,140,255,141,0,144,255,146,255,147,0,148,255,149,0,152,255,154,255,155,0,156,255,157,0,160,255,162,255,163,0,164,255,165,0,168,255,170,255,171,0,172,255,173,0,176,255,178,255,179,0,180,255,181,0,184,255,186,255,187,0,188,255,189,0,192,255,194,255,195,0,196,255,197,0,200,255,202,255,203,0,204,255,205,0]},
|
||||
{id: "c1Pink", rgb: [1.0, 0.157, 0.471], note: 63, name: "Pink", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,40,92,120,93,0,96,255,98,255,99,40,100,120,101,0,104,255,106,255,107,40,108,120,109,0,112,255,114,255,115,40,116,120,117,0,120,255,122,255,123,40,124,120,125,0,128,255,130,255,131,40,132,120,133,0,136,255,138,255,139,40,140,120,141,0,144,255,146,255,147,40,148,120,149,0,152,255,154,255,155,40,156,120,157,0,160,255,162,255,163,40,164,120,165,0,168,255,170,255,171,40,172,120,173,0,176,255,178,255,179,40,180,120,181,0,184,255,186,255,187,40,188,120,189,0,192,255,194,255,195,40,196,120,197,0,200,255,202,255,203,40,204,120,205,0]},
|
||||
{id: "c1Warm", rgb: [1.0, 0.941, 0.627], note: 64, name: "Warm", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,255,91,120,92,40,93,120,96,255,98,255,99,120,100,40,101,120,104,255,106,255,107,120,108,40,109,120,112,255,114,255,115,120,116,40,117,120,120,255,122,255,123,120,124,40,125,120,128,255,130,255,131,120,132,40,133,120,136,255,138,255,139,120,140,40,141,120,144,255,146,255,147,120,148,40,149,120,152,255,154,255,155,120,156,40,157,120,160,255,162,255,163,120,164,40,165,120,168,255,170,255,171,120,172,40,173,120,176,255,178,255,179,120,180,40,181,120,184,255,186,255,187,120,188,40,189,120,192,255,194,255,195,120,196,40,197,120,200,255,202,255,203,120,204,40,205,120]},
|
||||
{id: "c1White", rgb: [1.0, 1.0, 1.0], note: 65, name: "White", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,0,91,0,92,0,93,255,96,255,98,0,99,0,100,0,101,255,104,255,106,0,107,0,108,0,109,255,112,255,114,0,115,0,116,0,117,255,120,255,122,0,123,0,124,0,125,255,128,255,130,0,131,0,132,0,133,255,136,255,138,0,139,0,140,0,141,255,144,255,146,0,147,0,148,0,149,255,152,255,154,0,155,0,156,0,157,255,160,255,162,0,163,0,164,0,165,255,168,255,170,0,171,0,172,0,173,255,176,255,178,0,179,0,180,0,181,255,184,255,186,0,187,0,188,0,189,255,192,255,194,0,195,0,196,0,197,255,200,255,202,0,203,0,204,0,205,255]},
|
||||
{id: "c1Cool", rgb: [0.784, 0.941, 1.0], note: 66, name: "Cool", fadeIn: 1000, fadeOut: 1000, levels: [88,255,90,80,91,120,92,255,93,120,96,255,98,80,99,120,100,255,101,120,104,255,106,80,107,120,108,255,109,120,112,255,114,80,115,120,116,255,117,120,120,255,122,80,123,120,124,255,125,120,128,255,130,80,131,120,132,255,133,120,136,255,138,80,139,120,140,255,141,120,144,255,146,80,147,120,148,255,149,120,152,255,154,80,155,120,156,255,157,120,160,255,162,80,163,120,164,255,165,120,168,255,170,80,171,120,172,255,173,120,176,255,178,80,179,120,180,255,181,120,184,255,186,80,187,120,188,255,189,120,192,255,194,80,195,120,196,255,197,120,200,255,202,80,203,120,204,255,205,120]},
|
||||
{id: "c1Custom", rgb: [1.0, 0.235, 0.0], note: 67, name: "Custom", fadeIn: 1000, fadeOut: 1000, levels: [88,0,96,0,104,0,112,0,120,0,128,0,136,0,144,0,152,0,160,0,168,0,176,0,184,0,192,0,200,0]},
|
||||
{id: "c1Red", rgb: [1.0, 0.0, 0.0], note: 52, name: "Red", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,0,92,0,93,0,98,255,99,0,100,0,101,0,106,255,107,0,108,0,109,0,114,255,115,0,116,0,117,0,122,255,123,0,124,0,125,0,130,255,131,0,132,0,133,0,138,255,139,0,140,0,141,0,146,255,147,0,148,0,149,0,154,255,155,0,156,0,157,0,162,255,163,0,164,0,165,0,170,255,171,0,172,0,173,0,178,255,179,0,180,0,181,0,186,255,187,0,188,0,189,0,194,255,195,0,196,0,197,0,202,255,203,0,204,0,205,0]},
|
||||
{id: "c1Orange", rgb: [1.0, 0.498, 0.0], note: 53, name: "Orange", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,127,92,0,93,0,98,255,99,127,100,0,101,0,106,255,107,127,108,0,109,0,114,255,115,127,116,0,117,0,122,255,123,127,124,0,125,0,130,255,131,127,132,0,133,0,138,255,139,127,140,0,141,0,146,255,147,127,148,0,149,0,154,255,155,127,156,0,157,0,162,255,163,127,164,0,165,0,170,255,171,127,172,0,173,0,178,255,179,127,180,0,181,0,186,255,187,127,188,0,189,0,194,255,195,127,196,0,197,0,202,255,203,127,204,0,205,0]},
|
||||
{id: "c1Amber", rgb: [1.0, 0.749, 0.0], note: 54, name: "Amber", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,191,92,0,93,0,98,255,99,191,100,0,101,0,106,255,107,191,108,0,109,0,114,255,115,191,116,0,117,0,122,255,123,191,124,0,125,0,130,255,131,191,132,0,133,0,138,255,139,191,140,0,141,0,146,255,147,191,148,0,149,0,154,255,155,191,156,0,157,0,162,255,163,191,164,0,165,0,170,255,171,191,172,0,173,0,178,255,179,191,180,0,181,0,186,255,187,191,188,0,189,0,194,255,195,191,196,0,197,0,202,255,203,191,204,0,205,0]},
|
||||
{id: "c1Yellow", rgb: [1.0, 1.0, 0.0], note: 55, name: "Yellow", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,255,92,0,93,0,98,255,99,255,100,0,101,0,106,255,107,255,108,0,109,0,114,255,115,255,116,0,117,0,122,255,123,255,124,0,125,0,130,255,131,255,132,0,133,0,138,255,139,255,140,0,141,0,146,255,147,255,148,0,149,0,154,255,155,255,156,0,157,0,162,255,163,255,164,0,165,0,170,255,171,255,172,0,173,0,178,255,179,255,180,0,181,0,186,255,187,255,188,0,189,0,194,255,195,255,196,0,197,0,202,255,203,255,204,0,205,0]},
|
||||
{id: "c1Lime", rgb: [0.498, 1.0, 0.0], note: 56, name: "Lime", fadeIn: 1000, fadeOut: 1000, levels: [90,127,91,255,92,0,93,0,98,127,99,255,100,0,101,0,106,127,107,255,108,0,109,0,114,127,115,255,116,0,117,0,122,127,123,255,124,0,125,0,130,127,131,255,132,0,133,0,138,127,139,255,140,0,141,0,146,127,147,255,148,0,149,0,154,127,155,255,156,0,157,0,162,127,163,255,164,0,165,0,170,127,171,255,172,0,173,0,178,127,179,255,180,0,181,0,186,127,187,255,188,0,189,0,194,127,195,255,196,0,197,0,202,127,203,255,204,0,205,0]},
|
||||
{id: "c1Green", rgb: [0.0, 1.0, 0.0], note: 57, name: "Green", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,255,92,0,93,0,98,0,99,255,100,0,101,0,106,0,107,255,108,0,109,0,114,0,115,255,116,0,117,0,122,0,123,255,124,0,125,0,130,0,131,255,132,0,133,0,138,0,139,255,140,0,141,0,146,0,147,255,148,0,149,0,154,0,155,255,156,0,157,0,162,0,163,255,164,0,165,0,170,0,171,255,172,0,173,0,178,0,179,255,180,0,181,0,186,0,187,255,188,0,189,0,194,0,195,255,196,0,197,0,202,0,203,255,204,0,205,0]},
|
||||
{id: "c1Spring", rgb: [0.0, 1.0, 0.498], note: 58, name: "Spring", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,255,92,127,93,0,98,0,99,255,100,127,101,0,106,0,107,255,108,127,109,0,114,0,115,255,116,127,117,0,122,0,123,255,124,127,125,0,130,0,131,255,132,127,133,0,138,0,139,255,140,127,141,0,146,0,147,255,148,127,149,0,154,0,155,255,156,127,157,0,162,0,163,255,164,127,165,0,170,0,171,255,172,127,173,0,178,0,179,255,180,127,181,0,186,0,187,255,188,127,189,0,194,0,195,255,196,127,197,0,202,0,203,255,204,127,205,0]},
|
||||
{id: "c1Cyan", rgb: [0.0, 1.0, 1.0], note: 59, name: "Cyan", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,255,92,255,93,0,98,0,99,255,100,255,101,0,106,0,107,255,108,255,109,0,114,0,115,255,116,255,117,0,122,0,123,255,124,255,125,0,130,0,131,255,132,255,133,0,138,0,139,255,140,255,141,0,146,0,147,255,148,255,149,0,154,0,155,255,156,255,157,0,162,0,163,255,164,255,165,0,170,0,171,255,172,255,173,0,178,0,179,255,180,255,181,0,186,0,187,255,188,255,189,0,194,0,195,255,196,255,197,0,202,0,203,255,204,255,205,0]},
|
||||
{id: "c1Azure", rgb: [0.0, 0.498, 1.0], note: 60, name: "Azure", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,127,92,255,93,0,98,0,99,127,100,255,101,0,106,0,107,127,108,255,109,0,114,0,115,127,116,255,117,0,122,0,123,127,124,255,125,0,130,0,131,127,132,255,133,0,138,0,139,127,140,255,141,0,146,0,147,127,148,255,149,0,154,0,155,127,156,255,157,0,162,0,163,127,164,255,165,0,170,0,171,127,172,255,173,0,178,0,179,127,180,255,181,0,186,0,187,127,188,255,189,0,194,0,195,127,196,255,197,0,202,0,203,127,204,255,205,0]},
|
||||
{id: "c1Blue", rgb: [0.0, 0.0, 1.0], note: 61, name: "Blue", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,0,92,255,93,0,98,0,99,0,100,255,101,0,106,0,107,0,108,255,109,0,114,0,115,0,116,255,117,0,122,0,123,0,124,255,125,0,130,0,131,0,132,255,133,0,138,0,139,0,140,255,141,0,146,0,147,0,148,255,149,0,154,0,155,0,156,255,157,0,162,0,163,0,164,255,165,0,170,0,171,0,172,255,173,0,178,0,179,0,180,255,181,0,186,0,187,0,188,255,189,0,194,0,195,0,196,255,197,0,202,0,203,0,204,255,205,0]},
|
||||
{id: "c1Violet", rgb: [0.498, 0.0, 1.0], note: 62, name: "Violet", fadeIn: 1000, fadeOut: 1000, levels: [90,127,91,0,92,255,93,0,98,127,99,0,100,255,101,0,106,127,107,0,108,255,109,0,114,127,115,0,116,255,117,0,122,127,123,0,124,255,125,0,130,127,131,0,132,255,133,0,138,127,139,0,140,255,141,0,146,127,147,0,148,255,149,0,154,127,155,0,156,255,157,0,162,127,163,0,164,255,165,0,170,127,171,0,172,255,173,0,178,127,179,0,180,255,181,0,186,127,187,0,188,255,189,0,194,127,195,0,196,255,197,0,202,127,203,0,204,255,205,0]},
|
||||
{id: "c1Magenta", rgb: [1.0, 0.0, 1.0], note: 63, name: "Magenta", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,0,92,255,93,0,98,255,99,0,100,255,101,0,106,255,107,0,108,255,109,0,114,255,115,0,116,255,117,0,122,255,123,0,124,255,125,0,130,255,131,0,132,255,133,0,138,255,139,0,140,255,141,0,146,255,147,0,148,255,149,0,154,255,155,0,156,255,157,0,162,255,163,0,164,255,165,0,170,255,171,0,172,255,173,0,178,255,179,0,180,255,181,0,186,255,187,0,188,255,189,0,194,255,195,0,196,255,197,0,202,255,203,0,204,255,205,0]},
|
||||
{id: "c1Pink", rgb: [1.0, 0.157, 0.471], note: 64, name: "Pink", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,40,92,120,93,0,98,255,99,40,100,120,101,0,106,255,107,40,108,120,109,0,114,255,115,40,116,120,117,0,122,255,123,40,124,120,125,0,130,255,131,40,132,120,133,0,138,255,139,40,140,120,141,0,146,255,147,40,148,120,149,0,154,255,155,40,156,120,157,0,162,255,163,40,164,120,165,0,170,255,171,40,172,120,173,0,178,255,179,40,180,120,181,0,186,255,187,40,188,120,189,0,194,255,195,40,196,120,197,0,202,255,203,40,204,120,205,0]},
|
||||
{id: "c1Warm", rgb: [1.0, 0.941, 0.627], note: 65, name: "Warm", fadeIn: 1000, fadeOut: 1000, levels: [90,255,91,120,92,40,93,120,98,255,99,120,100,40,101,120,106,255,107,120,108,40,109,120,114,255,115,120,116,40,117,120,122,255,123,120,124,40,125,120,130,255,131,120,132,40,133,120,138,255,139,120,140,40,141,120,146,255,147,120,148,40,149,120,154,255,155,120,156,40,157,120,162,255,163,120,164,40,165,120,170,255,171,120,172,40,173,120,178,255,179,120,180,40,181,120,186,255,187,120,188,40,189,120,194,255,195,120,196,40,197,120,202,255,203,120,204,40,205,120]},
|
||||
{id: "c1White", rgb: [1.0, 1.0, 1.0], note: 66, name: "White", fadeIn: 1000, fadeOut: 1000, levels: [90,0,91,0,92,0,93,255,98,0,99,0,100,0,101,255,106,0,107,0,108,0,109,255,114,0,115,0,116,0,117,255,122,0,123,0,124,0,125,255,130,0,131,0,132,0,133,255,138,0,139,0,140,0,141,255,146,0,147,0,148,0,149,255,154,0,155,0,156,0,157,255,162,0,163,0,164,0,165,255,170,0,171,0,172,0,173,255,178,0,179,0,180,0,181,255,186,0,187,0,188,0,189,255,194,0,195,0,196,0,197,255,202,0,203,0,204,0,205,255]},
|
||||
{id: "c1Cool", rgb: [0.784, 0.941, 1.0], note: 67, name: "Cool", fadeIn: 1000, fadeOut: 1000, levels: [90,80,91,120,92,255,93,120,98,80,99,120,100,255,101,120,106,80,107,120,108,255,109,120,114,80,115,120,116,255,117,120,122,80,123,120,124,255,125,120,130,80,131,120,132,255,133,120,138,80,139,120,140,255,141,120,146,80,147,120,148,255,149,120,154,80,155,120,156,255,157,120,162,80,163,120,164,255,165,120,170,80,171,120,172,255,173,120,178,80,179,120,180,255,181,120,186,80,187,120,188,255,189,120,194,80,195,120,196,255,197,120,202,80,203,120,204,255,205,120]},
|
||||
],
|
||||
sliders: [
|
||||
{id: "s1Dim", cc: 30, name: "Dim", levels: [88,255,96,255,104,255,112,255,120,255,128,255,136,255,144,255,152,255,160,255,168,255,176,255,184,255,192,255,200,255]},
|
||||
{id: "s1R", cc: 31, name: "R", levels: [90,255,98,255,106,255,114,255,122,255,130,255,138,255,146,255,154,255,162,255,170,255,178,255,186,255,194,255,202,255]},
|
||||
{id: "s1G", cc: 32, name: "G", levels: [91,255,99,255,107,255,115,255,123,255,131,255,139,255,147,255,155,255,163,255,171,255,179,255,187,255,195,255,203,255]},
|
||||
{id: "s1B", cc: 33, name: "B", levels: [92,255,100,255,108,255,116,255,124,255,132,255,140,255,148,255,156,255,164,255,172,255,180,255,188,255,196,255,204,255]},
|
||||
{id: "s1W", cc: 34, name: "W", levels: [93,255,101,255,109,255,117,255,125,255,133,255,141,255,149,255,157,255,165,255,173,255,181,255,189,255,197,255,205,255]},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Colour 2",
|
||||
now: "now2",
|
||||
pads: [
|
||||
{id: "c2Red", rgb: [1.0, 0.0, 0.0], note: 68, name: "Red", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,0,13,0,14,0,15,255,16,0,17,0,18,0,19,255,20,0,21,0,22,0,23,255,24,0,25,0,26,0,27,255,28,0,29,0,30,0,31,255,32,0,33,0,34,0,35,255,36,0,37,0,38,0,53,255,54,0,55,255,56,0,57,0,58,0,59,255,60,0,61,0,62,0,63,255,64,0,65,0,66,0,67,255,68,0,69,0,70,0,71,255,72,0,73,0,74,0,75,255,76,0,77,0,78,0,79,255,80,0,81,0,82,0,266,255,267,0,268,255,269,0,270,0,271,0,272,255,273,0,274,0,275,0,276,255,277,0,278,0,279,0,280,255,281,0,282,0,283,0,284,255,285,0,286,0,287,0,288,255,289,0,290,0,291,0,292,255,293,0,294,0,295,0,309,255,310,0,311,255,312,0,313,0,314,0,315,255,316,0,317,0,318,0,319,255,320,0,321,0,322,0,323,255,324,0,325,0,326,0,327,255,328,0,329,0,330,0,331,255,332,0,333,0,334,0,335,255,336,0,337,0,338,0]},
|
||||
{id: "c2Orange", rgb: [1.0, 0.498, 0.0], note: 69, name: "Orange", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,127,13,0,14,0,15,255,16,127,17,0,18,0,19,255,20,127,21,0,22,0,23,255,24,127,25,0,26,0,27,255,28,127,29,0,30,0,31,255,32,127,33,0,34,0,35,255,36,127,37,0,38,0,53,255,54,0,55,255,56,127,57,0,58,0,59,255,60,127,61,0,62,0,63,255,64,127,65,0,66,0,67,255,68,127,69,0,70,0,71,255,72,127,73,0,74,0,75,255,76,127,77,0,78,0,79,255,80,127,81,0,82,0,266,255,267,0,268,255,269,127,270,0,271,0,272,255,273,127,274,0,275,0,276,255,277,127,278,0,279,0,280,255,281,127,282,0,283,0,284,255,285,127,286,0,287,0,288,255,289,127,290,0,291,0,292,255,293,127,294,0,295,0,309,255,310,0,311,255,312,127,313,0,314,0,315,255,316,127,317,0,318,0,319,255,320,127,321,0,322,0,323,255,324,127,325,0,326,0,327,255,328,127,329,0,330,0,331,255,332,127,333,0,334,0,335,255,336,127,337,0,338,0]},
|
||||
{id: "c2Yellow", rgb: [1.0, 1.0, 0.0], note: 70, name: "Yellow", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,255,13,0,14,0,15,255,16,255,17,0,18,0,19,255,20,255,21,0,22,0,23,255,24,255,25,0,26,0,27,255,28,255,29,0,30,0,31,255,32,255,33,0,34,0,35,255,36,255,37,0,38,0,53,255,54,0,55,255,56,255,57,0,58,0,59,255,60,255,61,0,62,0,63,255,64,255,65,0,66,0,67,255,68,255,69,0,70,0,71,255,72,255,73,0,74,0,75,255,76,255,77,0,78,0,79,255,80,255,81,0,82,0,266,255,267,0,268,255,269,255,270,0,271,0,272,255,273,255,274,0,275,0,276,255,277,255,278,0,279,0,280,255,281,255,282,0,283,0,284,255,285,255,286,0,287,0,288,255,289,255,290,0,291,0,292,255,293,255,294,0,295,0,309,255,310,0,311,255,312,255,313,0,314,0,315,255,316,255,317,0,318,0,319,255,320,255,321,0,322,0,323,255,324,255,325,0,326,0,327,255,328,255,329,0,330,0,331,255,332,255,333,0,334,0,335,255,336,255,337,0,338,0]},
|
||||
{id: "c2Lime", rgb: [0.498, 1.0, 0.0], note: 71, name: "Lime", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,127,12,255,13,0,14,0,15,127,16,255,17,0,18,0,19,127,20,255,21,0,22,0,23,127,24,255,25,0,26,0,27,127,28,255,29,0,30,0,31,127,32,255,33,0,34,0,35,127,36,255,37,0,38,0,53,255,54,0,55,127,56,255,57,0,58,0,59,127,60,255,61,0,62,0,63,127,64,255,65,0,66,0,67,127,68,255,69,0,70,0,71,127,72,255,73,0,74,0,75,127,76,255,77,0,78,0,79,127,80,255,81,0,82,0,266,255,267,0,268,127,269,255,270,0,271,0,272,127,273,255,274,0,275,0,276,127,277,255,278,0,279,0,280,127,281,255,282,0,283,0,284,127,285,255,286,0,287,0,288,127,289,255,290,0,291,0,292,127,293,255,294,0,295,0,309,255,310,0,311,127,312,255,313,0,314,0,315,127,316,255,317,0,318,0,319,127,320,255,321,0,322,0,323,127,324,255,325,0,326,0,327,127,328,255,329,0,330,0,331,127,332,255,333,0,334,0,335,127,336,255,337,0,338,0]},
|
||||
{id: "c2Green", rgb: [0.0, 1.0, 0.0], note: 72, name: "Green", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,255,13,0,14,0,15,0,16,255,17,0,18,0,19,0,20,255,21,0,22,0,23,0,24,255,25,0,26,0,27,0,28,255,29,0,30,0,31,0,32,255,33,0,34,0,35,0,36,255,37,0,38,0,53,255,54,0,55,0,56,255,57,0,58,0,59,0,60,255,61,0,62,0,63,0,64,255,65,0,66,0,67,0,68,255,69,0,70,0,71,0,72,255,73,0,74,0,75,0,76,255,77,0,78,0,79,0,80,255,81,0,82,0,266,255,267,0,268,0,269,255,270,0,271,0,272,0,273,255,274,0,275,0,276,0,277,255,278,0,279,0,280,0,281,255,282,0,283,0,284,0,285,255,286,0,287,0,288,0,289,255,290,0,291,0,292,0,293,255,294,0,295,0,309,255,310,0,311,0,312,255,313,0,314,0,315,0,316,255,317,0,318,0,319,0,320,255,321,0,322,0,323,0,324,255,325,0,326,0,327,0,328,255,329,0,330,0,331,0,332,255,333,0,334,0,335,0,336,255,337,0,338,0]},
|
||||
{id: "c2Spring", rgb: [0.0, 1.0, 0.498], note: 73, name: "Spring", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,255,13,127,14,0,15,0,16,255,17,127,18,0,19,0,20,255,21,127,22,0,23,0,24,255,25,127,26,0,27,0,28,255,29,127,30,0,31,0,32,255,33,127,34,0,35,0,36,255,37,127,38,0,53,255,54,0,55,0,56,255,57,127,58,0,59,0,60,255,61,127,62,0,63,0,64,255,65,127,66,0,67,0,68,255,69,127,70,0,71,0,72,255,73,127,74,0,75,0,76,255,77,127,78,0,79,0,80,255,81,127,82,0,266,255,267,0,268,0,269,255,270,127,271,0,272,0,273,255,274,127,275,0,276,0,277,255,278,127,279,0,280,0,281,255,282,127,283,0,284,0,285,255,286,127,287,0,288,0,289,255,290,127,291,0,292,0,293,255,294,127,295,0,309,255,310,0,311,0,312,255,313,127,314,0,315,0,316,255,317,127,318,0,319,0,320,255,321,127,322,0,323,0,324,255,325,127,326,0,327,0,328,255,329,127,330,0,331,0,332,255,333,127,334,0,335,0,336,255,337,127,338,0]},
|
||||
{id: "c2Cyan", rgb: [0.0, 1.0, 1.0], note: 74, name: "Cyan", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,255,13,255,14,0,15,0,16,255,17,255,18,0,19,0,20,255,21,255,22,0,23,0,24,255,25,255,26,0,27,0,28,255,29,255,30,0,31,0,32,255,33,255,34,0,35,0,36,255,37,255,38,0,53,255,54,0,55,0,56,255,57,255,58,0,59,0,60,255,61,255,62,0,63,0,64,255,65,255,66,0,67,0,68,255,69,255,70,0,71,0,72,255,73,255,74,0,75,0,76,255,77,255,78,0,79,0,80,255,81,255,82,0,266,255,267,0,268,0,269,255,270,255,271,0,272,0,273,255,274,255,275,0,276,0,277,255,278,255,279,0,280,0,281,255,282,255,283,0,284,0,285,255,286,255,287,0,288,0,289,255,290,255,291,0,292,0,293,255,294,255,295,0,309,255,310,0,311,0,312,255,313,255,314,0,315,0,316,255,317,255,318,0,319,0,320,255,321,255,322,0,323,0,324,255,325,255,326,0,327,0,328,255,329,255,330,0,331,0,332,255,333,255,334,0,335,0,336,255,337,255,338,0]},
|
||||
{id: "c2Azure", rgb: [0.0, 0.498, 1.0], note: 75, name: "Azure", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,127,13,255,14,0,15,0,16,127,17,255,18,0,19,0,20,127,21,255,22,0,23,0,24,127,25,255,26,0,27,0,28,127,29,255,30,0,31,0,32,127,33,255,34,0,35,0,36,127,37,255,38,0,53,255,54,0,55,0,56,127,57,255,58,0,59,0,60,127,61,255,62,0,63,0,64,127,65,255,66,0,67,0,68,127,69,255,70,0,71,0,72,127,73,255,74,0,75,0,76,127,77,255,78,0,79,0,80,127,81,255,82,0,266,255,267,0,268,0,269,127,270,255,271,0,272,0,273,127,274,255,275,0,276,0,277,127,278,255,279,0,280,0,281,127,282,255,283,0,284,0,285,127,286,255,287,0,288,0,289,127,290,255,291,0,292,0,293,127,294,255,295,0,309,255,310,0,311,0,312,127,313,255,314,0,315,0,316,127,317,255,318,0,319,0,320,127,321,255,322,0,323,0,324,127,325,255,326,0,327,0,328,127,329,255,330,0,331,0,332,127,333,255,334,0,335,0,336,127,337,255,338,0]},
|
||||
{id: "c2Blue", rgb: [0.0, 0.0, 1.0], note: 76, name: "Blue", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,0,13,255,14,0,15,0,16,0,17,255,18,0,19,0,20,0,21,255,22,0,23,0,24,0,25,255,26,0,27,0,28,0,29,255,30,0,31,0,32,0,33,255,34,0,35,0,36,0,37,255,38,0,53,255,54,0,55,0,56,0,57,255,58,0,59,0,60,0,61,255,62,0,63,0,64,0,65,255,66,0,67,0,68,0,69,255,70,0,71,0,72,0,73,255,74,0,75,0,76,0,77,255,78,0,79,0,80,0,81,255,82,0,266,255,267,0,268,0,269,0,270,255,271,0,272,0,273,0,274,255,275,0,276,0,277,0,278,255,279,0,280,0,281,0,282,255,283,0,284,0,285,0,286,255,287,0,288,0,289,0,290,255,291,0,292,0,293,0,294,255,295,0,309,255,310,0,311,0,312,0,313,255,314,0,315,0,316,0,317,255,318,0,319,0,320,0,321,255,322,0,323,0,324,0,325,255,326,0,327,0,328,0,329,255,330,0,331,0,332,0,333,255,334,0,335,0,336,0,337,255,338,0]},
|
||||
{id: "c2Violet", rgb: [0.498, 0.0, 1.0], note: 77, name: "Violet", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,127,12,0,13,255,14,0,15,127,16,0,17,255,18,0,19,127,20,0,21,255,22,0,23,127,24,0,25,255,26,0,27,127,28,0,29,255,30,0,31,127,32,0,33,255,34,0,35,127,36,0,37,255,38,0,53,255,54,0,55,127,56,0,57,255,58,0,59,127,60,0,61,255,62,0,63,127,64,0,65,255,66,0,67,127,68,0,69,255,70,0,71,127,72,0,73,255,74,0,75,127,76,0,77,255,78,0,79,127,80,0,81,255,82,0,266,255,267,0,268,127,269,0,270,255,271,0,272,127,273,0,274,255,275,0,276,127,277,0,278,255,279,0,280,127,281,0,282,255,283,0,284,127,285,0,286,255,287,0,288,127,289,0,290,255,291,0,292,127,293,0,294,255,295,0,309,255,310,0,311,127,312,0,313,255,314,0,315,127,316,0,317,255,318,0,319,127,320,0,321,255,322,0,323,127,324,0,325,255,326,0,327,127,328,0,329,255,330,0,331,127,332,0,333,255,334,0,335,127,336,0,337,255,338,0]},
|
||||
{id: "c2Magenta", rgb: [1.0, 0.0, 1.0], note: 78, name: "Magenta", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,0,13,255,14,0,15,255,16,0,17,255,18,0,19,255,20,0,21,255,22,0,23,255,24,0,25,255,26,0,27,255,28,0,29,255,30,0,31,255,32,0,33,255,34,0,35,255,36,0,37,255,38,0,53,255,54,0,55,255,56,0,57,255,58,0,59,255,60,0,61,255,62,0,63,255,64,0,65,255,66,0,67,255,68,0,69,255,70,0,71,255,72,0,73,255,74,0,75,255,76,0,77,255,78,0,79,255,80,0,81,255,82,0,266,255,267,0,268,255,269,0,270,255,271,0,272,255,273,0,274,255,275,0,276,255,277,0,278,255,279,0,280,255,281,0,282,255,283,0,284,255,285,0,286,255,287,0,288,255,289,0,290,255,291,0,292,255,293,0,294,255,295,0,309,255,310,0,311,255,312,0,313,255,314,0,315,255,316,0,317,255,318,0,319,255,320,0,321,255,322,0,323,255,324,0,325,255,326,0,327,255,328,0,329,255,330,0,331,255,332,0,333,255,334,0,335,255,336,0,337,255,338,0]},
|
||||
{id: "c2Pink", rgb: [1.0, 0.157, 0.471], note: 79, name: "Pink", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,40,13,120,14,0,15,255,16,40,17,120,18,0,19,255,20,40,21,120,22,0,23,255,24,40,25,120,26,0,27,255,28,40,29,120,30,0,31,255,32,40,33,120,34,0,35,255,36,40,37,120,38,0,53,255,54,0,55,255,56,40,57,120,58,0,59,255,60,40,61,120,62,0,63,255,64,40,65,120,66,0,67,255,68,40,69,120,70,0,71,255,72,40,73,120,74,0,75,255,76,40,77,120,78,0,79,255,80,40,81,120,82,0,266,255,267,0,268,255,269,40,270,120,271,0,272,255,273,40,274,120,275,0,276,255,277,40,278,120,279,0,280,255,281,40,282,120,283,0,284,255,285,40,286,120,287,0,288,255,289,40,290,120,291,0,292,255,293,40,294,120,295,0,309,255,310,0,311,255,312,40,313,120,314,0,315,255,316,40,317,120,318,0,319,255,320,40,321,120,322,0,323,255,324,40,325,120,326,0,327,255,328,40,329,120,330,0,331,255,332,40,333,120,334,0,335,255,336,40,337,120,338,0]},
|
||||
{id: "c2Warm", rgb: [1.0, 0.941, 0.627], note: 80, name: "Warm", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,255,12,120,13,40,14,120,15,255,16,120,17,40,18,120,19,255,20,120,21,40,22,120,23,255,24,120,25,40,26,120,27,255,28,120,29,40,30,120,31,255,32,120,33,40,34,120,35,255,36,120,37,40,38,120,53,255,54,0,55,255,56,120,57,40,58,120,59,255,60,120,61,40,62,120,63,255,64,120,65,40,66,120,67,255,68,120,69,40,70,120,71,255,72,120,73,40,74,120,75,255,76,120,77,40,78,120,79,255,80,120,81,40,82,120,266,255,267,0,268,255,269,120,270,40,271,120,272,255,273,120,274,40,275,120,276,255,277,120,278,40,279,120,280,255,281,120,282,40,283,120,284,255,285,120,286,40,287,120,288,255,289,120,290,40,291,120,292,255,293,120,294,40,295,120,309,255,310,0,311,255,312,120,313,40,314,120,315,255,316,120,317,40,318,120,319,255,320,120,321,40,322,120,323,255,324,120,325,40,326,120,327,255,328,120,329,40,330,120,331,255,332,120,333,40,334,120,335,255,336,120,337,40,338,120]},
|
||||
{id: "c2White", rgb: [1.0, 1.0, 1.0], note: 81, name: "White", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,0,12,0,13,0,14,255,15,0,16,0,17,0,18,255,19,0,20,0,21,0,22,255,23,0,24,0,25,0,26,255,27,0,28,0,29,0,30,255,31,0,32,0,33,0,34,255,35,0,36,0,37,0,38,255,53,255,54,0,55,0,56,0,57,0,58,255,59,0,60,0,61,0,62,255,63,0,64,0,65,0,66,255,67,0,68,0,69,0,70,255,71,0,72,0,73,0,74,255,75,0,76,0,77,0,78,255,79,0,80,0,81,0,82,255,266,255,267,0,268,0,269,0,270,0,271,255,272,0,273,0,274,0,275,255,276,0,277,0,278,0,279,255,280,0,281,0,282,0,283,255,284,0,285,0,286,0,287,255,288,0,289,0,290,0,291,255,292,0,293,0,294,0,295,255,309,255,310,0,311,0,312,0,313,0,314,255,315,0,316,0,317,0,318,255,319,0,320,0,321,0,322,255,323,0,324,0,325,0,326,255,327,0,328,0,329,0,330,255,331,0,332,0,333,0,334,255,335,0,336,0,337,0,338,255]},
|
||||
{id: "c2Cool", rgb: [0.784, 0.941, 1.0], note: 82, name: "Cool", fadeIn: 1000, fadeOut: 1000, levels: [9,255,10,0,11,80,12,120,13,255,14,120,15,80,16,120,17,255,18,120,19,80,20,120,21,255,22,120,23,80,24,120,25,255,26,120,27,80,28,120,29,255,30,120,31,80,32,120,33,255,34,120,35,80,36,120,37,255,38,120,53,255,54,0,55,80,56,120,57,255,58,120,59,80,60,120,61,255,62,120,63,80,64,120,65,255,66,120,67,80,68,120,69,255,70,120,71,80,72,120,73,255,74,120,75,80,76,120,77,255,78,120,79,80,80,120,81,255,82,120,266,255,267,0,268,80,269,120,270,255,271,120,272,80,273,120,274,255,275,120,276,80,277,120,278,255,279,120,280,80,281,120,282,255,283,120,284,80,285,120,286,255,287,120,288,80,289,120,290,255,291,120,292,80,293,120,294,255,295,120,309,255,310,0,311,80,312,120,313,255,314,120,315,80,316,120,317,255,318,120,319,80,320,120,321,255,322,120,323,80,324,120,325,255,326,120,327,80,328,120,329,255,330,120,331,80,332,120,333,255,334,120,335,80,336,120,337,255,338,120]},
|
||||
{id: "c2Custom", rgb: [1.0, 0.235, 0.0], note: 83, name: "Custom", fadeIn: 1000, fadeOut: 1000, levels: [9,0,53,0,266,0,309,0]},
|
||||
{id: "c2Red", rgb: [1.0, 0.0, 0.0], note: 68, name: "Red", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,0,13,0,14,0,15,255,16,0,17,0,18,0,19,255,20,0,21,0,22,0,23,255,24,0,25,0,26,0,27,255,28,0,29,0,30,0,31,255,32,0,33,0,34,0,35,255,36,0,37,0,38,0,54,0,55,255,56,0,57,0,58,0,59,255,60,0,61,0,62,0,63,255,64,0,65,0,66,0,67,255,68,0,69,0,70,0,71,255,72,0,73,0,74,0,75,255,76,0,77,0,78,0,79,255,80,0,81,0,82,0,267,0,268,255,269,0,270,0,271,0,272,255,273,0,274,0,275,0,276,255,277,0,278,0,279,0,280,255,281,0,282,0,283,0,284,255,285,0,286,0,287,0,288,255,289,0,290,0,291,0,292,255,293,0,294,0,295,0,310,0,311,255,312,0,313,0,314,0,315,255,316,0,317,0,318,0,319,255,320,0,321,0,322,0,323,255,324,0,325,0,326,0,327,255,328,0,329,0,330,0,331,255,332,0,333,0,334,0,335,255,336,0,337,0,338,0]},
|
||||
{id: "c2Orange", rgb: [1.0, 0.498, 0.0], note: 69, name: "Orange", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,127,13,0,14,0,15,255,16,127,17,0,18,0,19,255,20,127,21,0,22,0,23,255,24,127,25,0,26,0,27,255,28,127,29,0,30,0,31,255,32,127,33,0,34,0,35,255,36,127,37,0,38,0,54,0,55,255,56,127,57,0,58,0,59,255,60,127,61,0,62,0,63,255,64,127,65,0,66,0,67,255,68,127,69,0,70,0,71,255,72,127,73,0,74,0,75,255,76,127,77,0,78,0,79,255,80,127,81,0,82,0,267,0,268,255,269,127,270,0,271,0,272,255,273,127,274,0,275,0,276,255,277,127,278,0,279,0,280,255,281,127,282,0,283,0,284,255,285,127,286,0,287,0,288,255,289,127,290,0,291,0,292,255,293,127,294,0,295,0,310,0,311,255,312,127,313,0,314,0,315,255,316,127,317,0,318,0,319,255,320,127,321,0,322,0,323,255,324,127,325,0,326,0,327,255,328,127,329,0,330,0,331,255,332,127,333,0,334,0,335,255,336,127,337,0,338,0]},
|
||||
{id: "c2Amber", rgb: [1.0, 0.749, 0.0], note: 70, name: "Amber", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,191,13,0,14,0,15,255,16,191,17,0,18,0,19,255,20,191,21,0,22,0,23,255,24,191,25,0,26,0,27,255,28,191,29,0,30,0,31,255,32,191,33,0,34,0,35,255,36,191,37,0,38,0,54,0,55,255,56,191,57,0,58,0,59,255,60,191,61,0,62,0,63,255,64,191,65,0,66,0,67,255,68,191,69,0,70,0,71,255,72,191,73,0,74,0,75,255,76,191,77,0,78,0,79,255,80,191,81,0,82,0,267,0,268,255,269,191,270,0,271,0,272,255,273,191,274,0,275,0,276,255,277,191,278,0,279,0,280,255,281,191,282,0,283,0,284,255,285,191,286,0,287,0,288,255,289,191,290,0,291,0,292,255,293,191,294,0,295,0,310,0,311,255,312,191,313,0,314,0,315,255,316,191,317,0,318,0,319,255,320,191,321,0,322,0,323,255,324,191,325,0,326,0,327,255,328,191,329,0,330,0,331,255,332,191,333,0,334,0,335,255,336,191,337,0,338,0]},
|
||||
{id: "c2Yellow", rgb: [1.0, 1.0, 0.0], note: 71, name: "Yellow", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,255,13,0,14,0,15,255,16,255,17,0,18,0,19,255,20,255,21,0,22,0,23,255,24,255,25,0,26,0,27,255,28,255,29,0,30,0,31,255,32,255,33,0,34,0,35,255,36,255,37,0,38,0,54,0,55,255,56,255,57,0,58,0,59,255,60,255,61,0,62,0,63,255,64,255,65,0,66,0,67,255,68,255,69,0,70,0,71,255,72,255,73,0,74,0,75,255,76,255,77,0,78,0,79,255,80,255,81,0,82,0,267,0,268,255,269,255,270,0,271,0,272,255,273,255,274,0,275,0,276,255,277,255,278,0,279,0,280,255,281,255,282,0,283,0,284,255,285,255,286,0,287,0,288,255,289,255,290,0,291,0,292,255,293,255,294,0,295,0,310,0,311,255,312,255,313,0,314,0,315,255,316,255,317,0,318,0,319,255,320,255,321,0,322,0,323,255,324,255,325,0,326,0,327,255,328,255,329,0,330,0,331,255,332,255,333,0,334,0,335,255,336,255,337,0,338,0]},
|
||||
{id: "c2Lime", rgb: [0.498, 1.0, 0.0], note: 72, name: "Lime", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,127,12,255,13,0,14,0,15,127,16,255,17,0,18,0,19,127,20,255,21,0,22,0,23,127,24,255,25,0,26,0,27,127,28,255,29,0,30,0,31,127,32,255,33,0,34,0,35,127,36,255,37,0,38,0,54,0,55,127,56,255,57,0,58,0,59,127,60,255,61,0,62,0,63,127,64,255,65,0,66,0,67,127,68,255,69,0,70,0,71,127,72,255,73,0,74,0,75,127,76,255,77,0,78,0,79,127,80,255,81,0,82,0,267,0,268,127,269,255,270,0,271,0,272,127,273,255,274,0,275,0,276,127,277,255,278,0,279,0,280,127,281,255,282,0,283,0,284,127,285,255,286,0,287,0,288,127,289,255,290,0,291,0,292,127,293,255,294,0,295,0,310,0,311,127,312,255,313,0,314,0,315,127,316,255,317,0,318,0,319,127,320,255,321,0,322,0,323,127,324,255,325,0,326,0,327,127,328,255,329,0,330,0,331,127,332,255,333,0,334,0,335,127,336,255,337,0,338,0]},
|
||||
{id: "c2Green", rgb: [0.0, 1.0, 0.0], note: 73, name: "Green", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,255,13,0,14,0,15,0,16,255,17,0,18,0,19,0,20,255,21,0,22,0,23,0,24,255,25,0,26,0,27,0,28,255,29,0,30,0,31,0,32,255,33,0,34,0,35,0,36,255,37,0,38,0,54,0,55,0,56,255,57,0,58,0,59,0,60,255,61,0,62,0,63,0,64,255,65,0,66,0,67,0,68,255,69,0,70,0,71,0,72,255,73,0,74,0,75,0,76,255,77,0,78,0,79,0,80,255,81,0,82,0,267,0,268,0,269,255,270,0,271,0,272,0,273,255,274,0,275,0,276,0,277,255,278,0,279,0,280,0,281,255,282,0,283,0,284,0,285,255,286,0,287,0,288,0,289,255,290,0,291,0,292,0,293,255,294,0,295,0,310,0,311,0,312,255,313,0,314,0,315,0,316,255,317,0,318,0,319,0,320,255,321,0,322,0,323,0,324,255,325,0,326,0,327,0,328,255,329,0,330,0,331,0,332,255,333,0,334,0,335,0,336,255,337,0,338,0]},
|
||||
{id: "c2Spring", rgb: [0.0, 1.0, 0.498], note: 74, name: "Spring", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,255,13,127,14,0,15,0,16,255,17,127,18,0,19,0,20,255,21,127,22,0,23,0,24,255,25,127,26,0,27,0,28,255,29,127,30,0,31,0,32,255,33,127,34,0,35,0,36,255,37,127,38,0,54,0,55,0,56,255,57,127,58,0,59,0,60,255,61,127,62,0,63,0,64,255,65,127,66,0,67,0,68,255,69,127,70,0,71,0,72,255,73,127,74,0,75,0,76,255,77,127,78,0,79,0,80,255,81,127,82,0,267,0,268,0,269,255,270,127,271,0,272,0,273,255,274,127,275,0,276,0,277,255,278,127,279,0,280,0,281,255,282,127,283,0,284,0,285,255,286,127,287,0,288,0,289,255,290,127,291,0,292,0,293,255,294,127,295,0,310,0,311,0,312,255,313,127,314,0,315,0,316,255,317,127,318,0,319,0,320,255,321,127,322,0,323,0,324,255,325,127,326,0,327,0,328,255,329,127,330,0,331,0,332,255,333,127,334,0,335,0,336,255,337,127,338,0]},
|
||||
{id: "c2Cyan", rgb: [0.0, 1.0, 1.0], note: 75, name: "Cyan", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,255,13,255,14,0,15,0,16,255,17,255,18,0,19,0,20,255,21,255,22,0,23,0,24,255,25,255,26,0,27,0,28,255,29,255,30,0,31,0,32,255,33,255,34,0,35,0,36,255,37,255,38,0,54,0,55,0,56,255,57,255,58,0,59,0,60,255,61,255,62,0,63,0,64,255,65,255,66,0,67,0,68,255,69,255,70,0,71,0,72,255,73,255,74,0,75,0,76,255,77,255,78,0,79,0,80,255,81,255,82,0,267,0,268,0,269,255,270,255,271,0,272,0,273,255,274,255,275,0,276,0,277,255,278,255,279,0,280,0,281,255,282,255,283,0,284,0,285,255,286,255,287,0,288,0,289,255,290,255,291,0,292,0,293,255,294,255,295,0,310,0,311,0,312,255,313,255,314,0,315,0,316,255,317,255,318,0,319,0,320,255,321,255,322,0,323,0,324,255,325,255,326,0,327,0,328,255,329,255,330,0,331,0,332,255,333,255,334,0,335,0,336,255,337,255,338,0]},
|
||||
{id: "c2Azure", rgb: [0.0, 0.498, 1.0], note: 76, name: "Azure", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,127,13,255,14,0,15,0,16,127,17,255,18,0,19,0,20,127,21,255,22,0,23,0,24,127,25,255,26,0,27,0,28,127,29,255,30,0,31,0,32,127,33,255,34,0,35,0,36,127,37,255,38,0,54,0,55,0,56,127,57,255,58,0,59,0,60,127,61,255,62,0,63,0,64,127,65,255,66,0,67,0,68,127,69,255,70,0,71,0,72,127,73,255,74,0,75,0,76,127,77,255,78,0,79,0,80,127,81,255,82,0,267,0,268,0,269,127,270,255,271,0,272,0,273,127,274,255,275,0,276,0,277,127,278,255,279,0,280,0,281,127,282,255,283,0,284,0,285,127,286,255,287,0,288,0,289,127,290,255,291,0,292,0,293,127,294,255,295,0,310,0,311,0,312,127,313,255,314,0,315,0,316,127,317,255,318,0,319,0,320,127,321,255,322,0,323,0,324,127,325,255,326,0,327,0,328,127,329,255,330,0,331,0,332,127,333,255,334,0,335,0,336,127,337,255,338,0]},
|
||||
{id: "c2Blue", rgb: [0.0, 0.0, 1.0], note: 77, name: "Blue", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,0,13,255,14,0,15,0,16,0,17,255,18,0,19,0,20,0,21,255,22,0,23,0,24,0,25,255,26,0,27,0,28,0,29,255,30,0,31,0,32,0,33,255,34,0,35,0,36,0,37,255,38,0,54,0,55,0,56,0,57,255,58,0,59,0,60,0,61,255,62,0,63,0,64,0,65,255,66,0,67,0,68,0,69,255,70,0,71,0,72,0,73,255,74,0,75,0,76,0,77,255,78,0,79,0,80,0,81,255,82,0,267,0,268,0,269,0,270,255,271,0,272,0,273,0,274,255,275,0,276,0,277,0,278,255,279,0,280,0,281,0,282,255,283,0,284,0,285,0,286,255,287,0,288,0,289,0,290,255,291,0,292,0,293,0,294,255,295,0,310,0,311,0,312,0,313,255,314,0,315,0,316,0,317,255,318,0,319,0,320,0,321,255,322,0,323,0,324,0,325,255,326,0,327,0,328,0,329,255,330,0,331,0,332,0,333,255,334,0,335,0,336,0,337,255,338,0]},
|
||||
{id: "c2Violet", rgb: [0.498, 0.0, 1.0], note: 78, name: "Violet", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,127,12,0,13,255,14,0,15,127,16,0,17,255,18,0,19,127,20,0,21,255,22,0,23,127,24,0,25,255,26,0,27,127,28,0,29,255,30,0,31,127,32,0,33,255,34,0,35,127,36,0,37,255,38,0,54,0,55,127,56,0,57,255,58,0,59,127,60,0,61,255,62,0,63,127,64,0,65,255,66,0,67,127,68,0,69,255,70,0,71,127,72,0,73,255,74,0,75,127,76,0,77,255,78,0,79,127,80,0,81,255,82,0,267,0,268,127,269,0,270,255,271,0,272,127,273,0,274,255,275,0,276,127,277,0,278,255,279,0,280,127,281,0,282,255,283,0,284,127,285,0,286,255,287,0,288,127,289,0,290,255,291,0,292,127,293,0,294,255,295,0,310,0,311,127,312,0,313,255,314,0,315,127,316,0,317,255,318,0,319,127,320,0,321,255,322,0,323,127,324,0,325,255,326,0,327,127,328,0,329,255,330,0,331,127,332,0,333,255,334,0,335,127,336,0,337,255,338,0]},
|
||||
{id: "c2Magenta", rgb: [1.0, 0.0, 1.0], note: 79, name: "Magenta", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,0,13,255,14,0,15,255,16,0,17,255,18,0,19,255,20,0,21,255,22,0,23,255,24,0,25,255,26,0,27,255,28,0,29,255,30,0,31,255,32,0,33,255,34,0,35,255,36,0,37,255,38,0,54,0,55,255,56,0,57,255,58,0,59,255,60,0,61,255,62,0,63,255,64,0,65,255,66,0,67,255,68,0,69,255,70,0,71,255,72,0,73,255,74,0,75,255,76,0,77,255,78,0,79,255,80,0,81,255,82,0,267,0,268,255,269,0,270,255,271,0,272,255,273,0,274,255,275,0,276,255,277,0,278,255,279,0,280,255,281,0,282,255,283,0,284,255,285,0,286,255,287,0,288,255,289,0,290,255,291,0,292,255,293,0,294,255,295,0,310,0,311,255,312,0,313,255,314,0,315,255,316,0,317,255,318,0,319,255,320,0,321,255,322,0,323,255,324,0,325,255,326,0,327,255,328,0,329,255,330,0,331,255,332,0,333,255,334,0,335,255,336,0,337,255,338,0]},
|
||||
{id: "c2Pink", rgb: [1.0, 0.157, 0.471], note: 80, name: "Pink", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,40,13,120,14,0,15,255,16,40,17,120,18,0,19,255,20,40,21,120,22,0,23,255,24,40,25,120,26,0,27,255,28,40,29,120,30,0,31,255,32,40,33,120,34,0,35,255,36,40,37,120,38,0,54,0,55,255,56,40,57,120,58,0,59,255,60,40,61,120,62,0,63,255,64,40,65,120,66,0,67,255,68,40,69,120,70,0,71,255,72,40,73,120,74,0,75,255,76,40,77,120,78,0,79,255,80,40,81,120,82,0,267,0,268,255,269,40,270,120,271,0,272,255,273,40,274,120,275,0,276,255,277,40,278,120,279,0,280,255,281,40,282,120,283,0,284,255,285,40,286,120,287,0,288,255,289,40,290,120,291,0,292,255,293,40,294,120,295,0,310,0,311,255,312,40,313,120,314,0,315,255,316,40,317,120,318,0,319,255,320,40,321,120,322,0,323,255,324,40,325,120,326,0,327,255,328,40,329,120,330,0,331,255,332,40,333,120,334,0,335,255,336,40,337,120,338,0]},
|
||||
{id: "c2Warm", rgb: [1.0, 0.941, 0.627], note: 81, name: "Warm", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,255,12,120,13,40,14,120,15,255,16,120,17,40,18,120,19,255,20,120,21,40,22,120,23,255,24,120,25,40,26,120,27,255,28,120,29,40,30,120,31,255,32,120,33,40,34,120,35,255,36,120,37,40,38,120,54,0,55,255,56,120,57,40,58,120,59,255,60,120,61,40,62,120,63,255,64,120,65,40,66,120,67,255,68,120,69,40,70,120,71,255,72,120,73,40,74,120,75,255,76,120,77,40,78,120,79,255,80,120,81,40,82,120,267,0,268,255,269,120,270,40,271,120,272,255,273,120,274,40,275,120,276,255,277,120,278,40,279,120,280,255,281,120,282,40,283,120,284,255,285,120,286,40,287,120,288,255,289,120,290,40,291,120,292,255,293,120,294,40,295,120,310,0,311,255,312,120,313,40,314,120,315,255,316,120,317,40,318,120,319,255,320,120,321,40,322,120,323,255,324,120,325,40,326,120,327,255,328,120,329,40,330,120,331,255,332,120,333,40,334,120,335,255,336,120,337,40,338,120]},
|
||||
{id: "c2White", rgb: [1.0, 1.0, 1.0], note: 82, name: "White", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,0,12,0,13,0,14,255,15,0,16,0,17,0,18,255,19,0,20,0,21,0,22,255,23,0,24,0,25,0,26,255,27,0,28,0,29,0,30,255,31,0,32,0,33,0,34,255,35,0,36,0,37,0,38,255,54,0,55,0,56,0,57,0,58,255,59,0,60,0,61,0,62,255,63,0,64,0,65,0,66,255,67,0,68,0,69,0,70,255,71,0,72,0,73,0,74,255,75,0,76,0,77,0,78,255,79,0,80,0,81,0,82,255,267,0,268,0,269,0,270,0,271,255,272,0,273,0,274,0,275,255,276,0,277,0,278,0,279,255,280,0,281,0,282,0,283,255,284,0,285,0,286,0,287,255,288,0,289,0,290,0,291,255,292,0,293,0,294,0,295,255,310,0,311,0,312,0,313,0,314,255,315,0,316,0,317,0,318,255,319,0,320,0,321,0,322,255,323,0,324,0,325,0,326,255,327,0,328,0,329,0,330,255,331,0,332,0,333,0,334,255,335,0,336,0,337,0,338,255]},
|
||||
{id: "c2Cool", rgb: [0.784, 0.941, 1.0], note: 83, name: "Cool", fadeIn: 1000, fadeOut: 1000, levels: [10,0,11,80,12,120,13,255,14,120,15,80,16,120,17,255,18,120,19,80,20,120,21,255,22,120,23,80,24,120,25,255,26,120,27,80,28,120,29,255,30,120,31,80,32,120,33,255,34,120,35,80,36,120,37,255,38,120,54,0,55,80,56,120,57,255,58,120,59,80,60,120,61,255,62,120,63,80,64,120,65,255,66,120,67,80,68,120,69,255,70,120,71,80,72,120,73,255,74,120,75,80,76,120,77,255,78,120,79,80,80,120,81,255,82,120,267,0,268,80,269,120,270,255,271,120,272,80,273,120,274,255,275,120,276,80,277,120,278,255,279,120,280,80,281,120,282,255,283,120,284,80,285,120,286,255,287,120,288,80,289,120,290,255,291,120,292,80,293,120,294,255,295,120,310,0,311,80,312,120,313,255,314,120,315,80,316,120,317,255,318,120,319,80,320,120,321,255,322,120,323,80,324,120,325,255,326,120,327,80,328,120,329,255,330,120,331,80,332,120,333,255,334,120,335,80,336,120,337,255,338,120]},
|
||||
],
|
||||
sliders: [
|
||||
{id: "s2Dim", cc: 35, name: "Dim", levels: [9,255,53,255,266,255,309,255]},
|
||||
{id: "s2R", cc: 36, name: "R", levels: [11,255,15,255,19,255,23,255,27,255,31,255,35,255,55,255,59,255,63,255,67,255,71,255,75,255,79,255,268,255,272,255,276,255,280,255,284,255,288,255,292,255,311,255,315,255,319,255,323,255,327,255,331,255,335,255]},
|
||||
{id: "s2G", cc: 37, name: "G", levels: [12,255,16,255,20,255,24,255,28,255,32,255,36,255,56,255,60,255,64,255,68,255,72,255,76,255,80,255,269,255,273,255,277,255,281,255,285,255,289,255,293,255,312,255,316,255,320,255,324,255,328,255,332,255,336,255]},
|
||||
{id: "s2B", cc: 38, name: "B", levels: [13,255,17,255,21,255,25,255,29,255,33,255,37,255,57,255,61,255,65,255,69,255,73,255,77,255,81,255,270,255,274,255,278,255,282,255,286,255,290,255,294,255,313,255,317,255,321,255,325,255,329,255,333,255,337,255]},
|
||||
{id: "s2W", cc: 39, name: "W", levels: [14,255,18,255,22,255,26,255,30,255,34,255,38,255,58,255,62,255,66,255,70,255,74,255,78,255,82,255,271,255,275,255,279,255,283,255,287,255,291,255,295,255,314,255,318,255,322,255,326,255,330,255,334,255,338,255]},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Dimmers",
|
||||
now: "now3",
|
||||
pads: [
|
||||
],
|
||||
sliders: [
|
||||
{id: "s3Movers", cc: 44, name: "Movers", value: 1.0, levels: [9,255,53,255,266,255,309,255]},
|
||||
{id: "s3Cans915", cc: 34, name: "Cans 9\u201315", value: 1.0, levels: [152,255,160,255,168,255,176,255,184,255,192,255,200,255]},
|
||||
{id: "s3Cans36", cc: 36, name: "Cans 3\u20136", value: 1.0, levels: [104,255,112,255,120,255,128,255]},
|
||||
{id: "s3Cans1278", cc: 37, name: "Cans 1, 2, 7, 8", value: 1.0, levels: [88,255,96,255,136,255,144,255]},
|
||||
]
|
||||
},
|
||||
];
|
||||
@@ -99,7 +101,7 @@ function init()
|
||||
for (var p = 0; p < group.pads.length; p++) mark(touched, group.pads[p].levels);
|
||||
for (var s = 0; s < group.sliders.length; s++) mark(touched, group.sliders[s].levels);
|
||||
var mix = [];
|
||||
for (var m = 0; m < group.sliders.length; m++) mix[m] = 0;
|
||||
for (var m = 0; m < group.sliders.length; m++) mix[m] = group.sliders[m].value;
|
||||
states[g] = {active: -1, elapsed: 0, duration: 0, level: level, from: from, to: to, touched: touched, mix: mix};
|
||||
|
||||
// Controls on the script's Params, for the dashboard to show.
|
||||
@@ -113,7 +115,7 @@ function init()
|
||||
}
|
||||
for (var r = 0; r < group.sliders.length; r++)
|
||||
{
|
||||
sliderParams[g][r] = script.addFloatParameter(group.sliders[r].id, group.name + " " + group.sliders[r].name, 0, 0, 1);
|
||||
sliderParams[g][r] = script.addFloatParameter(group.sliders[r].id, group.name + " " + group.sliders[r].name, group.sliders[r].value, 0, 1);
|
||||
lookup[group.sliders[r].id] = {g: g, p: -1, s: r};
|
||||
}
|
||||
nowParams[g] = script.addStringParameter(group.now, group.name + " scene", "");
|
||||
|
||||
+429
-614
File diff suppressed because it is too large.
Load diff
+113
-32
@@ -4,16 +4,37 @@ The SMC-PAD sends CC 27 as 127 when Play goes down and 0 when it comes up.
|
||||
While it is down, pad notes 52–67 go out as 68–83, so QLC+ can tell a
|
||||
second set of buttons from the first. Play itself is not passed on.
|
||||
|
||||
With lock_knobs, knobs 1–5 (CC 30–34) drive colour 1's sliders and knobs 6–10
|
||||
(CC 35–39) drive colour 2's, but only after the Custom pad (note 67, or 83
|
||||
with Play held) has been pressed. Pressing any other bank 2 pad locks them
|
||||
again, and its sliders are sent back to zero so their scenes stop.
|
||||
Locked knob turns are dropped.
|
||||
Pause (CC 28) does the same for bank 1, but toggles: each press flips it.
|
||||
Off, bank 1 pads 36–51 go out as they are, for the cans. On, they go out as
|
||||
84–99, for the movers. Pause itself is not passed on. The movers are not
|
||||
sound reactive, so Sound and Threshold (84 and 85) do nothing on their layer.
|
||||
|
||||
The Sound pad (note 36) toggles QLC+'s audio triggers, which pump the cans'
|
||||
Sound submaster in the Dimmers frame. Every press and release also sends CC 100
|
||||
at full, so switching sound off leaves the cans at full rather than wherever
|
||||
the music left them.
|
||||
|
||||
The Threshold pad (note 37) toggles a second audio trigger, which flashes the
|
||||
cans to full on bass hits. While it is on, CC 100 is held at 0 so the cans sit
|
||||
dark between hits; switching it off puts the submaster back to full.
|
||||
|
||||
The two are exclusive: turning one on taps the other's note first when it is
|
||||
on, so QLC+ switches it off.
|
||||
|
||||
Knob 6 (CC 35) is the sides' peak. It goes on to the Peak submasters, which
|
||||
set how bright the Threshold hits, the chases and the strobe flash. While Sound is on,
|
||||
it also holds both side sliders (knobs 5 and 8, CC 34 and 37) at its value, so
|
||||
the bass pumps the sides up to it; turns of knobs 5 and 8 meanwhile are kept
|
||||
and put back when Sound goes off.
|
||||
|
||||
pump and threshold follow the two pads' presses, so the pad controller can
|
||||
light whichever is on. QLC+ sends no feedback for its audio triggers, so they
|
||||
are only a guess; reopen() clears them, as QLC+ starts with both off.
|
||||
|
||||
colours holds the last colour pad pressed in each set, as sent (52–67 for the
|
||||
cans, 68–83 for the movers), or None once it is pressed again: the colour
|
||||
buttons toggle in a solo frame. QLC+ does not save which buttons are on, so
|
||||
reopen() presses them again when QLC+ loads the show.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -22,20 +43,30 @@ PLAY_CC = 27
|
||||
FIRST_NOTE = 52
|
||||
LAST_NOTE = 67
|
||||
SHIFT = 16
|
||||
CUSTOM_NOTE = 67
|
||||
KNOB_FIRST_CC = 30
|
||||
KNOBS_PER_LAYER = 5
|
||||
PAUSE_CC = 28
|
||||
BANK_1_FIRST = 36
|
||||
BANK_1_LAST = 51
|
||||
MOVERS_SHIFT = 48 # bank 1 goes out as 84–99 while Pause is on, above bank 2's held layer
|
||||
SOUND_NOTE = 36
|
||||
THRESHOLD_NOTE = 37
|
||||
SUBMASTER_CC = 100
|
||||
KNOB_CHANNEL = 0
|
||||
PEAK_CC = 35 # knob 6
|
||||
SIDE_CCS = (34, 37) # knobs 5 and 8: Cans 9–15 and Cans 1, 2, 7, 8
|
||||
|
||||
|
||||
class PlayLayer:
|
||||
def __init__(self, lock_knobs: bool = False) -> None:
|
||||
self.lock_knobs = lock_knobs
|
||||
self.unlocked: set[int] = set() # layers 0 and 1
|
||||
def __init__(self) -> None:
|
||||
self.held = False
|
||||
self.movers = False # Pause toggles bank 1 between the cans and the movers
|
||||
# (channel, note as pressed) -> note sent, so a release matches its press
|
||||
self.sent: dict[tuple[int, int], int] = {}
|
||||
self.pump = False
|
||||
self.threshold = False
|
||||
# Last value of each knob below, from the pad; QLC+ starts them at full.
|
||||
self.knobs = {cc: 127 for cc in (PEAK_CC, *SIDE_CCS)}
|
||||
# set -> (channel, note sent) of the colour that is on
|
||||
self.colours: dict[int, tuple[int, int] | None] = {1: None, 2: None}
|
||||
|
||||
def handle(self, data: list[int]) -> list[list[int]]:
|
||||
"""The messages to send on. Empty when the message is swallowed."""
|
||||
@@ -45,30 +76,80 @@ class PlayLayer:
|
||||
if kind == 0xB0 and len(data) >= 3 and data[1] == PLAY_CC:
|
||||
self.held = data[2] > 0
|
||||
return []
|
||||
if kind == 0xB0 and len(data) >= 3 and self.lock_knobs:
|
||||
index = data[1] - KNOB_FIRST_CC
|
||||
if 0 <= index < 2 * KNOBS_PER_LAYER and index // KNOBS_PER_LAYER not in self.unlocked:
|
||||
return []
|
||||
if kind == 0xB0 and len(data) >= 3 and data[1] == PAUSE_CC:
|
||||
if data[2] > 0:
|
||||
self.movers = not self.movers
|
||||
return []
|
||||
if kind == 0xB0 and len(data) >= 3 and channel == KNOB_CHANNEL and data[1] in self.knobs:
|
||||
self.knobs[data[1]] = data[2]
|
||||
if data[1] == PEAK_CC:
|
||||
return [list(data), *self.sides()]
|
||||
return [] if self.pump else [list(data)]
|
||||
if kind not in (0x80, 0x90) or len(data) < 3:
|
||||
return [list(data)]
|
||||
note = data[1]
|
||||
key = (channel, note)
|
||||
key = (channel, data[1])
|
||||
is_on = kind == 0x90 and data[2] > 0
|
||||
extra: list[list[int]] = []
|
||||
if is_on and FIRST_NOTE <= note <= LAST_NOTE:
|
||||
layer = 1 if self.held else 0
|
||||
if note == CUSTOM_NOTE:
|
||||
self.unlocked.add(layer)
|
||||
elif layer in self.unlocked:
|
||||
self.unlocked.discard(layer)
|
||||
first = KNOB_FIRST_CC + layer * KNOBS_PER_LAYER
|
||||
extra = [[0xB0, first + n, 0] for n in range(KNOBS_PER_LAYER)]
|
||||
if note == SOUND_NOTE:
|
||||
# Again on release, after any spectrum frame QLC+ still had queued
|
||||
extra = [[0xB0, SUBMASTER_CC, 127]]
|
||||
if is_on:
|
||||
out = note + SHIFT if self.held and FIRST_NOTE <= note <= LAST_NOTE else note
|
||||
out = self.shifted(data[1])
|
||||
self.sent[key] = out
|
||||
else:
|
||||
out = self.sent.pop(key, note)
|
||||
return [[status, out, *data[2:]], *extra]
|
||||
out = self.sent.pop(key, data[1])
|
||||
note = out
|
||||
before: list[list[int]] = []
|
||||
extra: list[list[int]] = []
|
||||
if note == SOUND_NOTE:
|
||||
if is_on:
|
||||
if self.threshold:
|
||||
before = tap(channel, THRESHOLD_NOTE)
|
||||
self.threshold = False
|
||||
self.pump = not self.pump
|
||||
extra = self.sides(restore=not self.pump)
|
||||
# Again on release, after any spectrum frame QLC+ still had queued
|
||||
extra = [*extra, [0xB0, SUBMASTER_CC, 127]]
|
||||
elif note == THRESHOLD_NOTE:
|
||||
if is_on:
|
||||
if self.pump:
|
||||
before = tap(channel, SOUND_NOTE)
|
||||
self.pump = False
|
||||
extra = self.sides(restore=True)
|
||||
self.threshold = not self.threshold
|
||||
extra = [*extra, [0xB0, SUBMASTER_CC, 0 if self.threshold else 127]]
|
||||
if is_on and FIRST_NOTE <= out <= LAST_NOTE + SHIFT:
|
||||
colour_set = 1 if out <= LAST_NOTE else 2
|
||||
pressed = (channel, out)
|
||||
self.colours[colour_set] = None if self.colours[colour_set] == pressed else pressed
|
||||
return [*before, [status, out, *data[2:]], *extra]
|
||||
|
||||
def shifted(self, note: int) -> int:
|
||||
"""The note a press goes out as: bank 2 up while Play is held, bank 1 up while Pause is on."""
|
||||
if self.held and FIRST_NOTE <= note <= LAST_NOTE:
|
||||
return note + SHIFT
|
||||
if self.movers and BANK_1_FIRST <= note <= BANK_1_LAST:
|
||||
return note + MOVERS_SHIFT
|
||||
return note
|
||||
|
||||
def reopen(self) -> list[list[int]]:
|
||||
"""QLC+ has loaded the show: everything is off. Press the colours that were on.
|
||||
|
||||
The Sound submaster goes back to full too, as sound is off.
|
||||
"""
|
||||
self.pump = False
|
||||
self.threshold = False
|
||||
out = []
|
||||
for colour in self.colours.values():
|
||||
if colour is not None:
|
||||
out += tap(*colour)
|
||||
return out + [[0xB0, SUBMASTER_CC, 127]]
|
||||
|
||||
def sides(self, restore: bool = False) -> list[list[int]]:
|
||||
"""The side sliders at the peak while Sound is on, or back at their own knobs."""
|
||||
if restore:
|
||||
return [[0xB0 | KNOB_CHANNEL, cc, self.knobs[cc]] for cc in SIDE_CCS]
|
||||
if not self.pump:
|
||||
return []
|
||||
return [[0xB0 | KNOB_CHANNEL, cc, self.knobs[PEAK_CC]] for cc in SIDE_CCS]
|
||||
|
||||
|
||||
def tap(channel: int, note: int) -> list[list[int]]:
|
||||
"""A press and release of note, to toggle a QLC+ button off."""
|
||||
return [[0x90 | channel, note, 127], [0x80 | channel, note, 0]]
|
||||
+88
-11
@@ -6,6 +6,7 @@ immediately, and eases Control Change values toward their targets at
|
||||
|
||||
On start it also sets the pad lamps over USB (scripts/pad/pad_lamps.py): bank 1 off and
|
||||
bank 2 in the colours from shows/test.qxw. On Bluetooth it says so and carries on.
|
||||
While it runs, the Pump and Threshold pads (notes 36 and 37) light while their mode is on.
|
||||
While Play is held, bank 2 notes 52–67 go out as 68–83 (see padcontroller/layer.py).
|
||||
|
||||
Point QLC+ MIDI input at that virtual port (midi.qxw does this via
|
||||
@@ -13,6 +14,11 @@ patch_smc_pad.py once the pad controller is running). Every 2 s it checks the
|
||||
links: it reopens the pad when it is replugged (or moves to USB when that turns
|
||||
up) and re-links QLC+ to the virtual port after a restart, so QLC+ can stay open.
|
||||
|
||||
QLC+ reopens its MIDI port when it loads a show, so a new link to QLC+ while
|
||||
the pad controller runs means the show has just loaded with every button off.
|
||||
REOPEN_DELAY later it presses the last colour pads again (see PlayLayer.colours),
|
||||
which it keeps in COLOURS_FILE so they outlive a restart of the pad controller.
|
||||
|
||||
Usage:
|
||||
.venv/bin/python -m padcontroller.midi
|
||||
# optional: --tau 0.05 (seconds; lower = snappier, higher = silkier)
|
||||
@@ -23,10 +29,13 @@ padcontroller/systemd/install.sh runs it as a systemd user service.
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
@@ -42,9 +51,11 @@ from padcontroller.layer import SUBMASTER_CC, PlayLayer # noqa: E402
|
||||
|
||||
# The lamp colours come from the show scripts, which are not part of this package.
|
||||
sys.path.insert(0, str(ROOT / "scripts" / "pad"))
|
||||
from pad_lamps import set_lamps # noqa: E402
|
||||
from pad_lamps import set_lamps, set_sound_lamps # noqa: E402
|
||||
|
||||
VIRTUAL_NAME = "padcontroller"
|
||||
COLOURS_FILE = Path(os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state")) / "padcontroller" / "colours.json"
|
||||
REOPEN_DELAY = 1.5 # s for QLC+ to finish loading the virtual console
|
||||
# USB first when the pad is plugged in, Bluetooth otherwise.
|
||||
SOURCE_HINTS = (
|
||||
"SINCO SMC-PAD-Master",
|
||||
@@ -123,14 +134,63 @@ def missing_links(ports: list[AlsaPort], src_name: str | None) -> list[tuple[str
|
||||
return links
|
||||
|
||||
|
||||
def ensure_links(src_name: str | None) -> None:
|
||||
def ensure_links(src_name: str | None) -> bool:
|
||||
"""Make the missing links. True when one of them is to QLC+."""
|
||||
try:
|
||||
out = subprocess.check_output(["aconnect", "-l"], text=True)
|
||||
except (FileNotFoundError, subprocess.CalledProcessError):
|
||||
return
|
||||
for src, dst in missing_links(parse_aconnect(out), src_name):
|
||||
return False
|
||||
ports = parse_aconnect(out)
|
||||
qlc = {p.addr for p in ports if p.client == "qlcplus"}
|
||||
to_qlc = False
|
||||
for src, dst in missing_links(ports, src_name):
|
||||
if subprocess.run(["aconnect", src, dst], capture_output=True).returncode == 0:
|
||||
print(f"Linked {src} -> {dst}", flush=True)
|
||||
to_qlc = to_qlc or dst in qlc
|
||||
return to_qlc
|
||||
|
||||
|
||||
def load_colours(layer: PlayLayer) -> None:
|
||||
try:
|
||||
saved = json.loads(COLOURS_FILE.read_text())
|
||||
layer.colours = {int(k): tuple(v) if v else None for k, v in saved.items()}
|
||||
except (OSError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
|
||||
def save_colours(layer: PlayLayer) -> None:
|
||||
try:
|
||||
COLOURS_FILE.parent.mkdir(parents=True, exist_ok=True)
|
||||
COLOURS_FILE.write_text(json.dumps(layer.colours) + "\n")
|
||||
except OSError as exc:
|
||||
print(f"Colours not saved: {exc}", flush=True)
|
||||
|
||||
|
||||
class SoundLamps:
|
||||
"""Show which sound pad is on, off the MIDI loop: each write takes ~60 ms."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.wanted: tuple[bool, bool] | None = None
|
||||
self.wake = threading.Event()
|
||||
threading.Thread(target=self._run, daemon=True).start()
|
||||
|
||||
def show(self, pump: bool, threshold: bool) -> None:
|
||||
self.wanted = (pump, threshold)
|
||||
self.wake.set()
|
||||
|
||||
def _run(self) -> None:
|
||||
shown = None
|
||||
while True:
|
||||
self.wake.wait()
|
||||
self.wake.clear()
|
||||
wanted = self.wanted
|
||||
if wanted is None or wanted == shown:
|
||||
continue
|
||||
try:
|
||||
set_sound_lamps(*wanted)
|
||||
shown = wanted
|
||||
except (SystemExit, Exception) as exc: # no Private port on Bluetooth
|
||||
print(f"Sound lamps not set: {exc}", flush=True)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -142,11 +202,6 @@ def main() -> None:
|
||||
help="smoothing time constant in seconds (default 0.055)",
|
||||
)
|
||||
ap.add_argument("--rate", type=float, default=120.0, help="update Hz")
|
||||
ap.add_argument(
|
||||
"--lock-knobs",
|
||||
action="store_true",
|
||||
help="knobs 1-10 move test.qxw's custom sliders only after the Custom pad is pressed",
|
||||
)
|
||||
ap.add_argument("--no-lamps", action="store_true", help="leave the pad lamp colours alone")
|
||||
args = ap.parse_args()
|
||||
|
||||
@@ -163,14 +218,21 @@ def main() -> None:
|
||||
current: dict[tuple[int, int], float] = {}
|
||||
target: dict[tuple[int, int], float] = {}
|
||||
last_sent: dict[tuple[int, int], int] = {}
|
||||
layer = PlayLayer(lock_knobs=args.lock_knobs)
|
||||
layer = PlayLayer()
|
||||
load_colours(layer)
|
||||
saved_colours = dict(layer.colours)
|
||||
reopen_at: float | None = None
|
||||
# Links made this soon after start are ours being restored, with QLC+'s buttons as they were.
|
||||
reopen_from = time.monotonic() + 5.0
|
||||
|
||||
print(f"Source: {src_name}", flush=True)
|
||||
print(f"Virtual: {VIRTUAL_NAME} (tau={args.tau}s @ {args.rate} Hz)", flush=True)
|
||||
print("Pass notes through (Play held shifts bank 2 up 16); smooth CC. Ctrl+C to stop.", flush=True)
|
||||
ensure_links(src_name)
|
||||
sound_lamps = None
|
||||
if not args.no_lamps:
|
||||
set_lamps()
|
||||
sound_lamps = SoundLamps()
|
||||
|
||||
dt = 1.0 / args.rate
|
||||
alpha = 1.0 - math.exp(-dt / max(args.tau, 1e-4))
|
||||
@@ -192,9 +254,19 @@ def main() -> None:
|
||||
else:
|
||||
print("Source: (pad gone, waiting)", flush=True)
|
||||
src_name = best_name
|
||||
ensure_links(src_name)
|
||||
if ensure_links(src_name) and now >= reopen_from:
|
||||
reopen_at = now + REOPEN_DELAY
|
||||
next_link_check = now + 2.0
|
||||
|
||||
if reopen_at is not None and now >= reopen_at:
|
||||
reopen_at = None
|
||||
taps = layer.reopen()
|
||||
for out in taps:
|
||||
midiout.send_message(out)
|
||||
print(f"QLC+ reopened: pressed {sum(out[0] & 0xF0 == 0x90 for out in taps)} colour pad(s) again", flush=True)
|
||||
if sound_lamps:
|
||||
sound_lamps.show(layer.pump, layer.threshold)
|
||||
|
||||
# Drain inbound
|
||||
while True:
|
||||
msg = midiin.get_message()
|
||||
@@ -215,6 +287,11 @@ def main() -> None:
|
||||
else:
|
||||
# Notes, aftertouch, PC, the Sound reset (always resent), etc. → immediate
|
||||
midiout.send_message(out)
|
||||
if sound_lamps:
|
||||
sound_lamps.show(layer.pump, layer.threshold)
|
||||
if layer.colours != saved_colours:
|
||||
save_colours(layer)
|
||||
saved_colours = dict(layer.colours)
|
||||
|
||||
# Ease CC toward targets and emit when quantized value moves
|
||||
for key, tgt in list(target.items()):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Install the SMC-PAD pad controller as a systemd user service and start it.
|
||||
#
|
||||
# padcontroller/systemd/install.sh # install, enable, start
|
||||
# padcontroller/systemd/install.sh --lock-knobs # pass options to the pad controller
|
||||
# padcontroller/systemd/install.sh --no-lamps # pass options to the pad controller
|
||||
# padcontroller/systemd/install.sh --no-enable # install only; start it with
|
||||
# # systemctl --user start padcontroller
|
||||
# padcontroller/systemd/install.sh --uninstall
|
||||
|
||||
@@ -28,5 +28,42 @@ def set_lamps() -> None:
|
||||
print(f"Lamps not set: {exc}", flush=True)
|
||||
|
||||
|
||||
# Bank 1 pads 1 and 2 (notes 36 and 37), lit while their sound mode is on.
|
||||
PUMP_RGB = (0, 255, 0)
|
||||
THRESHOLD_RGB = (255, 120, 0)
|
||||
|
||||
|
||||
def set_sound_lamps(pump: bool, threshold: bool) -> None:
|
||||
"""Light the Pump and Threshold pads while their mode is on, without saving.
|
||||
|
||||
Writes only the pad's running copy, so the stored preset (bank 1 off) comes
|
||||
back on a power cycle. Needs the USB Private port; raises when it is missing.
|
||||
"""
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / "scripts" / "pad"))
|
||||
import pad_colours
|
||||
import rtmidi
|
||||
from padcontroller.device import transact
|
||||
from padcontroller.preset import scale
|
||||
from padcontroller.sysex import RAM, write_request
|
||||
|
||||
lamps = {0: PUMP_RGB if pump else (0, 0, 0), 1: THRESHOLD_RGB if threshold else (0, 0, 0)}
|
||||
midiout = rtmidi.MidiOut(rtapi=rtmidi.API_LINUX_ALSA)
|
||||
midiin = rtmidi.MidiIn(rtapi=rtmidi.API_LINUX_ALSA)
|
||||
index = midiout.get_ports().index(pad_colours.private_port(midiout.get_ports()))
|
||||
midiin.open_port(index)
|
||||
midiin.ignore_types(sysex=False, timing=True, active_sense=True)
|
||||
midiout.open_port(index)
|
||||
try:
|
||||
for base in pad_colours.bank_bases(1):
|
||||
for pad, rgb in lamps.items():
|
||||
address = RAM + base + pad * pad_colours.RECORD + pad_colours.RGB_AT
|
||||
transact(midiout, midiin, write_request(address, bytes(scale(c) for c in rgb)))
|
||||
finally:
|
||||
for port in (midiout, midiin):
|
||||
port.close_port()
|
||||
port.delete()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
set_lamps()
|
||||
@@ -8,11 +8,9 @@ Holding Play picks set B: the pad controller turns those notes into 68–83 whil
|
||||
Play is down. Bank 1 is kept for animations.
|
||||
|
||||
python3 scripts/shows/colour_sets.py && python3 -m showfile write shows/test.show.json -o shows/test.qxw
|
||||
The sliders are Playback sliders over five scenes per set (Dim, R, G, B, W),
|
||||
so they never override a channel. Knobs 1–5 move colour 1's sliders and knobs
|
||||
6–10 colour 2's. Run the pad controller with --lock-knobs to make them work only
|
||||
after the Custom pad is pressed; any other pad sends them back to zero (see
|
||||
padcontroller/layer.py).
|
||||
The colour scenes leave the dimmers alone: the Dimmers frame's Level sliders
|
||||
own them, on knob 15 (movers), knob 5 (cans 9–15), knob 7 (cans 3–6) and
|
||||
knob 8 (cans 1, 2, 7, 8).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -30,13 +28,14 @@ HELD_FIRST_NOTE = 68 # padcontroller/layer.py sends bank 2 here while Play is h
|
||||
PROFILE = "M-VAVE SMC-PAD"
|
||||
OMNI = 16 # QLC+ MIDI plugin channel that accepts every MIDI channel
|
||||
PAD_MIDI_CH = 9 # the pads send notes on channel 10
|
||||
KNOB_FIRST_CC = 30 # pad knob 1; colour 2's sliders follow colour 1's
|
||||
KNOB_FIRST_CC = 30 # pad knob 1
|
||||
PAD_PORT = "padcontroller" # padcontroller/midi.py; it applies the Play layer
|
||||
|
||||
# name, r, g, b, w. Bottom row first, four to a row. The cans have a white emitter, so the whites use it.
|
||||
COLOURS = (
|
||||
("Red", 255, 0, 0, 0),
|
||||
("Orange", 255, 127, 0, 0),
|
||||
("Amber", 255, 191, 0, 0),
|
||||
("Yellow", 255, 255, 0, 0),
|
||||
("Lime", 127, 255, 0, 0),
|
||||
("Green", 0, 255, 0, 0),
|
||||
@@ -51,10 +50,6 @@ COLOURS = (
|
||||
("White", 0, 0, 0, 255),
|
||||
("Cool", 80, 120, 255, 120),
|
||||
)
|
||||
# The top-right pad is the custom colour. Its button shows this swatch, but
|
||||
# its scene is dark: the sliders next to it mix the colour from five scenes.
|
||||
# Its pad lamp stays off.
|
||||
CUSTOM = (("Custom", 255, 60, 0, 0),)
|
||||
CANS = [f"#{n}" for n in range(1, 16)]
|
||||
MOVERS = ["M1", "M2", "M3", "M4"]
|
||||
# Mover channels: 8 is centre brightness, 9 centre strobe, then seven R G B W groups from 10.
|
||||
@@ -65,41 +60,25 @@ def swatch(r: int, g: int, b: int, w: int) -> list[int]:
|
||||
return [min(255, r + w), min(255, g + w), min(255, b + w)]
|
||||
|
||||
|
||||
# Mixer beside each grid: caption, can channel, offset in a mover colour group (None is brightness).
|
||||
SLIDERS = (
|
||||
("Dim", DIMMER, None, [255, 255, 255]),
|
||||
("R", RED, 0, [255, 0, 0]),
|
||||
("G", GREEN, 1, [0, 255, 0]),
|
||||
("B", BLUE, 2, [0, 0, 255]),
|
||||
("W", WHITE, 3, [255, 255, 255]),
|
||||
# Level sliders on the dimmer channels: caption, knob (from 1), fixtures, channel.
|
||||
DIMMERS = (
|
||||
("Movers", 15, MOVERS, MOVER_BRIGHTNESS),
|
||||
("Cans 9–15", 5, CANS[8:], DIMMER),
|
||||
("Cans 3–6", 7, CANS[2:6], DIMMER),
|
||||
("Cans 1, 2, 7, 8", 8, CANS[0:2] + CANS[6:8], DIMMER),
|
||||
)
|
||||
|
||||
|
||||
def component(cans: list[str], movers: list[str], can_channel: int, offset: int | None) -> dict:
|
||||
"""One channel kind of this set at full, for a Playback slider to scale."""
|
||||
values = {can: {can_channel: 255} for can in cans}
|
||||
for mover in movers:
|
||||
if offset is None:
|
||||
values[mover] = {MOVER_BRIGHTNESS: 255}
|
||||
else:
|
||||
values[mover] = {MOVER_FIRST_COLOUR + group * 4 + offset: 255 for group in range(MOVER_GROUPS)}
|
||||
return values
|
||||
|
||||
|
||||
def custom_off(cans: list[str], movers: list[str]) -> dict:
|
||||
"""The Custom pad's own scene: dark, so the sliders' scenes set the colour."""
|
||||
values = {can: {DIMMER: 0} for can in cans}
|
||||
values.update({mover: {MOVER_BRIGHTNESS: 0} for mover in movers})
|
||||
return values
|
||||
|
||||
|
||||
def sliders(label: str, first_cc: int) -> list[dict]:
|
||||
"""Playback sliders. Each scales its own scene, so nothing is overridden."""
|
||||
return [{
|
||||
"type": "slider", "caption": caption, "function": f"custom_{label}_{caption}",
|
||||
"x": 400 + index * 52, "y": 10, "w": 48, "h": 200, "fg": fg,
|
||||
"input": {"universe": 1, "cc": [0, first_cc + index]},
|
||||
} for index, (caption, _can, _offset, fg) in enumerate(SLIDERS)]
|
||||
def dimmers() -> dict:
|
||||
return {
|
||||
"type": "frame", "caption": "Dimmers", "x": 10, "y": 630, "w": 250, "h": 250,
|
||||
"children": [{
|
||||
"type": "slider", "caption": caption, "value": 255,
|
||||
"channels": [[fixture, channel] for fixture in fixtures],
|
||||
"x": 10 + index * 58, "y": 10, "w": 52, "h": 200,
|
||||
"input": {"universe": 1, "cc": [0, KNOB_FIRST_CC + knob - 1]},
|
||||
} for index, (caption, knob, fixtures, channel) in enumerate(DIMMERS)],
|
||||
}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -108,17 +87,14 @@ def main() -> None:
|
||||
functions, frames = [], []
|
||||
for si, (label, cans, movers) in enumerate((("1", CANS, []), ("2", [], MOVERS))):
|
||||
buttons = []
|
||||
for i, (name, r, g, b, w) in enumerate(COLOURS + CUSTOM):
|
||||
for i, (name, r, g, b, w) in enumerate(COLOURS):
|
||||
key = f"colour_{label}_{i + 1}"
|
||||
on = 255
|
||||
values = {can: {DIMMER: on, RED: r, GREEN: g, BLUE: b, WHITE: w} for can in cans}
|
||||
values = {can: {RED: r, GREEN: g, BLUE: b, WHITE: w} for can in cans}
|
||||
for mover in movers:
|
||||
values[mover] = {MOVER_BRIGHTNESS: on, MOVER_STROBE: 0}
|
||||
values[mover] = {MOVER_STROBE: 0}
|
||||
for group in range(MOVER_GROUPS):
|
||||
first = MOVER_FIRST_COLOUR + group * 4
|
||||
values[mover].update({first: r, first + 1: g, first + 2: b, first + 3: w})
|
||||
if name == CUSTOM[0][0]:
|
||||
values = custom_off(cans, movers)
|
||||
functions.append({
|
||||
"key": key, "type": "scene", "name": f"{label} {name}",
|
||||
"fade_in": FADE_MS, "fade_out": FADE_MS, "values": values,
|
||||
@@ -134,17 +110,12 @@ def main() -> None:
|
||||
}
|
||||
button["input"] = {"universe": 1, "note": [PAD_MIDI_CH, (HELD_FIRST_NOTE if si else PAD_BANK_2_FIRST_NOTE) + i]}
|
||||
buttons.append(button)
|
||||
for caption, can_channel, offset, _fg in SLIDERS:
|
||||
functions.append({
|
||||
"key": f"custom_{label}_{caption}", "type": "scene", "name": f"{label} Custom {caption}",
|
||||
"values": component(cans, movers, can_channel, offset),
|
||||
})
|
||||
frames.append({
|
||||
"type": "solo", "caption": f"Colour {label}", "x": 10, "y": 10 + si * 310,
|
||||
"w": 400 + len(SLIDERS) * 52, "h": 300, "children": buttons + sliders(label, KNOB_FIRST_CC + si * len(SLIDERS)),
|
||||
"w": 400, "h": 300, "children": buttons,
|
||||
})
|
||||
spec["functions"] = functions
|
||||
spec["vc"] = frames
|
||||
spec["vc"] = frames + [dimmers()]
|
||||
SPEC.write_text(json.dumps(spec, indent=2) + "\n")
|
||||
|
||||
|
||||
|
||||
@@ -67,9 +67,13 @@ def collect(show: dict, stage: dict) -> dict:
|
||||
pads, sliders = [], []
|
||||
for widget in frame.get("children", []):
|
||||
kind = widget["type"]
|
||||
function = functions[widget["function"]]
|
||||
binding = widget.get("input") or {}
|
||||
levels = absolute_levels(show, stage, function["values"])
|
||||
if "function" in widget:
|
||||
function = functions[widget["function"]]
|
||||
values = function["values"]
|
||||
else: # a Level slider: its channels at full, scaled by the slider
|
||||
values = {fixture: {channel: 255} for fixture, channel in widget.get("channels", [])}
|
||||
levels = absolute_levels(show, stage, values)
|
||||
if kind == "button" and "note" in binding:
|
||||
pads.append({
|
||||
"id": ident("c", number, widget["caption"]),
|
||||
@@ -81,12 +85,13 @@ def collect(show: dict, stage: dict) -> dict:
|
||||
"fade": [function.get("fade_in") or 0, function.get("fade_out") or 0],
|
||||
"levels": levels,
|
||||
})
|
||||
elif kind == "slider" and "cc" in binding:
|
||||
elif kind == "slider":
|
||||
sliders.append({
|
||||
"id": ident("s", number, widget["caption"]),
|
||||
"box": box(frame, widget),
|
||||
"fg": widget.get("fg", [255, 255, 255]),
|
||||
"cc": binding["cc"][1],
|
||||
"cc": binding["cc"][1] if "cc" in binding else -1, # -1: dashboard only
|
||||
"value": round(int(widget.get("value", 0)) / 255, 3),
|
||||
"name": widget["caption"],
|
||||
"levels": levels,
|
||||
})
|
||||
@@ -133,7 +138,7 @@ def render_data(groups: dict) -> str:
|
||||
lines.append(" sliders: [")
|
||||
for slider in group["sliders"]:
|
||||
lines.append(
|
||||
f" {{id: {json.dumps(slider['id'])}, cc: {slider['cc']}, name: {json.dumps(slider['name'])}, levels: {js_levels(slider['levels'])}}},"
|
||||
f" {{id: {json.dumps(slider['id'])}, cc: {slider['cc']}, name: {json.dumps(slider['name'])}, value: {slider['value']}, levels: {js_levels(slider['levels'])}}},"
|
||||
)
|
||||
lines.append(" ]")
|
||||
lines.append(" },")
|
||||
|
||||
+1465
-2096
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -27,7 +27,7 @@
|
||||
"universe": 0,
|
||||
"address": 87,
|
||||
"channels": 8,
|
||||
"direction": 90
|
||||
"direction": 71
|
||||
},
|
||||
"#2": {
|
||||
"x": -3.5,
|
||||
@@ -38,7 +38,7 @@
|
||||
"universe": 0,
|
||||
"address": 95,
|
||||
"channels": 8,
|
||||
"direction": 90
|
||||
"direction": 105
|
||||
},
|
||||
"#3": {
|
||||
"x": -1.8,
|
||||
@@ -93,7 +93,7 @@
|
||||
"universe": 0,
|
||||
"address": 135,
|
||||
"channels": 8,
|
||||
"direction": -72
|
||||
"direction": -103
|
||||
},
|
||||
"#8": {
|
||||
"x": 3.5,
|
||||
@@ -104,7 +104,7 @@
|
||||
"universe": 0,
|
||||
"address": 143,
|
||||
"channels": 8,
|
||||
"direction": -90
|
||||
"direction": -72
|
||||
},
|
||||
"M1": {
|
||||
"x": -0.3,
|
||||
|
||||
+14
-3
@@ -26,11 +26,22 @@ class ChataigneExportTest(unittest.TestCase):
|
||||
|
||||
def test_groups_hold_pads_and_sliders(self) -> None:
|
||||
groups = make_chataigne.collect(self.show, self.stage)
|
||||
self.assertEqual(list(groups), ["Colour 1", "Colour 2"])
|
||||
self.assertEqual(list(groups), ["Colour 1", "Colour 2", "Dimmers"])
|
||||
cans = groups["Colour 1"]
|
||||
self.assertEqual([p["note"] for p in cans["pads"]][:2], [52, 53])
|
||||
self.assertEqual([s["cc"] for s in cans["sliders"]], [30, 31, 32, 33, 34])
|
||||
self.assertEqual(cans["sliders"], [])
|
||||
self.assertEqual(cans["pads"][0]["fade"], [1000, 1000])
|
||||
self.assertNotIn(88, cans["pads"][0]["levels"]) # the dimmer is the knob's
|
||||
|
||||
def test_dimmers_are_on_knobs_15_5_7_and_8(self) -> None:
|
||||
dimmers = make_chataigne.collect(self.show, self.stage)["Dimmers"]["sliders"]
|
||||
self.assertEqual([(s["name"], s["cc"], s["value"]) for s in dimmers],
|
||||
[("Movers", 44, 1.0), ("Cans 9–15", 34, 1.0), ("Cans 3–6", 36, 1.0), ("Cans 1, 2, 7, 8", 37, 1.0)])
|
||||
dmx = lambda *cans: {88 + 8 * (n - 1): 255 for n in cans}
|
||||
self.assertEqual(dimmers[1]["levels"], dmx(*range(9, 16)))
|
||||
self.assertEqual(dimmers[2]["levels"], dmx(3, 4, 5, 6))
|
||||
self.assertEqual(dimmers[3]["levels"], dmx(1, 2, 7, 8))
|
||||
self.assertEqual(dimmers[0]["levels"][9], 255)
|
||||
|
||||
def test_writes_project_and_script(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
@@ -45,7 +56,7 @@ class ChataigneExportTest(unittest.TestCase):
|
||||
self.assertIn({"value": True, "controlAddress": "/enableDashboardServer"}, settings)
|
||||
board = project["dashboardManager"]["items"][0]["itemManager"]["items"]
|
||||
targets = [item["controllable"] for item in board]
|
||||
self.assertEqual(len(board), 32 * 2 + 10 + 2)
|
||||
self.assertEqual(len(board), 32 * 2 + 4 + 3)
|
||||
self.assertEqual(len(set(targets)), len(targets))
|
||||
for item in board:
|
||||
self.assertIn(item["controllable"].rsplit("/", 1)[1].removesuffix("Lamp"), script)
|
||||
|
||||
+138
-36
@@ -8,6 +8,9 @@ from padcontroller.layer import PlayLayer # noqa: E402
|
||||
|
||||
PLAY_DOWN = [0xB0, 27, 127]
|
||||
PLAY_UP = [0xB0, 27, 0]
|
||||
PAUSE_DOWN = [0xB0, 28, 127]
|
||||
PAUSE_UP = [0xB0, 28, 0]
|
||||
SIDES_FULL = [[0xB0, 34, 127], [0xB0, 37, 127]]
|
||||
|
||||
|
||||
class PlayLayerTest(unittest.TestCase):
|
||||
@@ -46,44 +49,143 @@ class PlayLayerTest(unittest.TestCase):
|
||||
|
||||
def test_sound_pad_puts_the_submaster_back_to_full(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 36, 100], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 36, 100], *SIDES_FULL, [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x89, 36, 0]), [[0x89, 36, 0], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100]])
|
||||
|
||||
def test_threshold_pad_holds_the_submaster_at_zero_while_on(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 0]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 37, 0], [0xB0, 100, 0]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 37, 0], [0xB0, 100, 127]])
|
||||
|
||||
def test_sound_pads_track_which_mode_is_on(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0x89, 36, 0])
|
||||
self.assertEqual((layer.pump, layer.threshold), (True, False))
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0x99, 36, 0]) # note on at velocity 0 is a release
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_turning_threshold_on_switches_pump_off_first(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(
|
||||
layer.handle([0x99, 37, 100]),
|
||||
[[0x99, 36, 127], [0x89, 36, 0], [0x99, 37, 100], *SIDES_FULL, [0xB0, 100, 0]],
|
||||
)
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, True))
|
||||
|
||||
def test_turning_pump_on_switches_threshold_off_first(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 37, 100])
|
||||
self.assertEqual(
|
||||
layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 37, 127], [0x89, 37, 0], [0x99, 36, 100], *SIDES_FULL, [0xB0, 100, 127]],
|
||||
)
|
||||
self.assertEqual((layer.pump, layer.threshold), (True, False))
|
||||
|
||||
def test_turning_a_mode_off_leaves_the_other_alone(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 37, 100])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 127]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_peak_knob_goes_on_to_the_hits_submaster(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0xB0, 35, 60]), [[0xB0, 35, 60]])
|
||||
|
||||
def test_side_knobs_pass_through_while_sound_is_off(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0xB0, 34, 90]), [[0xB0, 34, 90]])
|
||||
layer.handle([0x99, 37, 100]) # Threshold keeps them: the submaster holds the sides dark
|
||||
self.assertEqual(layer.handle([0xB0, 37, 80]), [[0xB0, 37, 80]])
|
||||
|
||||
def test_pump_holds_the_sides_at_the_peak(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 36, 100], [0xB0, 34, 60], [0xB0, 37, 60], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0xB0, 35, 40]), [[0xB0, 35, 40], [0xB0, 34, 40], [0xB0, 37, 40]])
|
||||
self.assertEqual(layer.handle([0xB0, 37, 100]), []) # kept for later
|
||||
|
||||
def test_pump_off_puts_the_side_knobs_back(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0xB0, 37, 100])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 36, 100], [0xB0, 34, 90], [0xB0, 37, 100], [0xB0, 100, 127]])
|
||||
|
||||
def test_threshold_taking_over_from_pump_puts_the_side_knobs_back(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]),
|
||||
[[0x99, 36, 127], [0x89, 36, 0], [0x99, 37, 100],
|
||||
[0xB0, 34, 90], [0xB0, 37, 127], [0xB0, 100, 0]])
|
||||
|
||||
def test_colours_remember_the_last_pad_in_each_set(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 52, 100])
|
||||
layer.handle([0x99, 55, 100])
|
||||
layer.handle(PLAY_DOWN)
|
||||
layer.handle([0x99, 61, 100]) # Colour 2 Blue, sent as 77
|
||||
self.assertEqual(layer.colours, {1: (9, 55), 2: (9, 77)})
|
||||
|
||||
def test_pressing_the_lit_colour_again_turns_it_off(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 52, 100])
|
||||
layer.handle([0x89, 52, 0])
|
||||
layer.handle([0x99, 52, 100])
|
||||
self.assertEqual(layer.colours[1], None)
|
||||
|
||||
def test_reopen_presses_the_colours_again_and_clears_sound(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 54, 100])
|
||||
layer.handle(PLAY_DOWN)
|
||||
layer.handle([0x99, 66, 100])
|
||||
layer.handle(PLAY_UP)
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(layer.reopen(), [[0x99, 54, 127], [0x89, 54, 0], [0x99, 82, 127], [0x89, 82, 0],
|
||||
[0xB0, 100, 127]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
self.assertEqual(layer.colours, {1: (9, 54), 2: (9, 82)}) # still on, for the next reopen
|
||||
|
||||
def test_pause_toggles_bank_1_to_the_movers(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle(PAUSE_DOWN), [])
|
||||
self.assertEqual(layer.handle(PAUSE_UP), [])
|
||||
self.assertEqual(layer.handle([0x99, 40, 100]), [[0x99, 88, 100]])
|
||||
self.assertEqual(layer.handle([0x99, 51, 100]), [[0x99, 99, 100]])
|
||||
self.assertEqual(layer.handle([0x99, 52, 100]), [[0x99, 52, 100]])
|
||||
layer.handle(PAUSE_DOWN)
|
||||
layer.handle(PAUSE_UP)
|
||||
self.assertEqual(layer.handle([0x99, 44, 100]), [[0x99, 44, 100]])
|
||||
|
||||
def test_sound_pads_do_nothing_on_the_movers_layer(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle(PAUSE_DOWN)
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 84, 100]])
|
||||
self.assertEqual(layer.handle([0x89, 36, 0]), [[0x89, 84, 0]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 85, 100]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 85, 0]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_bank_1_release_matches_its_press_across_pause(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle(PAUSE_DOWN)
|
||||
layer.handle([0x99, 48, 100])
|
||||
layer.handle(PAUSE_DOWN)
|
||||
self.assertEqual(layer.handle([0x89, 48, 0]), [[0x89, 96, 0]])
|
||||
|
||||
def test_reopen_with_no_colours_only_resets_the_submaster(self):
|
||||
self.assertEqual(PlayLayer().reopen(), [[0xB0, 100, 127]])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
class LockedKnobsTest(unittest.TestCase):
|
||||
def test_knobs_are_dropped_until_custom_is_pressed(self):
|
||||
layer = PlayLayer(lock_knobs=True)
|
||||
self.assertEqual(layer.handle([0xB0, 31, 64]), [])
|
||||
layer.handle([0x99, 67, 100])
|
||||
self.assertEqual(layer.handle([0xB0, 31, 64]), [[0xB0, 31, 64]])
|
||||
self.assertEqual(layer.handle([0xB0, 36, 64]), [])
|
||||
|
||||
def test_another_pad_locks_them_again(self):
|
||||
layer = PlayLayer(lock_knobs=True)
|
||||
layer.handle([0x99, 67, 100])
|
||||
layer.handle([0x99, 60, 100])
|
||||
self.assertEqual(layer.handle([0xB0, 31, 64]), [])
|
||||
|
||||
def test_locking_sends_the_sliders_back_to_zero(self):
|
||||
layer = PlayLayer(lock_knobs=True)
|
||||
layer.handle([0x99, 67, 100])
|
||||
sent = layer.handle([0x99, 60, 100])
|
||||
self.assertEqual(sent[0], [0x99, 60, 100])
|
||||
self.assertEqual(sent[1:], [[0xB0, 30 + n, 0] for n in range(5)])
|
||||
self.assertEqual(layer.handle([0x99, 61, 100]), [[0x99, 61, 100]])
|
||||
|
||||
def test_play_layer_unlocks_the_second_set(self):
|
||||
layer = PlayLayer(lock_knobs=True)
|
||||
layer.handle(PLAY_DOWN)
|
||||
layer.handle([0x99, 67, 100])
|
||||
self.assertEqual(layer.handle([0xB0, 36, 64]), [[0xB0, 36, 64]])
|
||||
self.assertEqual(layer.handle([0xB0, 31, 64]), [])
|
||||
|
||||
def test_other_knobs_and_unlocked_mode_are_untouched(self):
|
||||
self.assertEqual(PlayLayer(lock_knobs=True).handle([0xB0, 40, 64]), [[0xB0, 40, 64]])
|
||||
self.assertEqual(PlayLayer().handle([0xB0, 31, 64]), [[0xB0, 31, 64]])
|
||||
@@ -59,7 +59,7 @@ def test_xchc_patch_matches_the_stage_map():
|
||||
assert by_id["M3"].address == 257 and by_id["M3"].channels == 43
|
||||
assert by_id["M3"].x == -1.75 and by_id["M3"].y == -7.65
|
||||
assert by_id["M4"].address == 300 and by_id["M4"].x == 1.75
|
||||
assert by_id["#1"].direction == 90 and by_id["#8"].direction == -90
|
||||
assert by_id["#1"].direction == 71 and by_id["#8"].direction == -72
|
||||
assert by_id["#3"].direction == 0 and by_id["#14"].direction == -179
|
||||
assert by_id["M1"].zero == 0 and by_id["M4"].zero == 0
|
||||
assert stage.warnings == []
|
||||
@@ -215,13 +215,14 @@ def test_http_state_follows_artnet():
|
||||
def test_heading_is_stored_in_the_map(tmp_path):
|
||||
target = tmp_path / "map.json"
|
||||
target.write_text((ROOT / "stage" / "map.json").read_text())
|
||||
before = json.loads(target.read_text())["fixtures"]
|
||||
stage = load_stage(target)
|
||||
assert wrap_degrees(270) == -90
|
||||
set_heading(stage, "#1", direction=45)
|
||||
set_heading(stage, "M1", zero=-30)
|
||||
saved = json.loads(target.read_text())
|
||||
assert saved["fixtures"]["#1"]["direction"] == 45
|
||||
assert saved["fixtures"]["#2"]["direction"] == 90
|
||||
assert saved["fixtures"]["#2"]["direction"] == before["#2"]["direction"]
|
||||
assert saved["fixtures"]["M1"]["zero"] == -30
|
||||
assert saved["fixtures"]["M2"]["zero"] == 0
|
||||
again = load_stage(target)
|
||||
|
||||
Reference in new issue
Block a user