├── .gitignore ├── img ├── editPlugin.png ├── inAndOut.png ├── listMidi.png ├── openConfig.png ├── openModule.png ├── startOSC.png ├── editExecutors.png ├── mappings │ ├── mpx16.jpg │ ├── xTouch.jpg │ ├── akiApcMini1.png │ ├── akiApcMini2.png │ ├── xTouchCompact.jpg │ ├── mpx16-1Mapping.png │ ├── xTouch1Mapping.png │ ├── xTouchCompact1Mapping_A.png │ ├── xTouchCompact1Mapping_B.png │ ├── xTouchCompactRltv1Mapping_A.png │ ├── APCmini.-.grandMA3.-.v4.0 (1).pdf │ ├── Launchpad.-.grandMA3.-.v4.0.1.-.Playback (1).pdf │ └── Launchpad.-.grandMA3.-.v4.0.2.-.Command-Section (1).pdf └── sessionMaster.png ├── mappings ├── mpx16 │ └── mpx16.odg ├── XTouch │ └── XTouch1.odg ├── AKAI_APC_mini │ └── Keypad.xlsx ├── xTouchCompact │ ├── XTouchCompact1.odg │ ├── XTouchCompactRltv1.odg │ ├── xTouchCompactRltv1LayerA.bin │ ├── xTouchCompact1LayerB.bin │ └── xTouchCompact1LayerA.bin ├── mpx16-1.json ├── akiApcMini2.json ├── LaunchPad-TriFlats.json ├── LaunchPad-Playback.json ├── xTouchCompact1.json ├── xTouchCompactRltv1.json ├── akaiApcMini2-Controller.json ├── akiApcMini1.json ├── xTouch1.json └── xTouch2.json ├── OpenStageControlConfig.config ├── .prettierrc ├── package.json ├── oscUtils.js ├── .github └── workflows │ └── build.yml ├── utils.js ├── README.md ├── colorUtils.js ├── midiUtils.js ├── routingUtils.js ├── pam-OSC.lua ├── SettingsPage.lua ├── pam-OSC-Module.js ├── gma3_library └── datapools │ └── plugins │ └── pam-osc.xml └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* -------------------------------------------------------------------------------- /img/editPlugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/editPlugin.png -------------------------------------------------------------------------------- /img/inAndOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/inAndOut.png -------------------------------------------------------------------------------- /img/listMidi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/listMidi.png -------------------------------------------------------------------------------- /img/openConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/openConfig.png -------------------------------------------------------------------------------- /img/openModule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/openModule.png -------------------------------------------------------------------------------- /img/startOSC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/startOSC.png -------------------------------------------------------------------------------- /img/editExecutors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/editExecutors.png -------------------------------------------------------------------------------- /img/mappings/mpx16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/mpx16.jpg -------------------------------------------------------------------------------- /img/mappings/xTouch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouch.jpg -------------------------------------------------------------------------------- /img/sessionMaster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/sessionMaster.png -------------------------------------------------------------------------------- /mappings/mpx16/mpx16.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/mpx16/mpx16.odg -------------------------------------------------------------------------------- /img/mappings/akiApcMini1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/akiApcMini1.png -------------------------------------------------------------------------------- /img/mappings/akiApcMini2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/akiApcMini2.png -------------------------------------------------------------------------------- /mappings/XTouch/XTouch1.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/XTouch/XTouch1.odg -------------------------------------------------------------------------------- /OpenStageControlConfig.config: -------------------------------------------------------------------------------- 1 | {"osc-port":9004,"midi":["xTouch1:0,1"],"no-gui":true,"send":["127.0.0.1:9003"]} -------------------------------------------------------------------------------- /img/mappings/xTouchCompact.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouchCompact.jpg -------------------------------------------------------------------------------- /img/mappings/mpx16-1Mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/mpx16-1Mapping.png -------------------------------------------------------------------------------- /img/mappings/xTouch1Mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouch1Mapping.png -------------------------------------------------------------------------------- /mappings/AKAI_APC_mini/Keypad.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/AKAI_APC_mini/Keypad.xlsx -------------------------------------------------------------------------------- /img/mappings/xTouchCompact1Mapping_A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouchCompact1Mapping_A.png -------------------------------------------------------------------------------- /img/mappings/xTouchCompact1Mapping_B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouchCompact1Mapping_B.png -------------------------------------------------------------------------------- /mappings/xTouchCompact/XTouchCompact1.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/xTouchCompact/XTouchCompact1.odg -------------------------------------------------------------------------------- /img/mappings/xTouchCompactRltv1Mapping_A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/xTouchCompactRltv1Mapping_A.png -------------------------------------------------------------------------------- /mappings/xTouchCompact/XTouchCompactRltv1.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/xTouchCompact/XTouchCompactRltv1.odg -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": false, 4 | "tabWidth": 2, 5 | "trailingComma": "es5", 6 | "printWidth": 120 7 | } 8 | -------------------------------------------------------------------------------- /img/mappings/APCmini.-.grandMA3.-.v4.0 (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/APCmini.-.grandMA3.-.v4.0 (1).pdf -------------------------------------------------------------------------------- /mappings/xTouchCompact/xTouchCompactRltv1LayerA.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/mappings/xTouchCompact/xTouchCompactRltv1LayerA.bin -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "prettier": "^3.4.2" 4 | }, 5 | "scripts": { 6 | "format": "prettier --write ." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /img/mappings/Launchpad.-.grandMA3.-.v4.0.1.-.Playback (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/Launchpad.-.grandMA3.-.v4.0.1.-.Playback (1).pdf -------------------------------------------------------------------------------- /img/mappings/Launchpad.-.grandMA3.-.v4.0.2.-.Command-Section (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xxpasixx/pam-osc/HEAD/img/mappings/Launchpad.-.grandMA3.-.v4.0.2.-.Command-Section (1).pdf -------------------------------------------------------------------------------- /mappings/xTouchCompact/xTouchCompact1LayerB.bin: -------------------------------------------------------------------------------- 1 |  !"#$%&'()*+,789:;<=>-./01234?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm?@opqrstuvw -------------------------------------------------------------------------------- /mappings/xTouchCompact/xTouchCompact1LayerA.bin: -------------------------------------------------------------------------------- 1 |   2 |      3 |     !"#$%&'()*+,-./0123456efghijklm -------------------------------------------------------------------------------- /oscUtils.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 xxpasixx 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | module.exports = { 17 | triggerForceReload: triggerForceReload, 18 | }; 19 | 20 | function triggerForceReload(ip, oscPort, prefix) { 21 | send(ip, oscPort, prefix + "/cmd", { type: "s", value: `Lua 'SetVar(GlobalVars(), "forceReload", true)'` }); 22 | } 23 | -------------------------------------------------------------------------------- /mappings/mpx16-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 3 | "control": { 4 | }, 5 | "note": { 6 | "112": { 7 | "exec": 191 8 | }, 9 | "113": { 10 | "exec": 192 11 | }, 12 | "114": { 13 | "exec": 193 14 | }, 15 | "115": { 16 | "exec": 194 17 | }, 18 | 19 | "116": { 20 | "exec": 291 21 | }, 22 | "117": { 23 | "exec": 292 24 | }, 25 | "118": { 26 | "exec": 293 27 | }, 28 | "119": { 29 | "exec": 294 30 | }, 31 | 32 | "120": { 33 | "exec": 195 34 | }, 35 | "121": { 36 | "exec": 196 37 | }, 38 | "122": { 39 | "exec": 197 40 | }, 41 | "123": { 42 | "exec": 198 43 | }, 44 | 45 | "124": { 46 | "exec": 295 47 | }, 48 | "125": { 49 | "exec": 296 50 | }, 51 | "126": { 52 | "exec": 297 53 | }, 54 | "127": { 55 | "exec": 298 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: MA3 Plugin Build 2 | 3 | on: 4 | pull_request_target: 5 | paths: 6 | - '**/*.lua' 7 | workflow_dispatch: 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | build: 14 | name: MA3 Plugin Build 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | with: 21 | ref: ${{ github.event.pull_request.head.ref }} 22 | repository: ${{ github.event.pull_request.head.repo.full_name }} 23 | fetch-depth: 0 24 | 25 | - name: Build Release File 26 | uses: bootsie123/ma3-plugin-action@v1 27 | with: 28 | plugins: >- 29 | [ 30 | { 31 | "name": "pam-osc Start Stop", 32 | "version": "1.2.0.0", 33 | "path": "pam-OSC.lua", 34 | "pluginGuid": "C1 19 BD 33 A9 FD 10 03 5E 76 48 94 2C 0E 90 FB", 35 | "luaGuid": "C1 19 BD 33 96 FC 10 02 7D 74 11 B4 F6 65 C8 40" 36 | }, 37 | { 38 | "name": "pam-osc Settings", 39 | "version": "1.2.0.0", 40 | "path": "SettingsPage.lua", 41 | "pluginGuid": "C1 19 BD 33 A9 FD 10 03 5E 76 48 94 2C 0E 90 FC", 42 | "luaGuid": "C1 19 BD 33 7E A6 10 02 EB 81 42 CE E9 06 2A 41" 43 | } 44 | ] 45 | outputFile: ./gma3_library/datapools/plugins/pam-osc.xml 46 | 47 | - name: Push Changes 48 | run: | 49 | git config user.name "${GITHUB_ACTOR}" 50 | git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" 51 | git add . 52 | git commit -am "Automated: update MA3 plugin release file" 53 | git push 54 | -------------------------------------------------------------------------------- /utils.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 xxpasixx 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | module.exports = { 17 | getRelativeValue: getRelativeValue, 18 | mapValue: mapValue, 19 | stringToAsciiHex: stringToAsciiHex, 20 | numberIntoHex: numberIntoHex, 21 | }; 22 | 23 | function getRelativeValue(value, posFrom, posTo, negFrom, negTo) { 24 | if (value >= posFrom && value <= posTo) { 25 | return value - posFrom + 1; 26 | } 27 | if (value >= negFrom && value <= negTo) { 28 | console.log("NEGATIVE", value, negFrom); 29 | console.log("RESULT ohne", (value - negFrom + 1)); 30 | console.log("RESULT mit", (value - negFrom + 1) * -1); 31 | return (value - negFrom + 1) * -1; 32 | } 33 | } 34 | 35 | function mapValue(value, fromLow, fromHigh, toLow, toHigh) { 36 | const percent = (value - fromLow) / (fromHigh - fromLow); 37 | const result = percent * (toHigh - toLow) + toLow; 38 | return Math.min(Math.max(result, toLow), toHigh); 39 | } 40 | 41 | function stringToAsciiHex(str) { 42 | let hexString = ""; 43 | for (let i = 0; i < str.length; i++) { 44 | const asciiValue = str.charCodeAt(i); 45 | const hexValue = asciiValue.toString(16).padStart(2, "0"); 46 | hexString += hexValue + " "; 47 | } 48 | return hexString; 49 | } 50 | 51 | function numberIntoHex(nr) { 52 | return nr.toString(16).padStart(2, "0"); 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pam-osc 2 | Controll Grandma3 with Midi Decvices over Open Stage Control and a Plugin to get Feedback for Motorfaders and Button lights. 3 | 4 | 5 | Features: 6 | - Send Midi Fader, Encoder and Button Values to Grandma3 Executor on Current Page 7 | - It Uses What you see in the Playback (you can configure Master, Speed, Temp, etc. in Grandma) 8 | - Send Commands, control Atributes and execute QuickKeys 9 | - Fader Feedback for Motorized Faders 10 | - LED Button Feedback for Running Sequences and Highlight, etc. 11 | - LED Displays with current Sequence and Cue on the xTouch. 12 | 13 | Youtube Video 16 | 17 | ## Might not be stable 18 | This is not intentional made for Producion Purposes. 19 | 20 | If you want to use it on a Job, make sure you tested it well in your enviroment before running it on a job. 21 | 22 | It is Still in Beta & uses a lot of Recources, what could create Performance issues during the Show. 23 | 24 | Tested with Grandma3 Version 2.3.1.1 25 | 26 | ## How to Setup 27 | 28 | [Setup Instructions](https://github.com/xxpasixx/pam-osc/wiki/Setup) 29 | 30 | ## Knewn Limetations 31 | Currently it is only possible to give Midi Feedback for Channel 1. 32 | 33 | ## Found an Issue ? 34 | Issues could happen. Please create a [Ticket](https://github.com/xxpasixx/pam-osc/issues) if you find something. 35 | 36 | ### TODO: Create Help for Common Issues 37 | Make Sure the IP's are all correct and the PC is the Session Master. 38 | 39 | ## Upcomming things 40 | - more predefined Devices 41 | - colourd button feedback 42 | - ~~easyer installation~~ 43 | - autostart documentation 44 | - ~~better Plugin Management in MA (Configuration via GUI)~~ 45 | - ~~dont move Fader when Flash~~ 46 | - ~~force reload on OSC Start~~ 47 | - ~~LED Status should be send frequently (XTouch Issues)~~ 48 | - add for LED Feedback: Freeze & Prvw 49 | - add for LED Feedback: Fixture, Channel, Edit, Update, Align, At, Clear 50 | - ~~update Ports in Documentation and preConfig~~ 51 | - u~~pdate to configure IP in OSC GUI~~ 52 | - Dynamic Attribute Encoder https://forum.malighting.com/forum/thread/9089-get-encoder-pool-in-lua-plugin 53 | 54 | -------------------------------------------------------------------------------- /colorUtils.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 xxpasixx 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | function parseColorString(colorString) { 17 | const colorValues = colorString.split(";"); 18 | return { 19 | red: parseInt(colorValues[0]), 20 | green: parseInt(colorValues[1]), 21 | blue: parseInt(colorValues[2]), 22 | alpha: parseInt(colorValues[3]), 23 | }; 24 | } 25 | 26 | function findNearestDisplayColor(color) { 27 | const { red, green, blue, alpha } = color; 28 | 29 | if ((red === 0 && green === 0 && blue === 0) || alpha === 0) { 30 | return "00"; 31 | } 32 | 33 | const displayColors = [ 34 | { name: "red", id: "01", red: 255, green: 0, blue: 0 }, 35 | { name: "green", id: "02", red: 0, green: 255, blue: 0 }, 36 | { name: "yellow", id: "03", red: 255, green: 255, blue: 0 }, 37 | { name: "blue", id: "04", red: 0, green: 0, blue: 255 }, 38 | { name: "magenta", id: "05", red: 255, green: 0, blue: 255 }, 39 | { name: "cyan", id: "06", red: 0, green: 255, blue: 255 }, 40 | { name: "white", id: "07", red: 255, green: 255, blue: 255 }, 41 | ]; 42 | 43 | function colorDistance(color1, color2) { 44 | const deltaR = color1.red - color2.red; 45 | const deltaG = color1.green - color2.green; 46 | const deltaB = color1.blue - color2.blue; 47 | return Math.sqrt(deltaR * deltaR + deltaG * deltaG + deltaB * deltaB); 48 | } 49 | 50 | let nearestIndex = 0; 51 | let minDistance = colorDistance({ red, green, blue }, displayColors[0]); 52 | 53 | for (let i = 1; i < displayColors.length; i++) { 54 | const distance = colorDistance({ red, green, blue }, displayColors[i]); 55 | if (distance < minDistance) { 56 | minDistance = distance; 57 | nearestIndex = i; 58 | } 59 | } 60 | 61 | return displayColors[nearestIndex].id; 62 | } 63 | 64 | module.exports = { 65 | parseColorString: parseColorString, 66 | findNearestDisplayColor: findNearestDisplayColor, 67 | }; 68 | -------------------------------------------------------------------------------- /midiUtils.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 xxpasixx 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | const utils = require("./utils.js"); 17 | const routingUtils = require("./routingUtils.js"); 18 | 19 | module.exports = { 20 | sendNoteResponse: sendNoteResponse, 21 | sendAttributeLED: sendAttributeLED, 22 | sendSegment: sendSegment, 23 | resetSegments: resetSegments, 24 | updateSegmentsBySlot: updateSegmentsBySlot, 25 | sendPermanentFeedback: sendPermanentFeedback, 26 | }; 27 | 28 | function sendNoteResponse(routing, midiDeviceName, ctrl, value, buttonFeedbackMapper, midiChannel = 1) { 29 | // for the MC mode, it is required to send a note on with velocity 0 30 | if (routing[midiDeviceName].mode == "mc" && value == "Off") { 31 | send("midi", midiDeviceName, "/sysex", "90" + utils.numberIntoHex(ctrl) + " 00"); 32 | return; 33 | } 34 | 35 | const mapper = buttonFeedbackMapper || routing[midiDeviceName].buttonFeedbackMapper; 36 | const mappedValue = typeof value === "string" ? mapper(value) : value; 37 | 38 | send("midi", midiDeviceName, "/note", midiChannel, ctrl, mappedValue); 39 | } 40 | 41 | function sendAttributeLED(routing, currentAttribute) { 42 | routingUtils.getRoutingNoteWithAttribute(routing).forEach((mapping) => { 43 | const value = currentAttribute.toLocaleLowerCase() == mapping.attribute.toLocaleLowerCase(); 44 | sendNoteResponse(routing, mapping.device, mapping.midiId, value ? "On" : "Off"); 45 | }); 46 | } 47 | 48 | function sendSegment(routing, midiDeviceName, segment, value) { 49 | if (routing[midiDeviceName].mode !== "mc") return; 50 | 51 | send("midi", midiDeviceName, "/control", 1, 75 - segment, value.toString().charCodeAt(0)); 52 | } 53 | 54 | function resetSegments(routing, midiDeviceName) { 55 | if (routing[midiDeviceName].mode !== "mc") return; 56 | 57 | for (let i = 0; i < 12; i++) { 58 | send("midi", midiDeviceName, "/control", 1, 75 - i, 0); 59 | } 60 | } 61 | 62 | function updateSegmentsBySlot(routing, slot) { 63 | const updateSegs = (startingSeg, value) => { 64 | for (let name of Object.keys(routing)) { 65 | for (let i = 0; i < value.length; i++) { 66 | sendSegment(routing, name, i + startingSeg, value.charAt(i)); 67 | } 68 | } 69 | }; 70 | 71 | updateSegs(9, slot.mili.padEnd(2, "0")); 72 | updateSegs(7, slot.secs.padStart(2, "0")); 73 | updateSegs(5, slot.mins.padStart(2, "0")); 74 | updateSegs(2, slot.hrs.padStart(3, "0")); 75 | } 76 | 77 | function sendPermanentFeedback(routing) { 78 | for (let name of Object.keys(routing)) { 79 | const device = routing[name]; 80 | for (let midiNote of Object.keys(device.note)) { 81 | const note = device.note[midiNote]; 82 | if (note.permanentFeedback) { 83 | const midiChannel = note.midiChannel || device.midiChannel || 1; 84 | sendNoteResponse(routing, name, parseInt(midiNote), note.permanentFeedback, null, midiChannel); 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /routingUtils.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 xxpasixx 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | module.exports = { 17 | getRoutingByControlerId: getRoutingByControlerId, 18 | getRoutingByRltvControlerId: getRoutingByRltvControlerId, 19 | getRoutingByPitchId: getRoutingByPitchId, 20 | getRoutingByDisplayId: getRoutingByDisplayId, 21 | getRoutingNoteByExecId: getRoutingNoteByExecId, 22 | getRoutingNoteByCMD: getRoutingNoteByCMD, 23 | getRoutingNoteWithAttribute: getRoutingNoteWithAttribute, 24 | }; 25 | 26 | function getRoutingByControlerId(routing, id) { 27 | const returnArray = []; 28 | Object.keys(routing).forEach((device) => { 29 | const controls = Object.keys(routing[device].control).map((controlId) => ({ 30 | id: controlId, 31 | value: routing[device].control[controlId], 32 | })); 33 | controls.forEach((control) => { 34 | if (control.value === id || "" + control.value === "" + id) { 35 | returnArray.push({ 36 | device: device, 37 | midiId: parseInt(control.id), 38 | }); 39 | return; 40 | } 41 | }); 42 | }); 43 | return returnArray; 44 | } 45 | 46 | function getRoutingByRltvControlerId(routing, id) { 47 | const returnArray = []; 48 | Object.keys(routing).forEach((device) => { 49 | if (!routing[device].rltvControl) return; 50 | const controls = Object.keys(routing[device].rltvControl).map((controlId) => ({ 51 | id: controlId, 52 | value: routing[device].rltvControl[controlId].exec, 53 | ...routing[device].rltvControl[controlId], 54 | })); 55 | controls.forEach((control) => { 56 | if (control.value === id || "" + control.value === "" + id) { 57 | returnArray.push({ 58 | device: device, 59 | id: parseInt(control.id), 60 | midiId: control.returnChannel, 61 | from: control.returnFrom, 62 | to: control.returnTo, 63 | }); 64 | return; 65 | } 66 | }); 67 | }); 68 | return returnArray; 69 | } 70 | 71 | function getRoutingByPitchId(routing, id) { 72 | const returnArray = []; 73 | Object.keys(routing).forEach((device) => { 74 | if (!routing[device].pitch) return; 75 | const pitchs = Object.keys(routing[device].pitch).map((pitchID) => ({ 76 | id: pitchID, 77 | value: routing[device].pitch[pitchID], 78 | })); 79 | pitchs.forEach((pitch) => { 80 | if (pitch.value === id || "" + pitch.value === "" + id) { 81 | returnArray.push({ 82 | device: device, 83 | midiId: parseInt(pitch.id), 84 | }); 85 | return; 86 | } 87 | }); 88 | }); 89 | return returnArray; 90 | } 91 | 92 | function getRoutingByDisplayId(routing, id) { 93 | const returnArray = []; 94 | Object.keys(routing).forEach((device) => { 95 | if (!routing[device].display) return; 96 | const displays = Object.keys(routing[device].display).map((displayID) => ({ 97 | id: displayID, 98 | value: routing[device].display[displayID], 99 | })); 100 | displays.forEach((display) => { 101 | if (display.value === id || "" + display.value === "" + id) { 102 | returnArray.push({ 103 | device: device, 104 | displayId: parseInt(display.id), 105 | }); 106 | return; 107 | } 108 | }); 109 | }); 110 | return returnArray; 111 | } 112 | 113 | function getRoutingNoteByExecId(routing, execId) { 114 | const returnArray = []; 115 | Object.keys(routing).forEach((device) => { 116 | const filteredNotes = Object.entries(routing[device].note).filter(([noteId, note]) => note.exec == execId); 117 | 118 | filteredNotes.forEach(([noteId, note]) => { 119 | const midiChannel = note.midiChannel || routing[device].midiChannel || 1; 120 | returnArray.push({ 121 | device: device, 122 | midiId: parseInt(noteId), 123 | buttonFeedbackMapper: note.buttonFeedbackMapper || routing[device].buttonFeedbackMapper, 124 | midiChannel, 125 | ...note, 126 | }); 127 | }); 128 | }); 129 | return returnArray; 130 | } 131 | 132 | function getRoutingNoteByCMD(routing, cmd) { 133 | const returnArray = []; 134 | Object.keys(routing).forEach((device) => { 135 | const filteredNotes = Object.entries(routing[device].note).filter( 136 | ([noteId, note]) => note.cmd?.toLowerCase() == cmd.toLowerCase() 137 | ); 138 | 139 | filteredNotes.forEach(([noteId, note]) => { 140 | returnArray.push({ 141 | device: device, 142 | midiId: parseInt(noteId), 143 | buttonFeedbackMapper: note.buttonFeedbackMapper || routing[device].buttonFeedbackMapper, 144 | ...note, 145 | }); 146 | }); 147 | }); 148 | return returnArray; 149 | } 150 | 151 | function getRoutingNoteWithAttribute(routing) { 152 | const returnArray = []; 153 | Object.keys(routing).forEach((device) => { 154 | const notes = Object.keys(routing[device].note).map((noteId) => ({ 155 | id: noteId, 156 | value: routing[device].note[noteId].attribute, 157 | })); 158 | notes.forEach((note) => { 159 | if (!note.value) { 160 | return; 161 | } 162 | returnArray.push({ 163 | device: device, 164 | midiId: parseInt(note.id), 165 | buttonFeedbackMapper: routing[device].buttonFeedbackMapper, 166 | attribute: note.value, 167 | }); 168 | }); 169 | }); 170 | return returnArray; 171 | } 172 | -------------------------------------------------------------------------------- /mappings/akiApcMini2.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": { 3 | "48": "201", 4 | "49": "202", 5 | "50": "203", 6 | "51": "204", 7 | "52": "205", 8 | "53": "206", 9 | "54": "207", 10 | "55": "208", 11 | "56": "209" 12 | }, 13 | "note": { 14 | "0": { 15 | "quicKey": "GO", 16 | "minValue": 100 17 | }, 18 | "1": { 19 | "quicKey": "UPDATE", 20 | "minValue": 100 21 | }, 22 | "3": { 23 | "quicKey": "STORE", 24 | "minValue": 100 25 | }, 26 | "4": { 27 | "quicKey": "MA1", 28 | "minValue": 100 29 | }, 30 | "5": { 31 | "quicKey": "SLASH", 32 | "minValue": 100 33 | }, 34 | "7": { 35 | "quicKey": "PLEASE", 36 | "minValue": 100 37 | }, 38 | "8": { 39 | "quicKey": "GOBACK", 40 | "minValue": 100 41 | }, 42 | "9": { 43 | "quicKey": "EDIT", 44 | "minValue": 100 45 | }, 46 | "10": { 47 | "quicKey": "ASSIGN", 48 | "minValue": 100 49 | }, 50 | "11": { 51 | "quicKey": "TIME", 52 | "minValue": 100 53 | }, 54 | "12": { 55 | "quicKey": "NUM0", 56 | "minValue": 100 57 | }, 58 | "13": { 59 | "quicKey": "DOT", 60 | "minValue": 100 61 | }, 62 | "14": { 63 | "quicKey": "IF", 64 | "minValue": 100 65 | }, 66 | "15": { 67 | "quicKey": "AT", 68 | "minValue": 100 69 | }, 70 | "16": { 71 | "quicKey": "PAUSE", 72 | "minValue": 100 73 | }, 74 | "17": { 75 | "quicKey": "PRESET", 76 | "minValue": 100 77 | }, 78 | "18": { 79 | "quicKey": "SEQUENCE", 80 | "minValue": 100 81 | }, 82 | "19": { 83 | "quicKey": "CUE", 84 | "minValue": 100 85 | }, 86 | "20": { 87 | "quicKey": "NUM1", 88 | "minValue": 100 89 | }, 90 | "21": { 91 | "quicKey": "NUM2", 92 | "minValue": 100 93 | }, 94 | "22": { 95 | "quicKey": "NUM3", 96 | "minValue": 100 97 | }, 98 | "23": { 99 | "quicKey": "MINUS", 100 | "minValue": 100 101 | }, 102 | "24": { 103 | "quicKey": "PAGE_DOWN", 104 | "minValue": 100 105 | }, 106 | "25": { 107 | "cmd": "FIXTURE", 108 | "minValue": 100 109 | }, 110 | "26": { 111 | "quicKey": "CHANNEL", 112 | "minValue": 100 113 | }, 114 | "27": { 115 | "quicKey": "GROUP", 116 | "minValue": 100 117 | }, 118 | "28": { 119 | "quicKey": "NUM4", 120 | "minValue": 100 121 | }, 122 | "29": { 123 | "quicKey": "NUM5", 124 | "minValue": 100 125 | }, 126 | "30": { 127 | "quicKey": "NUM6", 128 | "minValue": 100 129 | }, 130 | "31": { 131 | "quicKey": "THRU", 132 | "minValue": 100 133 | }, 134 | "32": { 135 | "quicKey": "PAGE_UP", 136 | "minValue": 100 137 | }, 138 | "33": { 139 | "quicKey": "LEARN", 140 | "minValue": 100 141 | }, 142 | "34": { 143 | "quicKey": "<<<<", 144 | "minValue": 100 145 | }, 146 | "35": { 147 | "quicKey": ">>>>", 148 | "minValue": 100 149 | }, 150 | "36": { 151 | "quicKey": "NUM7", 152 | "minValue": 100 153 | }, 154 | "37": { 155 | "quicKey": "NUM8", 156 | "minValue": 100 157 | }, 158 | "38": { 159 | "quicKey": "NUM9", 160 | "minValue": 100 161 | }, 162 | "39": { 163 | "quicKey": "PLUS", 164 | "minValue": 100 165 | }, 166 | "40": { 167 | "quicKey": "SELFIX", 168 | "minValue": 100 169 | }, 170 | "41": { 171 | "quicKey": "DOWN", 172 | "minValue": 100 173 | }, 174 | "42": { 175 | "quicKey": "FREEZE", 176 | "minValue": 100 177 | }, 178 | "44": { 179 | "quicKey": "SELECT", 180 | "minValue": 100 181 | }, 182 | "45": { 183 | "quicKey": "GOTO", 184 | "minValue": 100 185 | }, 186 | "48": { 187 | "quicKey": "Set", 188 | "minValue": 100 189 | }, 190 | "49": { 191 | "quicKey": "UP", 192 | "minValue": 100 193 | }, 194 | "50": { 195 | "quicKey": "SOLO", 196 | "minValue": 100 197 | }, 198 | "51": { 199 | "quicKey": "BLIND", 200 | "minValue": 100 201 | }, 202 | "52": { 203 | "quicKey": "DELETE", 204 | "minValue": 100 205 | }, 206 | "53": { 207 | "quicKey": "ALIGN", 208 | "minValue": 100 209 | }, 210 | "54": { 211 | "quicKey": "STOMP", 212 | "minValue": 100 213 | }, 214 | "55": { 215 | "quicKey": "HELP", 216 | "minValue": 100 217 | }, 218 | "56": { 219 | "cmd": "PREV", 220 | "minValue": 100 221 | }, 222 | "57": { 223 | "cmd": "NEXT", 224 | "minValue": 100 225 | }, 226 | "58": { 227 | "cmd": "HIGHLIGHT", 228 | "minValue": 100 229 | }, 230 | "59": { 231 | "quicKey": "PREVIEW", 232 | "minValue": 100 233 | }, 234 | "60": { 235 | "quicKey": "ON", 236 | "minValue": 100 237 | }, 238 | "61": { 239 | "quicKey": "OFF", 240 | "minValue": 100 241 | }, 242 | "62": { 243 | "cmd": "MOVE", 244 | "minValue": 100 245 | }, 246 | "63": { 247 | "quicKey": "COPY", 248 | "minValue": 100 249 | }, 250 | "64": { 251 | "exec": 201 252 | }, 253 | "65": { 254 | "exec": 202 255 | }, 256 | "66": { 257 | "exec": 203 258 | }, 259 | "67": { 260 | "exec": 204 261 | }, 262 | "68": { 263 | "exec": 205 264 | }, 265 | "69": { 266 | "exec": 206 267 | }, 268 | "70": { 269 | "exec": 207 270 | }, 271 | "71": { 272 | "exec": 208 273 | }, 274 | "82": { 275 | "quicKey": "ESC", 276 | "minValue": 100 277 | }, 278 | "83": { 279 | "cmd": "CLEAR", 280 | "minValue": 100 281 | }, 282 | "84": { 283 | "quicKey": "XKEYS", 284 | "minValue": 100 285 | }, 286 | "85": { 287 | "quicKey": "LIST", 288 | "minValue": 100 289 | }, 290 | "86": { 291 | "quicKey": "MENU", 292 | "minValue": 100 293 | }, 294 | "88": { 295 | "cmd": "OOPS", 296 | "minValue": 100 297 | }, 298 | "89": { 299 | "cmd": "FULL", 300 | "minValue": 100 301 | }, 302 | "98": { 303 | "exec": 209 304 | } 305 | } 306 | } -------------------------------------------------------------------------------- /mappings/LaunchPad-TriFlats.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": { 3 | "104": "201", 4 | "105": "202", 5 | "106": "203", 6 | "107": "204", 7 | "108": "205", 8 | "109": "206", 9 | "110": "207", 10 | "111": "208" 11 | }, 12 | "note": { 13 | "11": { 14 | "exec": 101, 15 | "permanentFeedback": 21 16 | }, 17 | "12": { 18 | "exec": 102, 19 | "permanentFeedback": 21 20 | }, 21 | "13": { 22 | "exec": 103, 23 | "permanentFeedback": 21 24 | }, 25 | "14": { 26 | "exec": 104, 27 | "permanentFeedback": 21 28 | }, 29 | "15": { 30 | "exec": 105, 31 | "permanentFeedback": 21 32 | }, 33 | "16": { 34 | "exec": 106, 35 | "permanentFeedback": 21 36 | }, 37 | "17": { 38 | "exec": 107, 39 | "permanentFeedback": 21 40 | }, 41 | "18": { 42 | "exec": 108, 43 | "permanentFeedback": 21 44 | }, 45 | "19": { 46 | "quicKey": "Store", 47 | "minValue": 100, 48 | "permanentFeedback": 21 49 | }, 50 | "21": { 51 | "exec": 301, 52 | "permanentFeedback": 45 53 | }, 54 | "22": { 55 | "exec": 302, 56 | "permanentFeedback": 45 57 | }, 58 | "23": { 59 | "exec": 303, 60 | "permanentFeedback": 45 61 | }, 62 | "24": { 63 | "exec": 304, 64 | "permanentFeedback": 45 65 | }, 66 | "25": { 67 | "exec": 305, 68 | "permanentFeedback": 45 69 | }, 70 | "26": { 71 | "exec": 306, 72 | "permanentFeedback": 45 73 | }, 74 | "27": { 75 | "exec": 307, 76 | "permanentFeedback": 45 77 | }, 78 | "28": { 79 | "exec": 308, 80 | "permanentFeedback": 45 81 | }, 82 | "29": { 83 | "quicKey": "Clear", 84 | "minValue": 100, 85 | "permanentFeedback": 9 86 | }, 87 | "31": { 88 | "exec": 401, 89 | "permanentFeedback": 5 90 | }, 91 | "32": { 92 | "exec": 402, 93 | "permanentFeedback": 5 94 | }, 95 | "33": { 96 | "exec": 403, 97 | "permanentFeedback": 5 98 | }, 99 | "34": { 100 | "exec": 404, 101 | "permanentFeedback": 5 102 | }, 103 | "35": { 104 | "exec": 405, 105 | "permanentFeedback": 5 106 | }, 107 | "36": { 108 | "exec": 406, 109 | "permanentFeedback": 5 110 | }, 111 | "37": { 112 | "exec": 407, 113 | "permanentFeedback": 5 114 | }, 115 | "38": { 116 | "exec": 408, 117 | "permanentFeedback": 5 118 | }, 119 | "39": { 120 | "quicKey": "Off", 121 | "minValue": 100, 122 | "permanentFeedback": 5 123 | }, 124 | "41": { 125 | "cmd": "At Preset 2.1", 126 | "minValue": 100, 127 | "permanentFeedback": 13 128 | }, 129 | "42": { 130 | "cmd": "At Preset 2.2", 131 | "minValue": 100, 132 | "permanentFeedback": 13 133 | }, 134 | "43": { 135 | "cmd": "At Preset 2.3", 136 | "minValue": 100, 137 | "permanentFeedback": 13 138 | }, 139 | "44": { 140 | "cmd": "At Preset 2.4", 141 | "minValue": 100, 142 | "permanentFeedback": 13 143 | }, 144 | "45": { 145 | "cmd": "At Preset 2.5", 146 | "minValue": 100, 147 | "permanentFeedback": 13 148 | }, 149 | "46": { 150 | "cmd": "At Preset 6.1", 151 | "minValue": 100, 152 | "permanentFeedback": 33 153 | }, 154 | "47": { 155 | "cmd": "At Preset 6.3", 156 | "minValue": 100, 157 | "permanentFeedback": 33 158 | }, 159 | "48": { 160 | "cmd": "At Preset 6.5", 161 | "minValue": 100, 162 | "permanentFeedback": 33 163 | }, 164 | "49": { 165 | "quicKey": "Oops", 166 | "minValue": 100, 167 | "permanentFeedback": 9 168 | }, 169 | "51": { 170 | "cmd": "At Preset 4.9", 171 | "minValue": 100, 172 | "permanentFeedback": 41 173 | }, 174 | "52": { 175 | "cmd": "At Preset 4.10", 176 | "minValue": 100, 177 | "permanentFeedback": 45 178 | }, 179 | "53": { 180 | "cmd": "At Preset 4.11", 181 | "minValue": 100, 182 | "permanentFeedback": 49 183 | }, 184 | "54": { 185 | "cmd": "At Preset 4.12", 186 | "minValue": 100, 187 | "permanentFeedback": 53 188 | }, 189 | "55": { 190 | "cmd": "At Preset 4.13", 191 | "minValue": 100, 192 | "permanentFeedback": 57 193 | }, 194 | "56": { 195 | "cmd": "At Preset 4.14", 196 | "minValue": 100, 197 | "permanentFeedback": 11 198 | }, 199 | "57": { 200 | "cmd": "At Preset 4.15", 201 | "minValue": 100, 202 | "permanentFeedback": 11 203 | }, 204 | "58": { 205 | "cmd": "At Preset 4.16", 206 | "minValue": 100, 207 | "permanentFeedback": 11 208 | }, 209 | "59": { 210 | "quicKey": "Please", 211 | "minValue": 100, 212 | "permanentFeedback": 21 213 | }, 214 | "61": { 215 | "cmd": "At Preset 4.1", 216 | "minValue": 100, 217 | "permanentFeedback": 3 218 | }, 219 | "62": { 220 | "cmd": "At Preset 4.2", 221 | "minValue": 100, 222 | "permanentFeedback": 5 223 | }, 224 | "63": { 225 | "cmd": "At Preset 4.3", 226 | "minValue": 100, 227 | "permanentFeedback": 9 228 | }, 229 | "64": { 230 | "cmd": "At Preset 4.4", 231 | "minValue": 100, 232 | "permanentFeedback": 13 233 | }, 234 | "65": { 235 | "cmd": "At Preset 4.5", 236 | "minValue": 100, 237 | "permanentFeedback": 17 238 | }, 239 | "66": { 240 | "cmd": "At Preset 4.6", 241 | "minValue": 100, 242 | "permanentFeedback": 21 243 | }, 244 | "67": { 245 | "cmd": "At Preset 4.7", 246 | "minValue": 100, 247 | "permanentFeedback": 29 248 | }, 249 | "68": { 250 | "cmd": "At Preset 4.8", 251 | "minValue": 100, 252 | "permanentFeedback": 37 253 | }, 254 | "69": { 255 | "quicKey": "Esc", 256 | "minValue": 100, 257 | "permanentFeedback": 49 258 | }, 259 | "71": { 260 | "cmd": "At Preset 1.1", 261 | "minValue": 100, 262 | "permanentFeedback": 0 263 | }, 264 | "72": { 265 | "cmd": "At Preset 1.4", 266 | "minValue": 100, 267 | "permanentFeedback": 1 268 | }, 269 | "73": { 270 | "cmd": "At Preset 1.7", 271 | "minValue": 100, 272 | "permanentFeedback": 2 273 | }, 274 | "74": { 275 | "cmd": "At Preset 1.10", 276 | "minValue": 100, 277 | "permanentFeedback": 2 278 | }, 279 | "75": { 280 | "cmd": "At Preset 1.13", 281 | "minValue": 100, 282 | "permanentFeedback": 3 283 | }, 284 | "76": { 285 | "cmd": "At Preset 1.20", 286 | "minValue": 100, 287 | "permanentFeedback": 11 288 | }, 289 | "77": { 290 | "cmd": "At Preset 1.21", 291 | "minValue": 100, 292 | "permanentFeedback": 11 293 | }, 294 | "78": { 295 | "cmd": "At Preset 1.22", 296 | "minValue": 100, 297 | "permanentFeedback": 11 298 | }, 299 | "79": { 300 | "cmd": "EditRecipe Programmer", 301 | "minValue": 100, 302 | "permanentFeedback": 45 303 | }, 304 | "81": { 305 | "cmd": "Fixture 302", 306 | "minValue": 100, 307 | "permanentFeedback": 1 308 | }, 309 | "82": { 310 | "cmd": "Fixture 303", 311 | "minValue": 100, 312 | "permanentFeedback": 1 313 | }, 314 | "83": { 315 | "cmd": "Fixture 304", 316 | "minValue": 100, 317 | "permanentFeedback": 1 318 | }, 319 | "84": { 320 | "cmd": "Fixture 305", 321 | "minValue": 100, 322 | "permanentFeedback": 1 323 | }, 324 | "85": { 325 | "cmd": "Fixture 306", 326 | "minValue": 100, 327 | "permanentFeedback": 1 328 | }, 329 | "86": { 330 | "cmd": "Fixture 307", 331 | "minValue": 100, 332 | "permanentFeedback": 1 333 | }, 334 | "87": { 335 | "cmd": "Fixture 308", 336 | "minValue": 100, 337 | "permanentFeedback": 1 338 | }, 339 | "88": { 340 | "cmd": "Fixture 309", 341 | "minValue": 100, 342 | "permanentFeedback": 1 343 | }, 344 | "89": { 345 | "cmd": "SaveShow", 346 | "minValue": 100, 347 | "permanentFeedback": 21 348 | } 349 | } 350 | } -------------------------------------------------------------------------------- /mappings/LaunchPad-Playback.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": { 3 | "104": "201", 4 | "105": "202", 5 | "106": "203", 6 | "107": "204", 7 | "108": "205", 8 | "109": "206", 9 | "110": "207", 10 | "111": "208" 11 | }, 12 | "note": { 13 | "11": { 14 | "exec": 101, 15 | "permanentFeedback": 21 16 | }, 17 | "12": { 18 | "exec": 102, 19 | "permanentFeedback": 21 20 | }, 21 | "13": { 22 | "exec": 103, 23 | "permanentFeedback": 21 24 | }, 25 | "14": { 26 | "exec": 104, 27 | "permanentFeedback": 21 28 | }, 29 | "15": { 30 | "exec": 105, 31 | "permanentFeedback": 21 32 | }, 33 | "16": { 34 | "exec": 106, 35 | "permanentFeedback": 21 36 | }, 37 | "17": { 38 | "exec": 107, 39 | "permanentFeedback": 21 40 | }, 41 | "18": { 42 | "exec": 108, 43 | "permanentFeedback": 21 44 | }, 45 | "19": { 46 | "quicKey": "Store", 47 | "minValue": 100, 48 | "permanentFeedback": 21 49 | }, 50 | "21": { 51 | "exec": 301, 52 | "permanentFeedback": 45 53 | }, 54 | "22": { 55 | "exec": 302, 56 | "permanentFeedback": 45 57 | }, 58 | "23": { 59 | "exec": 303, 60 | "permanentFeedback": 45 61 | }, 62 | "24": { 63 | "exec": 304, 64 | "permanentFeedback": 45 65 | }, 66 | "25": { 67 | "exec": 305, 68 | "permanentFeedback": 45 69 | }, 70 | "26": { 71 | "exec": 306, 72 | "permanentFeedback": 45 73 | }, 74 | "27": { 75 | "exec": 307, 76 | "permanentFeedback": 45 77 | }, 78 | "28": { 79 | "exec": 308, 80 | "permanentFeedback": 45 81 | }, 82 | "29": { 83 | "quicKey": "Clear", 84 | "minValue": 100, 85 | "permanentFeedback": 9 86 | }, 87 | "31": { 88 | "exec": 401, 89 | "permanentFeedback": 5 90 | }, 91 | "32": { 92 | "exec": 402, 93 | "permanentFeedback": 5 94 | }, 95 | "33": { 96 | "exec": 403, 97 | "permanentFeedback": 5 98 | }, 99 | "34": { 100 | "exec": 404, 101 | "permanentFeedback": 5 102 | }, 103 | "35": { 104 | "exec": 405, 105 | "permanentFeedback": 5 106 | }, 107 | "36": { 108 | "exec": 406, 109 | "permanentFeedback": 5 110 | }, 111 | "37": { 112 | "exec": 407, 113 | "permanentFeedback": 5 114 | }, 115 | "38": { 116 | "exec": 408, 117 | "permanentFeedback": 5 118 | }, 119 | "39": { 120 | "quicKey": "Off", 121 | "minValue": 100, 122 | "permanentFeedback": 5 123 | }, 124 | "41": { 125 | "cmd": "At Preset 2.1", 126 | "minValue": 100, 127 | "permanentFeedback": 13 128 | }, 129 | "42": { 130 | "cmd": "At Preset 2.2", 131 | "minValue": 100, 132 | "permanentFeedback": 13 133 | }, 134 | "43": { 135 | "cmd": "At Preset 2.3", 136 | "minValue": 100, 137 | "permanentFeedback": 13 138 | }, 139 | "44": { 140 | "cmd": "At Preset 2.4", 141 | "minValue": 100, 142 | "permanentFeedback": 13 143 | }, 144 | "45": { 145 | "cmd": "At Preset 2.5", 146 | "minValue": 100, 147 | "permanentFeedback": 13 148 | }, 149 | "46": { 150 | "cmd": "At Preset 6.1", 151 | "minValue": 100, 152 | "permanentFeedback": 33 153 | }, 154 | "47": { 155 | "cmd": "At Preset 6.3", 156 | "minValue": 100, 157 | "permanentFeedback": 33 158 | }, 159 | "48": { 160 | "cmd": "At Preset 6.5", 161 | "minValue": 100, 162 | "permanentFeedback": 33 163 | }, 164 | "49": { 165 | "quicKey": "Oops", 166 | "minValue": 100, 167 | "permanentFeedback": 9 168 | }, 169 | "51": { 170 | "cmd": "At Preset 4.9", 171 | "minValue": 100, 172 | "permanentFeedback": 41 173 | }, 174 | "52": { 175 | "cmd": "At Preset 4.10", 176 | "minValue": 100, 177 | "permanentFeedback": 45 178 | }, 179 | "53": { 180 | "cmd": "At Preset 4.11", 181 | "minValue": 100, 182 | "permanentFeedback": 49 183 | }, 184 | "54": { 185 | "cmd": "At Preset 4.12", 186 | "minValue": 100, 187 | "permanentFeedback": 53 188 | }, 189 | "55": { 190 | "cmd": "At Preset 4.13", 191 | "minValue": 100, 192 | "permanentFeedback": 57 193 | }, 194 | "56": { 195 | "cmd": "At Preset 4.14", 196 | "minValue": 100, 197 | "permanentFeedback": 11 198 | }, 199 | "57": { 200 | "cmd": "At Preset 4.15", 201 | "minValue": 100, 202 | "permanentFeedback": 11 203 | }, 204 | "58": { 205 | "cmd": "At Preset 4.16", 206 | "minValue": 100, 207 | "permanentFeedback": 11 208 | }, 209 | "59": { 210 | "quicKey": "Please", 211 | "minValue": 100, 212 | "permanentFeedback": 21 213 | }, 214 | "61": { 215 | "cmd": "At Preset 4.1", 216 | "minValue": 100, 217 | "permanentFeedback": 3 218 | }, 219 | "62": { 220 | "cmd": "At Preset 4.2", 221 | "minValue": 100, 222 | "permanentFeedback": 5 223 | }, 224 | "63": { 225 | "cmd": "At Preset 4.3", 226 | "minValue": 100, 227 | "permanentFeedback": 9 228 | }, 229 | "64": { 230 | "cmd": "At Preset 4.4", 231 | "minValue": 100, 232 | "permanentFeedback": 13 233 | }, 234 | "65": { 235 | "cmd": "At Preset 4.5", 236 | "minValue": 100, 237 | "permanentFeedback": 17 238 | }, 239 | "66": { 240 | "cmd": "At Preset 4.6", 241 | "minValue": 100, 242 | "permanentFeedback": 21 243 | }, 244 | "67": { 245 | "cmd": "At Preset 4.7", 246 | "minValue": 100, 247 | "permanentFeedback": 29 248 | }, 249 | "68": { 250 | "cmd": "At Preset 4.8", 251 | "minValue": 100, 252 | "permanentFeedback": 37 253 | }, 254 | "69": { 255 | "quicKey": "Esc", 256 | "minValue": 100, 257 | "permanentFeedback": 49 258 | }, 259 | "71": { 260 | "cmd": "At Preset 1.1", 261 | "minValue": 100, 262 | "permanentFeedback": 0 263 | }, 264 | "72": { 265 | "cmd": "At Preset 1.4", 266 | "minValue": 100, 267 | "permanentFeedback": 1 268 | }, 269 | "73": { 270 | "cmd": "At Preset 1.7", 271 | "minValue": 100, 272 | "permanentFeedback": 2 273 | }, 274 | "74": { 275 | "cmd": "At Preset 1.10", 276 | "minValue": 100, 277 | "permanentFeedback": 2 278 | }, 279 | "75": { 280 | "cmd": "At Preset 1.13", 281 | "minValue": 100, 282 | "permanentFeedback": 3 283 | }, 284 | "76": { 285 | "cmd": "At Preset 1.20", 286 | "minValue": 100, 287 | "permanentFeedback": 11 288 | }, 289 | "77": { 290 | "cmd": "At Preset 1.21", 291 | "minValue": 100, 292 | "permanentFeedback": 11 293 | }, 294 | "78": { 295 | "cmd": "At Preset 1.22", 296 | "minValue": 100, 297 | "permanentFeedback": 11 298 | }, 299 | "79": { 300 | "cmd": "EditRecipe Programmer", 301 | "minValue": 100, 302 | "permanentFeedback": 45 303 | }, 304 | "81": { 305 | "cmd": "SelectFixtures Group 7", 306 | "minValue": 100, 307 | "permanentFeedback": 21 308 | }, 309 | "82": { 310 | "cmd": "SelectFixtures Group 8", 311 | "minValue": 100, 312 | "permanentFeedback": 25 313 | }, 314 | "83": { 315 | "cmd": "SelectFixtures Group 9", 316 | "minValue": 100, 317 | "permanentFeedback": 17 318 | }, 319 | "84": { 320 | "cmd": "SelectFixtures Group 5", 321 | "minValue": 100, 322 | "permanentFeedback": 49 323 | }, 324 | "85": { 325 | "cmd": "SelectFixtures Group 6", 326 | "minValue": 100, 327 | "permanentFeedback": 53 328 | }, 329 | "86": { 330 | "cmd": "SelectFixtures Group 11", 331 | "minValue": 100, 332 | "permanentFeedback": 45 333 | }, 334 | "87": { 335 | "cmd": "SelectFixtures Group 12", 336 | "minValue": 100, 337 | "permanentFeedback": 41 338 | }, 339 | "88": { 340 | "cmd": "SelectFixtures Group 13", 341 | "minValue": 100, 342 | "permanentFeedback": 5 343 | }, 344 | "89": { 345 | "cmd": "SaveShow", 346 | "minValue": 100, 347 | "permanentFeedback": 21 348 | } 349 | } 350 | } -------------------------------------------------------------------------------- /mappings/xTouchCompact1.json: -------------------------------------------------------------------------------- 1 | { 2 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 3 | "control": { 4 | "1": 201, 5 | "2": 202, 6 | "3": 203, 7 | "4": 204, 8 | "5": 205, 9 | "6": 206, 10 | "7": 207, 11 | "8": 208, 12 | "9": 209, 13 | 14 | "10": 401, 15 | "11": 402, 16 | "12": 403, 17 | "13": 404, 18 | "14": 405, 19 | "15": 406, 20 | "16": 407, 21 | "17": 408, 22 | 23 | "18": 291, 24 | "19": 292, 25 | "20": 293, 26 | "21": 294, 27 | "22": 295, 28 | "23": 296, 29 | "24": 297, 30 | "25": 298, 31 | 32 | "28": 210, 33 | "29": 211, 34 | "30": 212, 35 | "31": 213, 36 | "32": 214, 37 | "33": 215, 38 | "34": 216, 39 | "35": 217, 40 | "36": 218 41 | }, 42 | "note": { 43 | "0": { 44 | "exec": 401 45 | }, 46 | "1": { 47 | "exec": 402 48 | }, 49 | "2": { 50 | "exec": 403 51 | }, 52 | "3": { 53 | "exec": 404 54 | }, 55 | "4": { 56 | "exec": 405 57 | }, 58 | "5": { 59 | "exec": 406 60 | }, 61 | "6": { 62 | "exec": 407 63 | }, 64 | "7": { 65 | "exec": 408 66 | }, 67 | "8": { 68 | "exec": 291 69 | }, 70 | "9": { 71 | "exec": 292 72 | }, 73 | "10": { 74 | "exec": 293 75 | }, 76 | "11": { 77 | "exec": 294 78 | }, 79 | "12": { 80 | "exec": 295 81 | }, 82 | "13": { 83 | "exec": 296 84 | }, 85 | "14": { 86 | "exec": 297 87 | }, 88 | "15": { 89 | "exec": 298 90 | }, 91 | "16": { 92 | "exec": 401 93 | }, 94 | "17": { 95 | "exec": 402 96 | }, 97 | "18": { 98 | "exec": 403 99 | }, 100 | "19": { 101 | "exec": 404 102 | }, 103 | "20": { 104 | "exec": 405 105 | }, 106 | "21": { 107 | "exec": 406 108 | }, 109 | "22": { 110 | "exec": 407 111 | }, 112 | "23": { 113 | "exec": 408 114 | }, 115 | "24": { 116 | "exec": 301 117 | }, 118 | "25": { 119 | "exec": 302 120 | }, 121 | "26": { 122 | "exec": 303 123 | }, 124 | "27": { 125 | "exec": 304 126 | }, 127 | "28": { 128 | "exec": 305 129 | }, 130 | "29": { 131 | "exec": 306 132 | }, 133 | "30": { 134 | "exec": 307 135 | }, 136 | "31": { 137 | "exec": 308 138 | }, 139 | "32": { 140 | "exec": 201 141 | }, 142 | "33": { 143 | "exec": 202 144 | }, 145 | "34": { 146 | "exec": 203 147 | }, 148 | "35": { 149 | "exec": 204 150 | }, 151 | "36": { 152 | "exec": 205 153 | }, 154 | "37": { 155 | "exec": 206 156 | }, 157 | "38": { 158 | "exec": 207 159 | }, 160 | "39": { 161 | "exec": 208 162 | }, 163 | "40": { 164 | "exec": 101 165 | }, 166 | "41": { 167 | "exec": 102 168 | }, 169 | "42": { 170 | "exec": 103 171 | }, 172 | "43": { 173 | "exec": 104 174 | }, 175 | "44": { 176 | "exec": 105 177 | }, 178 | "45": { 179 | "exec": 106 180 | }, 181 | "46": { 182 | "exec": 107 183 | }, 184 | "47": { 185 | "exec": 108 186 | }, 187 | "48": { 188 | "exec": 109 189 | }, 190 | "49": { 191 | "cmd": "Previous Page", 192 | "minValue": 100 193 | }, 194 | "50": { 195 | "cmd": "Next Page", 196 | "minValue": 100 197 | }, 198 | "51": { 199 | "exec": 319 200 | }, 201 | "52": { 202 | "exec": 320 203 | }, 204 | "53": { 205 | "exec": 119 206 | }, 207 | "54": { 208 | "exec": 120 209 | }, 210 | 211 | "55": { 212 | "exec": 410 213 | }, 214 | "56": { 215 | "exec": 411 216 | }, 217 | "57": { 218 | "exec": 412 219 | }, 220 | "58": { 221 | "exec": 413 222 | }, 223 | "59": { 224 | "exec": 414 225 | }, 226 | "60": { 227 | "exec": 415 228 | }, 229 | "61": { 230 | "exec": 416 231 | }, 232 | "62": { 233 | "exec": 417 234 | }, 235 | 236 | "63": { 237 | "exec": 191 238 | }, 239 | "64": { 240 | "exec": 192 241 | }, 242 | "65": { 243 | "exec": 193 244 | }, 245 | "66": { 246 | "exec": 194 247 | }, 248 | "67": { 249 | "exec": 195 250 | }, 251 | "68": { 252 | "exec": 196 253 | }, 254 | "69": { 255 | "exec": 197 256 | }, 257 | "70": { 258 | "exec": 198 259 | }, 260 | 261 | "71": { 262 | "exec": 410 263 | }, 264 | "72": { 265 | "exec": 411 266 | }, 267 | "73": { 268 | "exec": 412 269 | }, 270 | "74": { 271 | "exec": 413 272 | }, 273 | "75": { 274 | "exec": 414 275 | }, 276 | "76": { 277 | "exec": 415 278 | }, 279 | "77": { 280 | "exec": 416 281 | }, 282 | "78": { 283 | "exec": 417 284 | }, 285 | 286 | "79": { 287 | "exec": 310 288 | }, 289 | "80": { 290 | "exec": 311 291 | }, 292 | "81": { 293 | "exec": 312 294 | }, 295 | "82": { 296 | "exec": 313 297 | }, 298 | "83": { 299 | "exec": 314 300 | }, 301 | "84": { 302 | "exec": 315 303 | }, 304 | "85": { 305 | "exec": 316 306 | }, 307 | "86": { 308 | "exec": 317 309 | }, 310 | 311 | "87": { 312 | "exec": 210 313 | }, 314 | "88": { 315 | "exec": 211 316 | }, 317 | "89": { 318 | "exec": 212 319 | }, 320 | "90": { 321 | "exec": 213 322 | }, 323 | "91": { 324 | "exec": 214 325 | }, 326 | "92": { 327 | "exec": 215 328 | }, 329 | "93": { 330 | "exec": 216 331 | }, 332 | "94": { 333 | "exec": 217 334 | }, 335 | 336 | "95": { 337 | "exec": 110 338 | }, 339 | "96": { 340 | "exec": 111 341 | }, 342 | "97": { 343 | "exec": 112 344 | }, 345 | "98": { 346 | "exec": 113 347 | }, 348 | "99": { 349 | "exec": 114 350 | }, 351 | "100": { 352 | "exec": 115 353 | }, 354 | "101": { 355 | "exec": 116 356 | }, 357 | "102": { 358 | "exec": 117 359 | }, 360 | "103": { 361 | "exec": 118 362 | }, 363 | 364 | "104": { 365 | "cmd": "Previous Page", 366 | "minValue": 100 367 | }, 368 | "105": { 369 | "cmd": "Next Page", 370 | "minValue": 100 371 | }, 372 | "106": { 373 | "exec": 321 374 | }, 375 | "107": { 376 | "exec": 322 377 | }, 378 | "108": { 379 | "exec": 221 380 | }, 381 | "109": { 382 | "exec": 222 383 | } 384 | } 385 | } 386 | -------------------------------------------------------------------------------- /mappings/xTouchCompactRltv1.json: -------------------------------------------------------------------------------- 1 | { 2 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 3 | "control": { 4 | "1": 201, 5 | "2": 202, 6 | "3": 203, 7 | "4": 204, 8 | "5": 205, 9 | "6": 206, 10 | "7": 207, 11 | "8": 208, 12 | "9": 209, 13 | 14 | "10": 401, 15 | "11": 402, 16 | "12": 403, 17 | "13": 404, 18 | "14": 405, 19 | "15": 406, 20 | "16": 407, 21 | "17": 408, 22 | 23 | "28": 210, 24 | "29": 211, 25 | "30": 212, 26 | "31": 213, 27 | "32": 214, 28 | "33": 215, 29 | "34": 216, 30 | "35": 217, 31 | "36": 218 32 | }, 33 | 34 | "rltvControl": { 35 | "18": { 36 | "attribute": "dimmer", 37 | "posFrom": 1, 38 | "posTo": 7, 39 | "negFrom": 121, 40 | "negTo": 127, 41 | "amount": 1.0 42 | }, 43 | "19": { 44 | "attribute": "Gobo1", 45 | "posFrom": 1, 46 | "posTo": 7, 47 | "negFrom": 121, 48 | "negTo": 127, 49 | "amount": 1.0 50 | }, 51 | "20": { 52 | "attribute": "pan", 53 | "posFrom": 1, 54 | "posTo": 7, 55 | "negFrom": 121, 56 | "negTo": 127, 57 | "amount": 1.0 58 | }, 59 | "21": { 60 | "attribute": "tilt", 61 | "posFrom": 1, 62 | "posTo": 7, 63 | "negFrom": 121, 64 | "negTo": 127, 65 | "amount": 1.0 66 | }, 67 | "22": { 68 | "attribute": "ColorRGB_R", 69 | "posFrom": 1, 70 | "posTo": 7, 71 | "negFrom": 121, 72 | "negTo": 127, 73 | "amount": 1.0 74 | }, 75 | "23": { 76 | "attribute": "ColorRGB_G", 77 | "posFrom": 1, 78 | "posTo": 7, 79 | "negFrom": 121, 80 | "negTo": 127, 81 | "amount": 1.0 82 | }, 83 | "24": { 84 | "attribute": "ColorRGB_B", 85 | "posFrom": 1, 86 | "posTo": 7, 87 | "negFrom": 121, 88 | "negTo": 127, 89 | "amount": 1.0 90 | }, 91 | "25": { 92 | "attribute": "Color1", 93 | "posFrom": 1, 94 | "posTo": 7, 95 | "negFrom": 121, 96 | "negTo": 127, 97 | "amount": 1.0 98 | } 99 | }, 100 | "note": { 101 | "0": { 102 | "exec": 401 103 | }, 104 | "1": { 105 | "exec": 402 106 | }, 107 | "2": { 108 | "exec": 403 109 | }, 110 | "3": { 111 | "exec": 404 112 | }, 113 | "4": { 114 | "exec": 405 115 | }, 116 | "5": { 117 | "exec": 406 118 | }, 119 | "6": { 120 | "exec": 407 121 | }, 122 | "7": { 123 | "exec": 408 124 | }, 125 | 126 | "8": { 127 | "local": "encoderFine", 128 | "minValue": 100 129 | }, 130 | "9": { 131 | "local": "encoderRough", 132 | "minValue": 100 133 | }, 134 | "16": { 135 | "exec": 401 136 | }, 137 | "17": { 138 | "exec": 402 139 | }, 140 | "18": { 141 | "exec": 403 142 | }, 143 | "19": { 144 | "exec": 404 145 | }, 146 | "20": { 147 | "exec": 405 148 | }, 149 | "21": { 150 | "exec": 406 151 | }, 152 | "22": { 153 | "exec": 407 154 | }, 155 | "23": { 156 | "exec": 408 157 | }, 158 | "24": { 159 | "exec": 301 160 | }, 161 | "25": { 162 | "exec": 302 163 | }, 164 | "26": { 165 | "exec": 303 166 | }, 167 | "27": { 168 | "exec": 304 169 | }, 170 | "28": { 171 | "exec": 305 172 | }, 173 | "29": { 174 | "exec": 306 175 | }, 176 | "30": { 177 | "exec": 307 178 | }, 179 | "31": { 180 | "exec": 308 181 | }, 182 | "32": { 183 | "exec": 201 184 | }, 185 | "33": { 186 | "exec": 202 187 | }, 188 | "34": { 189 | "exec": 203 190 | }, 191 | "35": { 192 | "exec": 204 193 | }, 194 | "36": { 195 | "exec": 205 196 | }, 197 | "37": { 198 | "exec": 206 199 | }, 200 | "38": { 201 | "exec": 207 202 | }, 203 | "39": { 204 | "exec": 208 205 | }, 206 | "40": { 207 | "exec": 101 208 | }, 209 | "41": { 210 | "exec": 102 211 | }, 212 | "42": { 213 | "exec": 103 214 | }, 215 | "43": { 216 | "exec": 104 217 | }, 218 | "44": { 219 | "exec": 105 220 | }, 221 | "45": { 222 | "exec": 106 223 | }, 224 | "46": { 225 | "exec": 107 226 | }, 227 | "47": { 228 | "exec": 108 229 | }, 230 | "48": { 231 | "exec": 109 232 | }, 233 | "49": { 234 | "cmd": "Previous Page", 235 | "minValue": 100 236 | }, 237 | "50": { 238 | "cmd": "Next Page", 239 | "minValue": 100 240 | }, 241 | "51": { 242 | "exec": 319 243 | }, 244 | "52": { 245 | "exec": 320 246 | }, 247 | "53": { 248 | "exec": 119 249 | }, 250 | "54": { 251 | "exec": 120 252 | }, 253 | 254 | "55": { 255 | "exec": 410 256 | }, 257 | "56": { 258 | "exec": 411 259 | }, 260 | "57": { 261 | "exec": 412 262 | }, 263 | "58": { 264 | "exec": 413 265 | }, 266 | "59": { 267 | "exec": 414 268 | }, 269 | "60": { 270 | "exec": 415 271 | }, 272 | "61": { 273 | "exec": 416 274 | }, 275 | "62": { 276 | "exec": 417 277 | }, 278 | 279 | "63": { 280 | "exec": 191 281 | }, 282 | "64": { 283 | "exec": 192 284 | }, 285 | "65": { 286 | "exec": 193 287 | }, 288 | "66": { 289 | "exec": 194 290 | }, 291 | "67": { 292 | "exec": 195 293 | }, 294 | "68": { 295 | "exec": 196 296 | }, 297 | "69": { 298 | "exec": 197 299 | }, 300 | "70": { 301 | "exec": 198 302 | }, 303 | 304 | "71": { 305 | "exec": 410 306 | }, 307 | "72": { 308 | "exec": 411 309 | }, 310 | "73": { 311 | "exec": 412 312 | }, 313 | "74": { 314 | "exec": 413 315 | }, 316 | "75": { 317 | "exec": 414 318 | }, 319 | "76": { 320 | "exec": 415 321 | }, 322 | "77": { 323 | "exec": 416 324 | }, 325 | "78": { 326 | "exec": 417 327 | }, 328 | 329 | "79": { 330 | "exec": 310 331 | }, 332 | "80": { 333 | "exec": 311 334 | }, 335 | "81": { 336 | "exec": 312 337 | }, 338 | "82": { 339 | "exec": 313 340 | }, 341 | "83": { 342 | "exec": 314 343 | }, 344 | "84": { 345 | "exec": 315 346 | }, 347 | "85": { 348 | "exec": 316 349 | }, 350 | "86": { 351 | "exec": 317 352 | }, 353 | 354 | "87": { 355 | "exec": 210 356 | }, 357 | "88": { 358 | "exec": 211 359 | }, 360 | "89": { 361 | "exec": 212 362 | }, 363 | "90": { 364 | "exec": 213 365 | }, 366 | "91": { 367 | "exec": 214 368 | }, 369 | "92": { 370 | "exec": 215 371 | }, 372 | "93": { 373 | "exec": 216 374 | }, 375 | "94": { 376 | "exec": 217 377 | }, 378 | 379 | "95": { 380 | "exec": 110 381 | }, 382 | "96": { 383 | "exec": 111 384 | }, 385 | "97": { 386 | "exec": 112 387 | }, 388 | "98": { 389 | "exec": 113 390 | }, 391 | "99": { 392 | "exec": 114 393 | }, 394 | "100": { 395 | "exec": 115 396 | }, 397 | "101": { 398 | "exec": 116 399 | }, 400 | "102": { 401 | "exec": 117 402 | }, 403 | "103": { 404 | "exec": 118 405 | }, 406 | 407 | "104": { 408 | "cmd": "Previous Page", 409 | "minValue": 100 410 | }, 411 | "105": { 412 | "cmd": "Next Page", 413 | "minValue": 100 414 | }, 415 | "106": { 416 | "exec": 321 417 | }, 418 | "107": { 419 | "exec": 322 420 | }, 421 | "108": { 422 | "exec": 221 423 | }, 424 | "109": { 425 | "exec": 222 426 | } 427 | } 428 | } 429 | -------------------------------------------------------------------------------- /mappings/akaiApcMini2-Controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": { 3 | "48": "201", 4 | "49": "202", 5 | "50": "203", 6 | "51": "204", 7 | "52": "205", 8 | "53": "206", 9 | "54": "207", 10 | "55": "208", 11 | "56": "209" 12 | }, 13 | "note": { 14 | "0": { 15 | "exec": 101, 16 | "permanentFeedback": 21, 17 | "midiChannel": 7 18 | }, 19 | "1": { 20 | "exec": 102, 21 | "permanentFeedback": 21, 22 | "midiChannel": 7 23 | }, 24 | "2": { 25 | "exec": 103, 26 | "permanentFeedback": 21, 27 | "midiChannel": 7 28 | }, 29 | "3": { 30 | "exec": 104, 31 | "permanentFeedback": 21, 32 | "midiChannel": 7 33 | }, 34 | "4": { 35 | "exec": 105, 36 | "permanentFeedback": 21, 37 | "midiChannel": 7 38 | }, 39 | "5": { 40 | "exec": 106, 41 | "permanentFeedback": 21, 42 | "midiChannel": 7 43 | }, 44 | "6": { 45 | "exec": 107, 46 | "permanentFeedback": 21, 47 | "midiChannel": 7 48 | }, 49 | "7": { 50 | "exec": 108, 51 | "permanentFeedback": 21, 52 | "midiChannel": 7 53 | }, 54 | "8": { 55 | "exec": 301, 56 | "permanentFeedback": 45, 57 | "midiChannel": 7 58 | }, 59 | "9": { 60 | "exec": 302, 61 | "permanentFeedback": 45, 62 | "midiChannel": 7 63 | }, 64 | "10": { 65 | "exec": 303, 66 | "permanentFeedback": 45, 67 | "midiChannel": 7 68 | }, 69 | "11": { 70 | "exec": 304, 71 | "permanentFeedback": 45, 72 | "midiChannel": 7 73 | }, 74 | "12": { 75 | "exec": 305, 76 | "permanentFeedback": 45, 77 | "midiChannel": 7 78 | }, 79 | "13": { 80 | "exec": 306, 81 | "permanentFeedback": 45, 82 | "midiChannel": 7 83 | }, 84 | "14": { 85 | "exec": 307, 86 | "permanentFeedback": 45, 87 | "midiChannel": 7 88 | }, 89 | "15": { 90 | "exec": 308, 91 | "permanentFeedback": 45, 92 | "midiChannel": 7 93 | }, 94 | "16": { 95 | "exec": 401, 96 | "permanentFeedback": 5, 97 | "midiChannel": 7 98 | }, 99 | "17": { 100 | "exec": 402, 101 | "permanentFeedback": 5, 102 | "midiChannel": 7 103 | }, 104 | "18": { 105 | "exec": 403, 106 | "permanentFeedback": 5, 107 | "midiChannel": 7 108 | }, 109 | "19": { 110 | "exec": 404, 111 | "permanentFeedback": 5, 112 | "midiChannel": 7 113 | }, 114 | "20": { 115 | "exec": 405, 116 | "permanentFeedback": 5, 117 | "midiChannel": 7 118 | }, 119 | "21": { 120 | "exec": 406, 121 | "permanentFeedback": 5, 122 | "midiChannel": 7 123 | }, 124 | "22": { 125 | "exec": 407, 126 | "permanentFeedback": 5, 127 | "midiChannel": 7 128 | }, 129 | "23": { 130 | "exec": 408, 131 | "permanentFeedback": 5, 132 | "midiChannel": 7 133 | }, 134 | "24": { 135 | "cmd": "At Preset 6.1", 136 | "minValue": 100, 137 | "permanentFeedback": 33, 138 | "midiChannel": 7 139 | }, 140 | "25": { 141 | "cmd": "At Preset 6.2", 142 | "minValue": 100, 143 | "permanentFeedback": 33, 144 | "midiChannel": 7 145 | }, 146 | "26": { 147 | "cmd": "At Preset 6.3", 148 | "minValue": 100, 149 | "permanentFeedback": 33, 150 | "midiChannel": 7 151 | }, 152 | "27": { 153 | "cmd": "At Preset 6.4", 154 | "minValue": 100, 155 | "permanentFeedback": 33, 156 | "midiChannel": 7 157 | }, 158 | "28": { 159 | "cmd": "At Preset 6.5", 160 | "minValue": 100, 161 | "permanentFeedback": 33, 162 | "midiChannel": 7 163 | }, 164 | "29": { 165 | "cmd": "At Preset 6.6", 166 | "minValue": 100, 167 | "permanentFeedback": 10, 168 | "midiChannel": 7 169 | }, 170 | "30": { 171 | "cmd": "Go+ Sequence 31", 172 | "minValue": 100, 173 | "permanentFeedback": 53, 174 | "midiChannel": 7 175 | }, 176 | "31": { 177 | "cmd": "Go+ Sequence 32", 178 | "minValue": 100, 179 | "permanentFeedback": 57, 180 | "midiChannel": 7 181 | }, 182 | "32": { 183 | "cmd": "At Preset 2.1", 184 | "minValue": 100, 185 | "permanentFeedback": 13, 186 | "midiChannel": 7 187 | }, 188 | "33": { 189 | "cmd": "At Preset 2.2", 190 | "minValue": 100, 191 | "permanentFeedback": 13, 192 | "midiChannel": 7 193 | }, 194 | "34": { 195 | "cmd": "At Preset 2.3", 196 | "minValue": 100, 197 | "permanentFeedback": 13, 198 | "midiChannel": 7 199 | }, 200 | "35": { 201 | "cmd": "At Preset 2.4", 202 | "minValue": 100, 203 | "permanentFeedback": 13, 204 | "midiChannel": 7 205 | }, 206 | "36": { 207 | "cmd": "At Preset 2.5", 208 | "minValue": 100, 209 | "permanentFeedback": 13, 210 | "midiChannel": 7 211 | }, 212 | "37": { 213 | "cmd": "At Preset 2.6", 214 | "minValue": 100, 215 | "permanentFeedback": 13, 216 | "midiChannel": 7 217 | }, 218 | "38": { 219 | "cmd": "At Preset 2.7", 220 | "minValue": 100, 221 | "permanentFeedback": 10, 222 | "midiChannel": 7 223 | }, 224 | "39": { 225 | "cmd": "At Preset 2.8", 226 | "minValue": 100, 227 | "permanentFeedback": 10, 228 | "midiChannel": 7 229 | }, 230 | "40": { 231 | "cmd": "At Preset 1.1", 232 | "minValue": 100, 233 | "permanentFeedback": 3, 234 | "midiChannel": 1 235 | }, 236 | "41": { 237 | "cmd": "At Preset 1.4", 238 | "minValue": 100, 239 | "permanentFeedback": 3, 240 | "midiChannel": 2 241 | }, 242 | "42": { 243 | "cmd": "At Preset 1.5", 244 | "minValue": 100, 245 | "permanentFeedback": 3, 246 | "midiChannel": 4 247 | }, 248 | "43": { 249 | "cmd": "At Preset 1.10", 250 | "minValue": 100, 251 | "permanentFeedback": 3, 252 | "midiChannel": 5 253 | }, 254 | "44": { 255 | "cmd": "At Preset 1.13", 256 | "minValue": 100, 257 | "permanentFeedback": 3, 258 | "midiChannel": 7 259 | }, 260 | "45": { 261 | "cmd": "At Preset 1.20", 262 | "minValue": 100, 263 | "permanentFeedback": 10, 264 | "midiChannel": 7 265 | }, 266 | "46": { 267 | "cmd": "At Preset 1.21", 268 | "minValue": 100, 269 | "permanentFeedback": 10, 270 | "midiChannel": 7 271 | }, 272 | "47": { 273 | "cmd": "At Preset 1.22", 274 | "minValue": 100, 275 | "permanentFeedback": 10, 276 | "midiChannel": 7 277 | }, 278 | "48": { 279 | "cmd": "At Preset 4.9", 280 | "minValue": 100, 281 | "permanentFeedback": 41, 282 | "midiChannel": 7 283 | }, 284 | "49": { 285 | "cmd": "At Preset 4.10", 286 | "minValue": 100, 287 | "permanentFeedback": 45, 288 | "midiChannel": 7 289 | }, 290 | "50": { 291 | "cmd": "At Preset 4.11", 292 | "minValue": 100, 293 | "permanentFeedback": 49, 294 | "midiChannel": 7 295 | }, 296 | "51": { 297 | "cmd": "At Preset 4.12", 298 | "minValue": 100, 299 | "permanentFeedback": 53, 300 | "midiChannel": 7 301 | }, 302 | "52": { 303 | "cmd": "At Preset 4.13", 304 | "minValue": 100, 305 | "permanentFeedback": 57, 306 | "midiChannel": 7 307 | }, 308 | "53": { 309 | "cmd": "At Preset 4.14", 310 | "minValue": 100, 311 | "permanentFeedback": 10, 312 | "midiChannel": 7 313 | }, 314 | "54": { 315 | "cmd": "At Preset 4.15", 316 | "minValue": 100, 317 | "permanentFeedback": 10, 318 | "midiChannel": 7 319 | }, 320 | "55": { 321 | "cmd": "At Preset 4.16", 322 | "minValue": 100, 323 | "permanentFeedback": 10, 324 | "midiChannel": 7 325 | }, 326 | "56": { 327 | "cmd": "At Preset 4.1", 328 | "minValue": 100, 329 | "permanentFeedback": 3, 330 | "midiChannel": 7 331 | }, 332 | "57": { 333 | "cmd": "At Preset 4.2", 334 | "minValue": 100, 335 | "permanentFeedback": 5, 336 | "midiChannel": 7 337 | }, 338 | "58": { 339 | "cmd": "At Preset 4.3", 340 | "minValue": 100, 341 | "permanentFeedback": 9, 342 | "midiChannel": 7 343 | }, 344 | "59": { 345 | "cmd": "At Preset 4.4", 346 | "minValue": 100, 347 | "permanentFeedback": 13, 348 | "midiChannel": 7 349 | }, 350 | "60": { 351 | "cmd": "At Preset 4.5", 352 | "minValue": 100, 353 | "permanentFeedback": 17, 354 | "midiChannel": 7 355 | }, 356 | "61": { 357 | "cmd": "At Preset 4.6", 358 | "minValue": 100, 359 | "permanentFeedback": 21, 360 | "midiChannel": 7 361 | }, 362 | "62": { 363 | "cmd": "At Preset 4.7", 364 | "minValue": 100, 365 | "permanentFeedback": 29, 366 | "midiChannel": 7 367 | }, 368 | "63": { 369 | "cmd": "At Preset 4.8", 370 | "minValue": 100, 371 | "permanentFeedback": 37, 372 | "midiChannel": 7 373 | }, 374 | "100": { 375 | "cmd": "Group 7", 376 | "minValue": 100, 377 | "permanentFeedback": 127 378 | }, 379 | "101": { 380 | "cmd": "Group 5", 381 | "minValue": 100, 382 | "permanentFeedback": 127 383 | }, 384 | "102": { 385 | "cmd": "Group 6", 386 | "minValue": 100, 387 | "permanentFeedback": 127 388 | }, 389 | "103": { 390 | "cmd": "Group 11", 391 | "minValue": 100, 392 | "permanentFeedback": 127 393 | }, 394 | "104": { 395 | "cmd": "Group 12", 396 | "minValue": 100, 397 | "permanentFeedback": 127 398 | }, 399 | "105": { 400 | "cmd": "Group 13", 401 | "minValue": 100, 402 | "permanentFeedback": 127 403 | }, 404 | "106": { 405 | "cmd": "Previous Page", 406 | "minValue": 100, 407 | "permanentFeedback": 127 408 | }, 409 | "107": { 410 | "cmd": "Next Page", 411 | "minValue": 100, 412 | "permanentFeedback": 127 413 | }, 414 | "112": { 415 | "cmd": "SaveShow", 416 | "minValue": 100, 417 | "permanentFeedback": 127 418 | }, 419 | "113": { 420 | "quicKey": "EditRecipe Programmer", 421 | "minValue": 100 , 422 | "permanentFeedback": 127 423 | }, 424 | "114": { 425 | "quicKey": "Esc", 426 | "minValue": 100, 427 | "permanentFeedback": 127 428 | }, 429 | "115": { 430 | "quicKey": "Please", 431 | "minValue": 100, 432 | "permanentFeedback": 127 433 | }, 434 | "116": { 435 | "quicKey": "Oops", 436 | "minValue": 100, 437 | "permanentFeedback": 127 438 | }, 439 | "117": { 440 | "quicKey": "Off", 441 | "minValue": 100, 442 | "permanentFeedback": 127 443 | }, 444 | "118": { 445 | "quicKey": "Clear", 446 | "minValue": 100, 447 | "permanentFeedback": 127 448 | }, 449 | "119": { 450 | "quicKey": "Store", 451 | "minValue": 100, 452 | "permanentFeedback": 127 453 | }, 454 | "122": { 455 | "quicKey": "", 456 | "minValue": 100, 457 | "permanentFeedback": 127 458 | } 459 | } 460 | } -------------------------------------------------------------------------------- /pam-OSC.lua: -------------------------------------------------------------------------------- 1 | -- pam-OSC. It allows to controll GrandMA3 with Midi Devices over Open Stage Controll and allows for Feedback from MA. 2 | -- Copyright (C) 2024 xxpasixx 3 | -- This program is free software: you can redistribute it and/or modify 4 | -- it under the terms of the GNU General Public License as published by 5 | -- the Free Software Foundation, either version 3 of the License, or 6 | -- (at your option) any later version. 7 | -- This program is distributed in the hope that it will be useful, 8 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | -- GNU General Public License for more details. 11 | -- You should have received a copy of the GNU General Public License 12 | -- along with this program. If not, see . 13 | local executorsToWatch = {} 14 | local oldValues = {} 15 | local oldButtonValues = {} 16 | local oldColorValues = {} 17 | local oldNameValues = {} 18 | local olsMasterEnabledValue = { 19 | highlight = false, 20 | lowlight = false, 21 | solo = false, 22 | blind = false 23 | } 24 | local oldTimecodes = {} 25 | local oldDeskLockedStatus = 0 26 | 27 | local oscEntry = 2 28 | 29 | -- Configure here, what executors you want to watch: 30 | for i = 101, 122 do 31 | executorsToWatch[#executorsToWatch + 1] = i 32 | end 33 | 34 | for i = 201, 222 do 35 | executorsToWatch[#executorsToWatch + 1] = i 36 | end 37 | 38 | for i = 301, 322 do 39 | executorsToWatch[#executorsToWatch + 1] = i 40 | end 41 | 42 | for i = 401, 422 do 43 | executorsToWatch[#executorsToWatch + 1] = i 44 | end 45 | 46 | for i = 191, 198 do 47 | executorsToWatch[#executorsToWatch + 1] = i 48 | end 49 | 50 | for i = 291, 298 do 51 | executorsToWatch[#executorsToWatch + 1] = i 52 | end 53 | 54 | -- set the default Values 55 | for _, number in ipairs(executorsToWatch) do 56 | oldValues[number] = "000" 57 | oldButtonValues[number] = false 58 | oldColorValues[number] = "0,0,0,0" 59 | oldNameValues[number] = ";" 60 | end 61 | 62 | -- the Speed to check executors 63 | local tick = 1 / 10 -- 1/10 64 | local resendTick = 0 65 | 66 | local function getApereanceColor(sequence) 67 | local apper = sequence["APPEARANCE"] 68 | local returnText 69 | 70 | local function checkSquenceAppearance(apperH) 71 | if apperH ~= nil then 72 | if apperH['BACKR'] == 0 and apperH['BACKG'] == 0 and apperH['BACKB'] == 0 and apperH['BACKALPHA'] == 0 then 73 | returnText = "255,255,255,255" 74 | else 75 | returnText = apperH['BACKR'] .. "," .. apperH['BACKG'] .. "," .. apperH['BACKB'] .. "," .. apperH['BACKALPHA'] 76 | end 77 | else 78 | returnText = "255,255,255,255" 79 | end 80 | end 81 | 82 | 83 | checkSquenceAppearance(apper) 84 | 85 | if (sequence.preferCueAppearance == true and sequence:CurrentChild()) then 86 | if (sequence:CurrentChild()[1].Appearance) then 87 | checkSquenceAppearance(sequence:CurrentChild()[1].Appearance) 88 | end 89 | end 90 | 91 | return returnText 92 | end 93 | 94 | local function getName(sequence) 95 | if sequence["CUENAME"] ~= nil then 96 | return sequence["NAME"] .. ";" .. sequence["CUENAME"] 97 | end 98 | return sequence["NAME"] .. ";" 99 | end 100 | 101 | local function getMasterEnabled(masterName) 102 | if MasterPool()['Grand'][masterName]['FADERENABLED'] then 103 | return true 104 | else 105 | return false 106 | end 107 | end 108 | 109 | local function main() 110 | local automaticResendButtons = GetVar(GlobalVars(), "automaticResendButtons") or false 111 | local sendColors = GetVar(GlobalVars(), "sendColors") or false 112 | local sendNames = GetVar(GlobalVars(), "sendNames") or false 113 | local sendTimecode = GetVar(GlobalVars(), "sendTimecode") or false 114 | local fixedPageNr = GetVar(GlobalVars(), "fixedPageNr") or 0 115 | 116 | Printf("start pam OSC main()") 117 | Printf("automaticResendButtons: " .. (automaticResendButtons and "true" or "false")) 118 | Printf("sendColors: " .. (sendColors and "true" or "false")) 119 | Printf("sendNames: " .. (sendNames and "true" or "false")) 120 | Printf("sendTimecode: " .. (sendTimecode and "true" or "false")) 121 | Printf("fixedPageNr: " .. fixedPageNr) 122 | 123 | local destPage = 1 124 | local forceReload = true 125 | local forceReloadButtons = false 126 | 127 | if GetVar(GlobalVars(), "opdateOSC") ~= nil then 128 | SetVar(GlobalVars(), "opdateOSC", not GetVar(GlobalVars(), "opdateOSC")) 129 | else 130 | SetVar(GlobalVars(), "opdateOSC", true) 131 | end 132 | 133 | while (GetVar(GlobalVars(), "opdateOSC")) do 134 | local currentDeskLocked = DeskLocked() 135 | if currentDeskLocked ~= oldDeskLockedStatus then 136 | oldDeskLockedStatus = currentDeskLocked 137 | forceReload = true 138 | end 139 | 140 | if GetVar(GlobalVars(), "forceReload") == true then 141 | forceReload = true 142 | automaticResendButtons = GetVar(GlobalVars(), "automaticResendButtons") or false 143 | sendColors = GetVar(GlobalVars(), "sendColors") or false 144 | sendNames = GetVar(GlobalVars(), "sendNames") or false 145 | sendTimecode = GetVar(GlobalVars(), "sendTimecode") or false 146 | fixedPageNr = GetVar(GlobalVars(), "fixedPageNr") or 0 147 | SetVar(GlobalVars(), "forceReload", false) 148 | end 149 | 150 | if forceReload == true then 151 | Cmd('SendOSC ' .. oscEntry .. ' "/updatePage/current,i,' .. destPage) 152 | Cmd('SendOSC ' .. oscEntry .. ' "/status/deskLocked,' .. (currentDeskLocked and "T," or "F,") .. '"') 153 | end 154 | 155 | if automaticResendButtons then 156 | resendTick = resendTick + 1 157 | end 158 | if resendTick >= 15 then 159 | forceReloadButtons = true 160 | resendTick = 0 161 | end 162 | 163 | -- Check Master Enabled Values 164 | for masterKey, masterValue in pairs(olsMasterEnabledValue) do 165 | local currValue = getMasterEnabled(masterKey) 166 | if currValue ~= masterValue then 167 | Cmd('SendOSC ' .. oscEntry .. ' "/masterEnabled/' .. masterKey .. ',i,' .. (currValue and 1 or 0)) 168 | olsMasterEnabledValue[masterKey] = currValue 169 | end 170 | end 171 | 172 | -- Check Page 173 | local myPage = CurrentExecPage() 174 | if fixedPageNr ~= nil and tostring(fixedPageNr) ~= "" and tonumber(fixedPageNr) and tonumber(fixedPageNr) ~= 0 then 175 | local Pages = DataPool().Pages 176 | local FixedPageRef = tonumber(fixedPageNr) 177 | 178 | if Pages[FixedPageRef] then 179 | myPage = Pages[FixedPageRef] 180 | end 181 | end 182 | 183 | if myPage.index ~= destPage then 184 | destPage = myPage.index 185 | for maKey, maValue in pairs(oldValues) do 186 | oldValues[maKey] = 000 187 | end 188 | for maKey, maValue in pairs(oldButtonValues) do 189 | oldButtonValues[maKey] = false 190 | end 191 | forceReload = true 192 | Cmd('SendOSC ' .. oscEntry .. ' "/updatePage/current,i,' .. destPage) 193 | end 194 | 195 | -- Get all Executors 196 | local executors = DataPool().Pages[destPage]:Children() 197 | 198 | for listKey, listValue in pairs(executorsToWatch) do 199 | local faderValue = 0 200 | local buttonValue = false 201 | local colorValue = "0,0,0,0" 202 | local nameValue = ";" 203 | local isFlash = false 204 | 205 | -- Set Fader & button Values 206 | for maKey, maValue in pairs(executors) do 207 | if maValue.No == listValue then 208 | local faderOptions = {} 209 | faderOptions.value = faderEnd 210 | faderOptions.token = "FaderMaster" 211 | faderOptions.faderDisabled = false 212 | 213 | faderValue = maValue:GetFader(faderOptions) 214 | isFlash = maValue.KEY == "Flash" 215 | 216 | local myobject = maValue.Object 217 | if myobject ~= nil then 218 | buttonValue = myobject:HasActivePlayback() and true or false 219 | if sendColors then 220 | colorValue = getApereanceColor(myobject) 221 | end 222 | if sendNames then 223 | nameValue = getName(myobject) 224 | end 225 | end 226 | 227 | end 228 | end 229 | 230 | -- Send Fader Value 231 | if (oldValues[listKey] ~= faderValue and not (isFlash and buttonValue and faderValue == 100)) or forceReload then 232 | hasFaderUpdated = true 233 | oldValues[listKey] = faderValue 234 | Cmd('SendOSC ' .. oscEntry .. ' "/Page' .. destPage .. '/Fader' .. listValue .. ',i,' .. 235 | (faderValue * 1.27) .. '"') 236 | end 237 | 238 | -- Send Button Value 239 | if oldButtonValues[listKey] ~= buttonValue or forceReload or forceReloadButtons then 240 | oldButtonValues[listKey] = buttonValue 241 | Cmd('SendOSC ' .. oscEntry .. ' "/Page' .. destPage .. '/Button' .. listValue .. ',s,' .. 242 | (buttonValue and "On" or "Off") .. '"') 243 | end 244 | 245 | -- Send Color Value 246 | if sendColors and (oldColorValues[listKey] ~= colorValue or forceReload) then 247 | oldColorValues[listKey] = colorValue 248 | local newValue = string.gsub(colorValue, ",", ";") 249 | Cmd('SendOSC ' .. oscEntry .. ' "/Page' .. destPage .. '/Color' .. listValue .. ',s,' .. newValue .. 250 | '"') 251 | end 252 | 253 | -- Send Name Value 254 | if sendNames and (oldNameValues[listKey] ~= nameValue or forceReload) then 255 | oldNameValues[listKey] = nameValue 256 | Cmd('SendOSC ' .. oscEntry .. ' "/Page' .. destPage .. '/Name' .. listValue .. ',s,' .. nameValue .. 257 | '"') 258 | end 259 | end 260 | 261 | -- Send Timecode 262 | if sendTimecode then 263 | local slots = Root().TimecodeSlots 264 | 265 | for _, slot in pairs(slots:Children()) do 266 | local time = slot.timestring 267 | 268 | if oldTimecodes[slot.no] ~= time or oldTimecodes[slot.no] == nil or forceReload == true then 269 | oldTimecodes[slot.no] = time 270 | 271 | Cmd('SendOSC ' .. oscEntry .. ' "/Timecode' .. slot.no .. ',s,' .. time .. '"') 272 | end 273 | end 274 | end 275 | 276 | forceReload = false 277 | forceReloadButtons = false 278 | 279 | -- delay 280 | coroutine.yield(tick) 281 | end 282 | 283 | end 284 | 285 | 286 | return main 287 | -------------------------------------------------------------------------------- /mappings/akiApcMini1.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "mc", 3 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 4 | "control": { 5 | "48": "201", 6 | "49": "202", 7 | "50": "203", 8 | "51": "204", 9 | "52": "205", 10 | "53": "206", 11 | "54": "207", 12 | "55": "208", 13 | "56": "209" 14 | }, 15 | "note": { 16 | "0": { 17 | "exec": 301, 18 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 19 | }, 20 | "1": { 21 | "exec": 302, 22 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 23 | }, 24 | "2": { 25 | "exec": 303, 26 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 27 | }, 28 | "3": { 29 | "exec": 304, 30 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 31 | }, 32 | "4": { 33 | "exec": 305, 34 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 35 | }, 36 | "5": { 37 | "exec": 306, 38 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 39 | }, 40 | "6": { 41 | "exec": 307, 42 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 43 | }, 44 | "7": { 45 | "exec": 308, 46 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 47 | }, 48 | "8": { 49 | "exec": 401, 50 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 51 | }, 52 | "9": { 53 | "exec": 402, 54 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 55 | }, 56 | "10": { 57 | "exec": 403, 58 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 59 | }, 60 | "11": { 61 | "exec": 404, 62 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 63 | }, 64 | "12": { 65 | "exec": 405, 66 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 67 | }, 68 | "13": { 69 | "exec": 406, 70 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 71 | }, 72 | "14": { 73 | "exec": 407, 74 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 75 | }, 76 | "15": { 77 | "exec": 408, 78 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 3;} if (value == 'Off'){ return 0;} return 0; }" 79 | }, 80 | "16": { 81 | "exec": 110, 82 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 83 | }, 84 | "17": { 85 | "exec": 111, 86 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 87 | }, 88 | "18": { 89 | "exec": 112, 90 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 91 | }, 92 | "19": { 93 | "exec": 113, 94 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 95 | }, 96 | "20": { 97 | "exec": 114, 98 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 99 | }, 100 | "21": { 101 | "exec": 115, 102 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 103 | }, 104 | "22": { 105 | "exec": 116, 106 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 107 | }, 108 | "23": { 109 | "exec": 117, 110 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 111 | }, 112 | "24": { 113 | "exec": 210, 114 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 115 | }, 116 | "25": { 117 | "exec": 211, 118 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 119 | }, 120 | "26": { 121 | "exec": 212, 122 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 123 | }, 124 | "27": { 125 | "exec": 213, 126 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 127 | }, 128 | "28": { 129 | "exec": 214, 130 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 131 | }, 132 | "29": { 133 | "exec": 215, 134 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 135 | }, 136 | "30": { 137 | "exec": 216, 138 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 139 | }, 140 | "31": { 141 | "exec": 217, 142 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 143 | }, 144 | "32": { 145 | "exec": 310, 146 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 147 | }, 148 | "33": { 149 | "exec": 311, 150 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 151 | }, 152 | "34": { 153 | "exec": 312, 154 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 155 | }, 156 | "35": { 157 | "exec": 313, 158 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 159 | }, 160 | "36": { 161 | "exec": 314, 162 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 163 | }, 164 | "37": { 165 | "exec": 315, 166 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 167 | }, 168 | "38": { 169 | "exec": 316, 170 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 171 | }, 172 | "39": { 173 | "exec": 317, 174 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 175 | }, 176 | "40": { 177 | "exec": 410, 178 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 179 | }, 180 | "41": { 181 | "exec": 411, 182 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 183 | }, 184 | "42": { 185 | "exec": 412, 186 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 187 | }, 188 | "43": { 189 | "exec": 413, 190 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 191 | }, 192 | "44": { 193 | "exec": 414, 194 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 195 | }, 196 | "45": { 197 | "exec": 415, 198 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 199 | }, 200 | "46": { 201 | "exec": 416, 202 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 203 | }, 204 | "47": { 205 | "exec": 417, 206 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 5;} if (value == 'Off'){ return 0;} return 0; }" 207 | }, 208 | "48": { 209 | "exec": 191 210 | }, 211 | "49": { 212 | "exec": 192 213 | }, 214 | "50": { 215 | "exec": 193 216 | }, 217 | "51": { 218 | "exec": 194 219 | }, 220 | "52": { 221 | "exec": 195 222 | }, 223 | "53": { 224 | "exec": 196 225 | }, 226 | "54": { 227 | "exec": 197 228 | }, 229 | "55": { 230 | "exec": 198 231 | }, 232 | "56": { 233 | "exec": 291 234 | }, 235 | "57": { 236 | "exec": 292 237 | }, 238 | "58": { 239 | "exec": 293 240 | }, 241 | "59": { 242 | "exec": 294 243 | }, 244 | "60": { 245 | "exec": 295 246 | }, 247 | "61": { 248 | "exec": 296 249 | }, 250 | "62": { 251 | "exec": 297 252 | }, 253 | "63": { 254 | "exec": 298 255 | }, 256 | "64": { 257 | "exec": 201 258 | }, 259 | "65": { 260 | "exec": 202 261 | }, 262 | "66": { 263 | "exec": 203 264 | }, 265 | "67": { 266 | "exec": 204 267 | }, 268 | "68": { 269 | "exec": 205 270 | }, 271 | "69": { 272 | "exec": 206 273 | }, 274 | "70": { 275 | "exec": 207 276 | }, 277 | "71": { 278 | "exec": 208 279 | }, 280 | "72": { 281 | "exec": 209 282 | }, 283 | "82": { 284 | "quicKey": "ESC", 285 | "minValue": 100, 286 | "permanentFeedback": 127 287 | }, 288 | "83": { 289 | "cmd": "CLEAR", 290 | "minValue": 100, 291 | "permanentFeedback": 127 292 | }, 293 | "84": { 294 | "quicKey": "STORE", 295 | "minValue": 100, 296 | "permanentFeedback": 127 297 | }, 298 | "85": { 299 | "cmd": "HIGHLIGHT", 300 | "minValue": 100, 301 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 2;} if (value == 'Off'){ return 0;} return 0; }" 302 | }, 303 | "86": { 304 | "cmd": "BLIND", 305 | "minValue": 100, 306 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 2;} if (value == 'Off'){ return 0;} return 0; }" 307 | }, 308 | "87": { 309 | "quicKey": "MOVE", 310 | "minValue": 100, 311 | "permanentFeedback": 127 312 | }, 313 | "88": { 314 | "cmd": "FULL", 315 | "minValue": 100, 316 | "permanentFeedback": 127 317 | }, 318 | "89": { 319 | "cmd": "OOPS", 320 | "minValue": 100, 321 | "permanentFeedback": 127 322 | } 323 | } 324 | } 325 | -------------------------------------------------------------------------------- /mappings/xTouch1.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "mc", 3 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 4 | "enableTimecodeSend": true, 5 | "pitch": { 6 | "1": 201, 7 | "2": 202, 8 | "3": 203, 9 | "4": 204, 10 | "5": 205, 11 | "6": 206, 12 | "7": 207, 13 | "8": 208, 14 | "9": 209 15 | }, 16 | "rltvControl": { 17 | "16": { 18 | "exec": 401, 19 | "currValue": 0, 20 | "posFrom": 1, 21 | "posTo": 8, 22 | "negFrom": 65, 23 | "negTo": 72, 24 | "returnChannel": 48, 25 | "returnFrom": 32, 26 | "returnTo": 43 27 | }, 28 | "17": { 29 | "exec": 402, 30 | "currValue": 0, 31 | "posFrom": 1, 32 | "posTo": 8, 33 | "negFrom": 65, 34 | "negTo": 72, 35 | "returnChannel": 49, 36 | "returnFrom": 32, 37 | "returnTo": 43 38 | }, 39 | "18": { 40 | "exec": 403, 41 | "currValue": 0, 42 | "posFrom": 1, 43 | "posTo": 8, 44 | "negFrom": 65, 45 | "negTo": 72, 46 | "returnChannel": 50, 47 | "returnFrom": 32, 48 | "returnTo": 43 49 | }, 50 | "19": { 51 | "exec": 404, 52 | "currValue": 0, 53 | "posFrom": 1, 54 | "posTo": 8, 55 | "negFrom": 65, 56 | "negTo": 72, 57 | "returnChannel": 51, 58 | "returnFrom": 32, 59 | "returnTo": 43 60 | }, 61 | "20": { 62 | "exec": 405, 63 | "currValue": 0, 64 | "posFrom": 1, 65 | "posTo": 8, 66 | "negFrom": 65, 67 | "negTo": 72, 68 | "returnChannel": 52, 69 | "returnFrom": 32, 70 | "returnTo": 43 71 | }, 72 | "21": { 73 | "exec": 406, 74 | "currValue": 0, 75 | "posFrom": 1, 76 | "posTo": 8, 77 | "negFrom": 65, 78 | "negTo": 72, 79 | "returnChannel": 53, 80 | "returnFrom": 32, 81 | "returnTo": 43 82 | }, 83 | "22": { 84 | "exec": 407, 85 | "currValue": 0, 86 | "posFrom": 1, 87 | "posTo": 8, 88 | "negFrom": 65, 89 | "negTo": 72, 90 | "returnChannel": 54, 91 | "returnFrom": 32, 92 | "returnTo": 43 93 | }, 94 | "23": { 95 | "exec": 408, 96 | "currValue": 0, 97 | "posFrom": 1, 98 | "posTo": 8, 99 | "negFrom": 65, 100 | "negTo": 72, 101 | "returnChannel": 55, 102 | "returnFrom": 32, 103 | "returnTo": 43 104 | }, 105 | "60": { 106 | "attribute": "current", 107 | "posFrom": 1, 108 | "posTo": 1, 109 | "negFrom": 65, 110 | "negTo": 65, 111 | "amount": 1.0 112 | } 113 | }, 114 | "control": {}, 115 | "note": { 116 | "0": { 117 | "exec": 401 118 | }, 119 | "1": { 120 | "exec": 402 121 | }, 122 | "2": { 123 | "exec": 403 124 | }, 125 | "3": { 126 | "exec": 404 127 | }, 128 | "4": { 129 | "exec": 405 130 | }, 131 | "5": { 132 | "exec": 406 133 | }, 134 | "6": { 135 | "exec": 407 136 | }, 137 | "7": { 138 | "exec": 408 139 | }, 140 | "8": { 141 | "exec": 301 142 | }, 143 | "9": { 144 | "exec": 302 145 | }, 146 | "10": { 147 | "exec": 303 148 | }, 149 | "11": { 150 | "exec": 304 151 | }, 152 | "12": { 153 | "exec": 305 154 | }, 155 | "13": { 156 | "exec": 306 157 | }, 158 | "14": { 159 | "exec": 307 160 | }, 161 | "15": { 162 | "exec": 308 163 | }, 164 | "16": { 165 | "exec": 201 166 | }, 167 | "17": { 168 | "exec": 202 169 | }, 170 | "18": { 171 | "exec": 203 172 | }, 173 | "19": { 174 | "exec": 204 175 | }, 176 | "20": { 177 | "exec": 205 178 | }, 179 | "21": { 180 | "exec": 206 181 | }, 182 | "22": { 183 | "exec": 207 184 | }, 185 | "23": { 186 | "exec": 208 187 | }, 188 | "24": { 189 | "exec": 101 190 | }, 191 | "25": { 192 | "exec": 102 193 | }, 194 | "26": { 195 | "exec": 103 196 | }, 197 | "27": { 198 | "exec": 104 199 | }, 200 | "28": { 201 | "exec": 105 202 | }, 203 | "29": { 204 | "exec": 106 205 | }, 206 | "30": { 207 | "exec": 107 208 | }, 209 | "31": { 210 | "exec": 108 211 | }, 212 | "32": { 213 | "exec": 201 214 | }, 215 | "33": { 216 | "exec": 202 217 | }, 218 | "34": { 219 | "exec": 203 220 | }, 221 | "35": { 222 | "exec": 204 223 | }, 224 | "36": { 225 | "exec": 205 226 | }, 227 | "37": { 228 | "exec": 206 229 | }, 230 | "38": { 231 | "exec": 207 232 | }, 233 | "39": { 234 | "exec": 208 235 | }, 236 | "40": { 237 | "cmd": "HIGHLIGHT", 238 | "minValue": 100 239 | }, 240 | "41": { 241 | "cmd": "Preview", 242 | "minValue": 100 243 | }, 244 | "42": { 245 | "cmd": "SOLO", 246 | "minValue": 100 247 | }, 248 | "43": { 249 | "cmd": "BLIND", 250 | "minValue": 100 251 | }, 252 | "44": { 253 | "cmd": "Freeze", 254 | "minValue": 100 255 | }, 256 | "46": { 257 | "cmd": "Previous Page", 258 | "minValue": 100 259 | }, 260 | "47": { 261 | "cmd": "Next Page", 262 | "minValue": 100 263 | }, 264 | "48": { 265 | "local": "encoderFine", 266 | "minValue": 100 267 | }, 268 | "49": { 269 | "local": "encoderRough", 270 | "minValue": 100 271 | }, 272 | "52": { 273 | "timecodeSelect": true, 274 | "minValue": 100 275 | }, 276 | "53": { 277 | "timecodePlayPause": true 278 | }, 279 | "54": { 280 | "exec": 191 281 | }, 282 | "55": { 283 | "exec": 192 284 | }, 285 | "56": { 286 | "exec": 193 287 | }, 288 | "57": { 289 | "exec": 194 290 | }, 291 | "58": { 292 | "exec": 195 293 | }, 294 | "59": { 295 | "exec": 196 296 | }, 297 | "60": { 298 | "exec": 197 299 | }, 300 | "61": { 301 | "exec": 198 302 | }, 303 | "62": { 304 | "exec": 291 305 | }, 306 | "63": { 307 | "exec": 292 308 | }, 309 | "64": { 310 | "exec": 293 311 | }, 312 | "65": { 313 | "exec": 294 314 | }, 315 | "66": { 316 | "exec": 295 317 | }, 318 | "67": { 319 | "exec": 296 320 | }, 321 | "68": { 322 | "exec": 297 323 | }, 324 | "69": { 325 | "exec": 298 326 | }, 327 | "70": { 328 | "quicKey": "Fixture", 329 | "minValue": 100 330 | }, 331 | "71": { 332 | "quicKey": "Channel", 333 | "minValue": 100 334 | }, 335 | "72": { 336 | "quicKey": "Assign", 337 | "minValue": 100 338 | }, 339 | "73": { 340 | "quicKey": "Time", 341 | "minValue": 100 342 | }, 343 | "74": { 344 | "quicKey": "Group", 345 | "minValue": 100 346 | }, 347 | "75": { 348 | "quicKey": "Preset", 349 | "minValue": 100 350 | }, 351 | "76": { 352 | "quicKey": "Sequence", 353 | "minValue": 100 354 | }, 355 | "77": { 356 | "quicKey": "Update", 357 | "minValue": 100 358 | }, 359 | "78": { 360 | "quicKey": "Store", 361 | "minValue": 100 362 | }, 363 | "79": { 364 | "quicKey": "Move", 365 | "minValue": 100 366 | }, 367 | "80": { 368 | "quicKey": "Cue", 369 | "minValue": 100 370 | }, 371 | "81": { 372 | "quicKey": "Edit", 373 | "minValue": 100 374 | }, 375 | "82": { 376 | "quicKey": "Delete", 377 | "minValue": 100 378 | }, 379 | "83": { 380 | "quicKey": "Please", 381 | "minValue": 100 382 | }, 383 | "84": { 384 | "local": "attribute", 385 | "attribute": "dimmer" 386 | }, 387 | "85": { 388 | "local": "attribute", 389 | "attribute": "pan" 390 | }, 391 | "86": { 392 | "local": "attribute", 393 | "attribute": "tilt" 394 | }, 395 | "87": { 396 | "local": "attribute", 397 | "attribute": "ColorRGB_R" 398 | }, 399 | "88": { 400 | "local": "attribute", 401 | "attribute": "ColorRGB_G" 402 | }, 403 | "89": { 404 | "local": "attribute", 405 | "attribute": "ColorRGB_B" 406 | }, 407 | "90": { 408 | "local": "attribute", 409 | "attribute": "Zoom" 410 | }, 411 | "91": { 412 | "cmd": "Go-", 413 | "minValue": 100 414 | }, 415 | "92": { 416 | "cmd": "Go+", 417 | "minValue": 100 418 | }, 419 | "93": { 420 | "cmd": "Off", 421 | "minValue": 100 422 | }, 423 | "94": { 424 | "cmd": "Top", 425 | "minValue": 100 426 | }, 427 | "95": { 428 | "cmd": "Clear", 429 | "minValue": 100 430 | }, 431 | "96": { 432 | "cmd": "UP", 433 | "minValue": 100 434 | }, 435 | "97": { 436 | "cmd": "DOWN", 437 | "minValue": 100 438 | }, 439 | "98": { 440 | "cmd": "PREVIOUS", 441 | "minValue": 100 442 | }, 443 | "99": { 444 | "cmd": "NEXT", 445 | "minValue": 100 446 | }, 447 | "100": { 448 | "cmd": "Set", 449 | "minValue": 100 450 | } 451 | }, 452 | "display": { 453 | "0": 201, 454 | "1": 202, 455 | "2": 203, 456 | "3": 204, 457 | "4": 205, 458 | "5": 206, 459 | "6": 207, 460 | "7": 208 461 | } 462 | } 463 | -------------------------------------------------------------------------------- /SettingsPage.lua: -------------------------------------------------------------------------------- 1 | -- Credit to the User Nigel63 from https://forum.malighting.com/forum/thread/5738-lua-ui/ for creating the main work here 2 | local pluginName = select(1, ...) 3 | local componentName = select(2, ...) 4 | local signalTable = select(3, ...) 5 | local myHandle = select(4, ...) 6 | 7 | function CreateCheckBoxDialog(displayHandle) 8 | 9 | -- Get the index of the display on which to create the dialog. 10 | local displayIndex = Obj.Index(GetFocusDisplay()) 11 | if displayIndex > 5 then 12 | displayIndex = 1 13 | end 14 | 15 | -- Get the colors. 16 | local colorTransparent = Root().ColorTheme.ColorGroups.Global.Transparent 17 | local colorBackground = Root().ColorTheme.ColorGroups.Button.Background 18 | local colorBackgroundPlease = Root().ColorTheme.ColorGroups.Button.BackgroundPlease 19 | local colorPartlySelected = Root().ColorTheme.ColorGroups.Global.PartlySelected 20 | local colorPartlySelectedPreset = Root().ColorTheme.ColorGroups.Global.PartlySelectedPreset 21 | local colorBlue = Root().ColorTheme.ColorGroups.Global.Blue 22 | local colorWhite = Root().ColorTheme.ColorGroups.Global.White 23 | 24 | -- Get the overlay. 25 | local display = GetDisplayByIndex(displayIndex) 26 | local screenOverlay = display.ScreenOverlay 27 | 28 | -- Delete any UI elements currently displayed on the overlay. 29 | screenOverlay:ClearUIChildren() 30 | 31 | -- Create the dialog base. 32 | local dialogWidth = 650 33 | local baseInput = screenOverlay:Append("BaseInput") 34 | baseInput.Name = "DMXTesterWindow" 35 | baseInput.H = "0" 36 | baseInput.W = dialogWidth 37 | baseInput.MaxSize = string.format("%s,%s", display.W * 0.8, display.H) 38 | baseInput.MinSize = string.format("%s,0", dialogWidth - 100) 39 | baseInput.Columns = 1 40 | baseInput.Rows = 2 41 | baseInput[1][1].SizePolicy = "Fixed" 42 | baseInput[1][1].Size = "60" 43 | baseInput[1][2].SizePolicy = "Stretch" 44 | baseInput.AutoClose = "No" 45 | baseInput.CloseOnEscape = "Yes" 46 | 47 | -- Create the title bar. 48 | local titleBar = baseInput:Append("TitleBar") 49 | titleBar.Columns = 2 50 | titleBar.Rows = 1 51 | titleBar.Anchors = "0,0" 52 | titleBar[2][2].SizePolicy = "Fixed" 53 | titleBar[2][2].Size = "50" 54 | titleBar.Texture = "corner2" 55 | 56 | local titleBarIcon = titleBar:Append("TitleButton") 57 | titleBarIcon.Text = "pam-OSC Settings" 58 | titleBarIcon.Texture = "corner1" 59 | titleBarIcon.Anchors = "0,0" 60 | titleBarIcon.Icon = "star" 61 | 62 | local titleBarCloseButton = titleBar:Append("CloseButton") 63 | titleBarCloseButton.Anchors = "1,0" 64 | titleBarCloseButton.Texture = "corner2" 65 | 66 | -- Create the dialog's main frame. 67 | local dlgFrame = baseInput:Append("DialogFrame") 68 | dlgFrame.H = "100%" 69 | dlgFrame.W = "100%" 70 | dlgFrame.Columns = 1 71 | dlgFrame.Rows = 3 72 | dlgFrame.Anchors = { 73 | left = 0, 74 | right = 0, 75 | top = 1, 76 | bottom = 1 77 | } 78 | dlgFrame[1][1].SizePolicy = "Fixed" 79 | dlgFrame[1][1].Size = "60" 80 | dlgFrame[1][2].SizePolicy = "Fixed" 81 | dlgFrame[1][2].Size = "300" 82 | dlgFrame[1][3].SizePolicy = "Fixed" 83 | dlgFrame[1][3].Size = "80" 84 | 85 | -- Create the sub title. 86 | -- This is row 1 of the dlgFrame. 87 | local subTitle = dlgFrame:Append("UIObject") 88 | subTitle.Text = "Configure what the plugin should send" 89 | subTitle.ContentDriven = "Yes" 90 | subTitle.ContentWidth = "No" 91 | subTitle.TextAutoAdjust = "No" 92 | subTitle.Anchors = { 93 | left = 0, 94 | right = 0, 95 | top = 0, 96 | bottom = 0 97 | } 98 | subTitle.Padding = { 99 | left = 20, 100 | right = 20, 101 | top = 15, 102 | bottom = 15 103 | } 104 | subTitle.Font = "Medium20" 105 | subTitle.HasHover = "No" 106 | subTitle.BackColor = colorTransparent 107 | 108 | -- Create the settings grid. 109 | -- This is row 2 of the dlgFrame. 110 | local settingsGrid = dlgFrame:Append("UILayoutGrid") 111 | settingsGrid.Columns = 10 112 | settingsGrid.Rows = 5 113 | settingsGrid.Anchors = { 114 | left = 0, 115 | right = 0, 116 | top = 1, 117 | bottom = 1 118 | } 119 | settingsGrid.Margin = { 120 | left = 0, 121 | right = 0, 122 | top = 0, 123 | bottom = 5 124 | } 125 | 126 | -- Create Automatic Resend Buttons checkbox 127 | local autoResendIcon = settingsGrid:Append("Button") 128 | autoResendIcon.Text = "" 129 | autoResendIcon.Anchors = { 130 | left = 0, 131 | right = 0, 132 | top = 0, 133 | bottom = 0 134 | } 135 | autoResendIcon.Icon = "refresh" 136 | autoResendIcon.Margin = { 137 | left = 0, 138 | right = 2, 139 | top = 0, 140 | bottom = 2 141 | } 142 | autoResendIcon.HasHover = "No" 143 | 144 | local checkBox1 = settingsGrid:Append("CheckBox") 145 | checkBox1.Anchors = { 146 | left = 1, 147 | right = 9, 148 | top = 0, 149 | bottom = 0 150 | } 151 | checkBox1.Text = "Automatic Resend Buttons" 152 | checkBox1.TextalignmentH = "Left" 153 | checkBox1.State = GetVar(GlobalVars(), "automaticResendButtons") and 1 or 0 154 | checkBox1.PluginComponent = myHandle 155 | checkBox1.Clicked = "AutoResendClicked" 156 | checkBox1.Margin = { 157 | left = 2, 158 | right = 0, 159 | top = 0, 160 | bottom = 2 161 | } 162 | 163 | -- Create Send Colors checkbox 164 | local sendColorsIcon = settingsGrid:Append("Button") 165 | sendColorsIcon.Text = "" 166 | sendColorsIcon.Anchors = { 167 | left = 0, 168 | right = 0, 169 | top = 1, 170 | bottom = 1 171 | } 172 | sendColorsIcon.Icon = "icon_color_picker" 173 | sendColorsIcon.Margin = { 174 | left = 0, 175 | right = 2, 176 | top = 2, 177 | bottom = 2 178 | } 179 | sendColorsIcon.HasHover = "No" 180 | 181 | local checkBox2 = settingsGrid:Append("CheckBox") 182 | checkBox2.Anchors = { 183 | left = 1, 184 | right = 9, 185 | top = 1, 186 | bottom = 1 187 | } 188 | checkBox2.Text = "Send Colors" 189 | checkBox2.TextalignmentH = "Left" 190 | checkBox2.State = GetVar(GlobalVars(), "sendColors") and 1 or 0 191 | checkBox2.PluginComponent = myHandle 192 | checkBox2.Clicked = "SendColorsClicked" 193 | checkBox2.Margin = { 194 | left = 2, 195 | right = 0, 196 | top = 2, 197 | bottom = 2 198 | } 199 | 200 | -- Create Send Names checkbox 201 | local sendNamesIcon = settingsGrid:Append("Button") 202 | sendNamesIcon.Text = "" 203 | sendNamesIcon.Anchors = { 204 | left = 0, 205 | right = 0, 206 | top = 2, 207 | bottom = 2 208 | } 209 | sendNamesIcon.Icon = "PhaserAddAbsolute" 210 | sendNamesIcon.Margin = { 211 | left = 0, 212 | right = 2, 213 | top = 2, 214 | bottom = 2 215 | } 216 | sendNamesIcon.HasHover = "No" 217 | 218 | local checkBox3 = settingsGrid:Append("CheckBox") 219 | checkBox3.Anchors = { 220 | left = 1, 221 | right = 9, 222 | top = 2, 223 | bottom = 2 224 | } 225 | checkBox3.Text = "Send Names" 226 | checkBox3.TextalignmentH = "Left" 227 | checkBox3.State = GetVar(GlobalVars(), "sendNames") and 1 or 0 228 | checkBox3.PluginComponent = myHandle 229 | checkBox3.Clicked = "SendNamesClicked" 230 | checkBox3.Margin = { 231 | left = 2, 232 | right = 0, 233 | top = 2, 234 | bottom = 2 235 | } 236 | 237 | -- Create Send Timecode checkbox 238 | local sendTimecodeIcon = settingsGrid:Append("Button") 239 | sendTimecodeIcon.Text = "" 240 | sendTimecodeIcon.Anchors = { 241 | left = 0, 242 | right = 0, 243 | top = 3, 244 | bottom = 3 245 | } 246 | sendTimecodeIcon.Icon = "Time" 247 | sendTimecodeIcon.Margin = { 248 | left = 0, 249 | right = 2, 250 | top = 2, 251 | bottom = 2 252 | } 253 | sendTimecodeIcon.HasHover = "No" 254 | 255 | local checkBox4 = settingsGrid:Append("CheckBox") 256 | checkBox4.Anchors = { 257 | left = 1, 258 | right = 9, 259 | top = 3, 260 | bottom = 3 261 | } 262 | checkBox4.Text = "Send Timecode" 263 | checkBox4.TextalignmentH = "Left" 264 | checkBox4.State = GetVar(GlobalVars(), "sendTimecode") and 1 or 0 265 | checkBox4.PluginComponent = myHandle 266 | checkBox4.Clicked = "SendTimecodeClicked" 267 | checkBox4.Margin = { 268 | left = 2, 269 | right = 0, 270 | top = 2, 271 | bottom = 2 272 | } 273 | 274 | -- Create Fixed Page Number input 275 | local pageNumberIcon = settingsGrid:Append("Button") 276 | pageNumberIcon.Text = "" 277 | pageNumberIcon.Anchors = { 278 | left = 0, 279 | right = 0, 280 | top = 4, 281 | bottom = 4 282 | } 283 | pageNumberIcon.Icon = "locked" 284 | pageNumberIcon.Margin = { 285 | left = 0, 286 | right = 2, 287 | top = 2, 288 | bottom = 2 289 | } 290 | pageNumberIcon.HasHover = "No" 291 | 292 | local pageLabel = settingsGrid:Append("UIObject") 293 | pageLabel.Text = "Fixed Page Number (0 = disabled):" 294 | pageLabel.TextalignmentH = "Left" 295 | pageLabel.Anchors = { 296 | left = 1, 297 | right = 6, 298 | top = 4, 299 | bottom = 4 300 | } 301 | pageLabel.Padding = "5,5" 302 | pageLabel.Margin = { 303 | left = 2, 304 | right = 2, 305 | top = 2, 306 | bottom = 2 307 | } 308 | pageLabel.HasHover = "No" 309 | 310 | local pageInput = settingsGrid:Append("LineEdit") 311 | pageInput.Margin = { 312 | left = 2, 313 | right = 0, 314 | top = 2, 315 | bottom = 2 316 | } 317 | pageInput.Prompt = "Page: " 318 | pageInput.TextAutoAdjust = "Yes" 319 | pageInput.Anchors = { 320 | left = 7, 321 | right = 9, 322 | top = 4, 323 | bottom = 4 324 | } 325 | pageInput.Padding = "5,5" 326 | pageInput.Filter = "0123456789" 327 | pageInput.VkPluginName = "TextInputNumOnly" 328 | pageInput.Content = tostring(GetVar(GlobalVars(), "fixedPageNr") or 0) 329 | pageInput.MaxTextLength = 3 330 | pageInput.HideFocusFrame = "Yes" 331 | pageInput.PluginComponent = myHandle 332 | pageInput.TextChanged = "FixedPageNrChanged" 333 | 334 | -- Create the button grid. 335 | -- This is row 3 of the dlgFrame. 336 | local buttonGrid = dlgFrame:Append("UILayoutGrid") 337 | buttonGrid.Columns = 1 338 | buttonGrid.Rows = 1 339 | buttonGrid.Anchors = { 340 | left = 0, 341 | right = 0, 342 | top = 2, 343 | bottom = 2 344 | } 345 | 346 | local closeButton = buttonGrid:Append("Button") 347 | closeButton.Anchors = { 348 | left = 0, 349 | right = 0, 350 | top = 0, 351 | bottom = 0 352 | } 353 | closeButton.Textshadow = 1 354 | closeButton.HasHover = "Yes" 355 | closeButton.Text = "Close" 356 | closeButton.Font = "Medium20" 357 | closeButton.TextalignmentH = "Centre" 358 | closeButton.PluginComponent = myHandle 359 | closeButton.Clicked = "CloseButtonClicked" 360 | closeButton.Visible = "Yes" 361 | 362 | -- Define all signal handlers 363 | signalTable.CloseButtonClicked = function(caller) 364 | Echo("Close button clicked.") 365 | Obj.Delete(screenOverlay, Obj.Index(baseInput)) 366 | end 367 | signalTable.AutoResendClicked = function(caller) 368 | if (caller.State == 1) then 369 | caller.State = 0 370 | SetVar(GlobalVars(), "automaticResendButtons", false) 371 | else 372 | caller.State = 1 373 | SetVar(GlobalVars(), "automaticResendButtons", true) 374 | end 375 | SetVar(GlobalVars(), "forceReload", true) 376 | end 377 | 378 | signalTable.SendColorsClicked = function(caller) 379 | if (caller.State == 1) then 380 | caller.State = 0 381 | SetVar(GlobalVars(), "sendColors", false) 382 | Echo("test 1") 383 | else 384 | caller.State = 1 385 | SetVar(GlobalVars(), "sendColors", true) 386 | Echo("test 0") 387 | end 388 | SetVar(GlobalVars(), "forceReload", true) 389 | end 390 | 391 | signalTable.SendNamesClicked = function(caller) 392 | if (caller.State == 1) then 393 | caller.State = 0 394 | SetVar(GlobalVars(), "sendNames", false) 395 | else 396 | caller.State = 1 397 | SetVar(GlobalVars(), "sendNames", true) 398 | end 399 | SetVar(GlobalVars(), "forceReload", true) 400 | end 401 | 402 | signalTable.SendTimecodeClicked = function(caller) 403 | if (caller.State == 1) then 404 | caller.State = 0 405 | SetVar(GlobalVars(), "sendTimecode", false) 406 | else 407 | caller.State = 1 408 | SetVar(GlobalVars(), "sendTimecode", true) 409 | end 410 | SetVar(GlobalVars(), "forceReload", true) 411 | end 412 | 413 | signalTable.FixedPageNrChanged = function(caller) 414 | local pageNr = tonumber(caller.Content) or 0 415 | if pageNr < 0 then 416 | pageNr = 0 417 | caller.Content = "0" 418 | elseif pageNr > 999 then 419 | pageNr = 999 420 | caller.Content = "999" 421 | end 422 | SetVar(GlobalVars(), "fixedPageNr", pageNr) 423 | SetVar(GlobalVars(), "forceReload", true) 424 | Echo("Fixed Page Number changed: " .. pageNr) 425 | end 426 | end 427 | 428 | -- Run the plugin. 429 | return CreateCheckBoxDialog 430 | -------------------------------------------------------------------------------- /mappings/xTouch2.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "mc", 3 | "buttonFeedbackMapper": "function(value) { if (value == 'On') { return 127;} if (value == 'Off'){ return 0;} return 0; }", 4 | "enableTimecodeSend": true, 5 | "pitch": { 6 | "1": 201, 7 | "2": 202, 8 | "3": 203, 9 | "4": 204, 10 | "5": 205, 11 | "6": 206, 12 | "7": 207, 13 | "8": 208, 14 | "9": 209 15 | }, 16 | "rltvControl": { 17 | "16": { 18 | "exec": 301, 19 | "currValue": 0, 20 | "posFrom": 1, 21 | "posTo": 8, 22 | "negFrom": 65, 23 | "negTo": 72, 24 | "returnChannel": 48, 25 | "returnFrom": 32, 26 | "returnTo": 43 27 | }, 28 | "17": { 29 | "exec": 302, 30 | "currValue": 0, 31 | "posFrom": 1, 32 | "posTo": 8, 33 | "negFrom": 65, 34 | "negTo": 72, 35 | "returnChannel": 49, 36 | "returnFrom": 32, 37 | "returnTo": 43 38 | }, 39 | "18": { 40 | "exec": 303, 41 | "currValue": 0, 42 | "posFrom": 1, 43 | "posTo": 8, 44 | "negFrom": 65, 45 | "negTo": 72, 46 | "returnChannel": 50, 47 | "returnFrom": 32, 48 | "returnTo": 43 49 | }, 50 | "19": { 51 | "exec": 304, 52 | "currValue": 0, 53 | "posFrom": 1, 54 | "posTo": 8, 55 | "negFrom": 65, 56 | "negTo": 72, 57 | "returnChannel": 51, 58 | "returnFrom": 32, 59 | "returnTo": 43 60 | }, 61 | "20": { 62 | "exec": 305, 63 | "currValue": 0, 64 | "posFrom": 1, 65 | "posTo": 8, 66 | "negFrom": 65, 67 | "negTo": 72, 68 | "returnChannel": 52, 69 | "returnFrom": 32, 70 | "returnTo": 43 71 | }, 72 | "21": { 73 | "exec": 306, 74 | "currValue": 0, 75 | "posFrom": 1, 76 | "posTo": 8, 77 | "negFrom": 65, 78 | "negTo": 72, 79 | "returnChannel": 53, 80 | "returnFrom": 32, 81 | "returnTo": 43 82 | }, 83 | "22": { 84 | "exec": 307, 85 | "currValue": 0, 86 | "posFrom": 1, 87 | "posTo": 8, 88 | "negFrom": 65, 89 | "negTo": 72, 90 | "returnChannel": 54, 91 | "returnFrom": 32, 92 | "returnTo": 43 93 | }, 94 | "23": { 95 | "exec": 308, 96 | "currValue": 0, 97 | "posFrom": 1, 98 | "posTo": 8, 99 | "negFrom": 65, 100 | "negTo": 72, 101 | "returnChannel": 55, 102 | "returnFrom": 32, 103 | "returnTo": 43 104 | }, 105 | "60": { 106 | "attribute": "current", 107 | "posFrom": 1, 108 | "posTo": 1, 109 | "negFrom": 65, 110 | "negTo": 65, 111 | "amount": 1.0 112 | } 113 | }, 114 | "control": {}, 115 | "note": { 116 | "0": { 117 | "exec": 401 118 | }, 119 | "1": { 120 | "exec": 402 121 | }, 122 | "2": { 123 | "exec": 403 124 | }, 125 | "3": { 126 | "exec": 404 127 | }, 128 | "4": { 129 | "exec": 405 130 | }, 131 | "5": { 132 | "exec": 406 133 | }, 134 | "6": { 135 | "exec": 407 136 | }, 137 | "7": { 138 | "exec": 408 139 | }, 140 | "8": { 141 | "exec": 201 142 | }, 143 | "9": { 144 | "exec": 202 145 | }, 146 | "10": { 147 | "exec": 203 148 | }, 149 | "11": { 150 | "exec": 204 151 | }, 152 | "12": { 153 | "exec": 205 154 | }, 155 | "13": { 156 | "exec": 206 157 | }, 158 | "14": { 159 | "exec": 207 160 | }, 161 | "15": { 162 | "exec": 208 163 | }, 164 | "16": { 165 | "exec": 301 166 | }, 167 | "17": { 168 | "exec": 302 169 | }, 170 | "18": { 171 | "exec": 303 172 | }, 173 | "19": { 174 | "exec": 304 175 | }, 176 | "20": { 177 | "exec": 305 178 | }, 179 | "21": { 180 | "exec": 306 181 | }, 182 | "22": { 183 | "exec": 307 184 | }, 185 | "23": { 186 | "exec": 308 187 | }, 188 | "24": { 189 | "exec": 101 190 | }, 191 | "25": { 192 | "exec": 102 193 | }, 194 | "26": { 195 | "exec": 103 196 | }, 197 | "27": { 198 | "exec": 104 199 | }, 200 | "28": { 201 | "exec": 105 202 | }, 203 | "29": { 204 | "exec": 106 205 | }, 206 | "30": { 207 | "exec": 107 208 | }, 209 | "31": { 210 | "exec": 108 211 | }, 212 | "32": { 213 | "exec": 101 214 | }, 215 | "33": { 216 | "exec": 102 217 | }, 218 | "34": { 219 | "exec": 103 220 | }, 221 | "35": { 222 | "exec": 104 223 | }, 224 | "36": { 225 | "exec": 105 226 | }, 227 | "37": { 228 | "exec": 106 229 | }, 230 | "38": { 231 | "exec": 107 232 | }, 233 | "39": { 234 | "exec": 108 235 | }, 236 | "40": { 237 | "cmd": "Call ViewButton 1.1", 238 | "minValue": 100, 239 | "permanentFeedback": 127 240 | }, 241 | "41": { 242 | "cmd": "Call ViewButton 1.4", 243 | "minValue": 100, 244 | "permanentFeedback": 127 245 | }, 246 | "42": { 247 | "cmd": "Call ViewButton 1.2", 248 | "minValue": 100, 249 | "permanentFeedback": 127 250 | }, 251 | "43": { 252 | "cmd": "Menu 'PlaybackControl'", 253 | "minValue": 100, 254 | "permanentFeedback": 127 255 | }, 256 | "44": { 257 | "cmd": "Call ViewButton 1.3", 258 | "minValue": 100, 259 | "permanentFeedback": 127 260 | }, 261 | "45": { 262 | "cmd": "Menu 'CommandControl'", 263 | "minValue": 100, 264 | "permanentFeedback": 127 265 | }, 266 | "46": { 267 | "cmd": "Previous Page", 268 | "minValue": 100, 269 | "permanentFeedback": 127 270 | }, 271 | "47": { 272 | "cmd": "Next Page", 273 | "minValue": 100, 274 | "permanentFeedback": 127 275 | }, 276 | "48": { 277 | "local": "encoderFine", 278 | "minValue": 100 279 | }, 280 | "49": { 281 | "local": "encoderRough", 282 | "minValue": 100 283 | }, 284 | "50": { 285 | "cmd": "HIGHLIGHT", 286 | "minValue": 100 287 | }, 288 | "51": { 289 | "cmd": "BLIND", 290 | "minValue": 100 291 | }, 292 | "52": { 293 | "timecodeSelect": true, 294 | "minValue": 100 295 | }, 296 | "53": { 297 | "timecodePlayPause": true 298 | }, 299 | "54": { 300 | "local": "attribute", 301 | "attribute": "dimmer" 302 | }, 303 | "55": { 304 | "local": "attribute", 305 | "attribute": "pan" 306 | }, 307 | "56": { 308 | "local": "attribute", 309 | "attribute": "tilt" 310 | }, 311 | "57": { 312 | "local": "attribute", 313 | "attribute": "Zoom" 314 | }, 315 | "58": { 316 | "local": "attribute", 317 | "attribute": "ColorRGB_R" 318 | }, 319 | "59": { 320 | "local": "attribute", 321 | "attribute": "ColorRGB_G" 322 | }, 323 | "60": { 324 | "local": "attribute", 325 | "attribute": "ColorRGB_B" 326 | }, 327 | "61": { 328 | "local": "attribute", 329 | "attribute": "ColorRGB_W" 330 | }, 331 | "62": { 332 | "quicKey": "Fixture", 333 | "minValue": 100, 334 | "permanentFeedback": 127 335 | }, 336 | "63": { 337 | "quicKey": "Channel", 338 | "minValue": 100, 339 | "permanentFeedback": 127 340 | }, 341 | "64": { 342 | "quicKey": "Group", 343 | "minValue": 100 , 344 | "permanentFeedback": 127 345 | }, 346 | "65": { 347 | "quicKey": "Preset", 348 | "minValue": 100, 349 | "permanentFeedback": 127 350 | }, 351 | "66": { 352 | "quicKey": "Sequence", 353 | "minValue": 100, 354 | "permanentFeedback": 127 355 | }, 356 | "67": { 357 | "quicKey": "Cue", 358 | "minValue": 100, 359 | "permanentFeedback": 127 360 | }, 361 | "68": { 362 | "cmd": "Menu 'MenuSelector'", 363 | "minValue": 100, 364 | "permanentFeedback": 127 365 | }, 366 | "69": { 367 | "cmd": "SaveShow", 368 | "minValue": 100, 369 | "permanentFeedback": 127 370 | }, 371 | "70": { 372 | "quicKey": "Esc", 373 | "minValue": 100, 374 | "permanentFeedback": 127 375 | }, 376 | "71": { 377 | "quicKey": "Select", 378 | "minValue": 100, 379 | "permanentFeedback": 127 380 | }, 381 | "72": { 382 | "quicKey": "Freeze", 383 | "minValue": 100, 384 | "permanentFeedback": 127 385 | }, 386 | "73": { 387 | "quicKey": "Solo", 388 | "minValue": 100, 389 | "permanentFeedback": 127 390 | }, 391 | "74": { 392 | "quicKey": "Please", 393 | "minValue": 100, 394 | "permanentFeedback": 127 395 | }, 396 | "75": { 397 | "quicKey": "Delete", 398 | "minValue": 100, 399 | "permanentFeedback": 127 400 | }, 401 | "76": { 402 | "quicKey": "Oops", 403 | "minValue": 100, 404 | "permanentFeedback": 127 405 | }, 406 | "77": { 407 | "quicKey": "Copy", 408 | "minValue": 100, 409 | "permanentFeedback": 127 410 | }, 411 | "78": { 412 | "quicKey": "Move", 413 | "minValue": 100, 414 | "permanentFeedback": 127 415 | }, 416 | "79": { 417 | "cmd": "EditRecipe Programmer", 418 | "minValue": 100, 419 | "permanentFeedback": 127 420 | }, 421 | "80": { 422 | "cmd": "Go-", 423 | "minValue": 100, 424 | "permanentFeedback": 127 425 | }, 426 | "81": { 427 | "cmd": "Go+", 428 | "minValue": 100, 429 | "permanentFeedback": 127 430 | }, 431 | "82": { 432 | "quicKey": "Stomp", 433 | "minValue": 100, 434 | "permanentFeedback": 127 435 | }, 436 | "83": { 437 | "quicKey": "Off", 438 | "minValue": 100, 439 | "permanentFeedback": 127 440 | }, 441 | "84": { 442 | "quicKey": "Full", 443 | "minValue": 100, 444 | "permanentFeedback": 127 445 | }, 446 | "85": { 447 | "quicKey": "Align", 448 | "minValue": 100, 449 | "permanentFeedback": 127 450 | }, 451 | "86": { 452 | "quicKey": "Assign", 453 | "minValue": 100, 454 | "permanentFeedback": 127 455 | }, 456 | "87": { 457 | "quicKey": "Edit", 458 | "minValue": 100, 459 | "permanentFeedback": 127 460 | }, 461 | "88": { 462 | "quicKey": "Update", 463 | "minValue": 100, 464 | "permanentFeedback": 127 465 | }, 466 | "89": { 467 | "quicKey": "Store", 468 | "minValue": 100, 469 | "permanentFeedback": 127 470 | }, 471 | "90": { 472 | "quicKey": "Clear", 473 | "minValue": 100, 474 | "permanentFeedback": 127 475 | }, 476 | "91": { 477 | "cmd": "Top Timecode", 478 | "minValue": 100, 479 | "permanentFeedback": 127 480 | }, 481 | "92": { 482 | "cmd": "Go+ Timecode", 483 | "minValue": 100, 484 | "permanentFeedback": 127 485 | }, 486 | "93": { 487 | "cmd": "Pause Timecode", 488 | "minValue": 100, 489 | "permanentFeedback": 127 490 | }, 491 | "94": { 492 | "cmd": "Go+ Timecode", 493 | "minValue": 100, 494 | "permanentFeedback": 127 495 | }, 496 | "95": { 497 | "cmd": "Record Timecode", 498 | "minValue": 100, 499 | "permanentFeedback": 127 500 | }, 501 | "96": { 502 | "cmd": "UP", 503 | "minValue": 100, 504 | "permanentFeedback": 127 505 | }, 506 | "97": { 507 | "cmd": "DOWN", 508 | "minValue": 100, 509 | "permanentFeedback": 127 510 | }, 511 | "98": { 512 | "cmd": "PREVIOUS", 513 | "minValue": 100, 514 | "permanentFeedback": 127 515 | }, 516 | "99": { 517 | "cmd": "NEXT", 518 | "minValue": 100, 519 | "permanentFeedback": 127 520 | }, 521 | "100": { 522 | "cmd": "Set", 523 | "minValue": 100, 524 | "permanentFeedback": 127 525 | }, 526 | "101": { 527 | "cmd": "Store", 528 | "minValue": 100, 529 | "permanentFeedback": 127 530 | } 531 | }, 532 | "display": { 533 | "0": 201, 534 | "1": 202, 535 | "2": 203, 536 | "3": 204, 537 | "4": 205, 538 | "5": 206, 539 | "6": 207, 540 | "7": 208 541 | } 542 | } 543 | -------------------------------------------------------------------------------- /pam-OSC-Module.js: -------------------------------------------------------------------------------- 1 | // pam-OSC. It allows to controll GrandMA3 with Midi Devices over Open Stage Controll and allows for Feedback from MA. 2 | // Copyright (C) 2024 xxpasixx 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | // Todo: Refactor: This is only a temp solution 18 | var displayDevice = null; 19 | var colors = ["0;0;0;0", "0;0;0;0", "0;0;0;0", "0;0;0;0", "0;0;0;0", "0;0;0;0", "0;0;0;0", "0;0;0;0"]; 20 | var deskLocked = false; 21 | 22 | const utils = require("./utils.js"); 23 | const colorUtils = require("./colorUtils.js"); 24 | const routingUtils = require("./routingUtils.js"); 25 | const midiUtils = require("./midiUtils.js"); 26 | const oscUtils = require("./oscUtils.js"); 27 | 28 | var routing = {}; 29 | 30 | let encoderFine = false; 31 | let encoderRough = false; 32 | let currentAttribute = "dimmer"; 33 | let timecode = { 34 | selectedSlot: 0, 35 | slots: {}, 36 | }; 37 | 38 | var prefix = ""; 39 | var page = "1"; 40 | 41 | const ipPort = ("" + settings.read("send")).split(":"); 42 | const ip = ipPort[0]; 43 | const oscPort = ipPort[1]; 44 | 45 | settings.read("midi").forEach((deviceMidi) => { 46 | const name = deviceMidi.split(":")[0]; 47 | const fileName = name + ".json"; 48 | 49 | 50 | const value = loadJSON("mappings/" + fileName, (e) => 51 | console.error( 52 | "The Mapping " + 53 | fileName + 54 | " could not be found. Please make sure it exists, or rename your MIDI Device name to a existing one" 55 | ) 56 | ); 57 | value.buttonFeedbackMapper = eval("(" + value.buttonFeedbackMapper + ")"); 58 | for (let note in value.note) { 59 | if (!value.note[note].buttonFeedbackMapper) { 60 | continue; 61 | } 62 | value.note[note].buttonFeedbackMapper = eval("(" + value.note[note].buttonFeedbackMapper + ")"); 63 | } 64 | routing[name] = value; 65 | }); 66 | 67 | midiUtils.sendAttributeLED(routing, currentAttribute); 68 | midiUtils.sendPermanentFeedback(routing); 69 | 70 | for (let device of Object.keys(routing)) { 71 | if (routing[device].enableTimecodeSend) { 72 | midiUtils.resetSegments(routing, device); 73 | midiUtils.sendSegment(routing, device, 1, timecode.selectedSlot); 74 | } 75 | } 76 | 77 | setTimeout(function () { 78 | oscUtils.triggerForceReload(ip, oscPort, prefix); 79 | }, 500); 80 | 81 | module.exports = { 82 | oscInFilter: function (data) { 83 | var { address, args, host, port } = data; 84 | 85 | if (address === "/status/deskLocked" && args.length > 0) { 86 | const lockStatus = args[0]; 87 | if (lockStatus.type === 'T') { 88 | deskLocked = true; 89 | } else if (lockStatus.type === 'F') { 90 | deskLocked = false; 91 | } 92 | return; 93 | } 94 | 95 | if (deskLocked && host === "midi") { 96 | console.log("Desk is locked - blocking OSC event:", address); 97 | return; 98 | } 99 | 100 | if (host === "midi") { 101 | if (address === "/control") { 102 | var [channel, ctrl, value] = args.map((arg) => arg.value); 103 | if (routing[port]["control"][ctrl]) { 104 | send(ip, oscPort, prefix + "/Page" + page + "/Fader" + routing[port]["control"][ctrl], { 105 | type: "i", 106 | value: value, 107 | }); 108 | } 109 | 110 | if (!routing[port]["rltvControl"]) { 111 | return; 112 | } 113 | // handle relative Rotary encoders to act as Absolute 114 | if (routing[port]["rltvControl"][ctrl] && routing[port]["rltvControl"][ctrl].exec) { 115 | const { exec, currValue, posFrom, posTo, negFrom, negTo } = routing[port]["rltvControl"][ctrl]; 116 | 117 | // Handle GrandMA encoders Knobs (Playback Section) with relative values 118 | if(routing[port]["rltvControl"][ctrl].exec > 300) { 119 | var relativeValue = utils.getRelativeValue(value, posFrom, posTo, negFrom, negTo); 120 | send(ip, oscPort, prefix + "/Page" + page + "/Encoder" + exec, { 121 | type: "i", 122 | value: relativeValue, 123 | }); 124 | } 125 | 126 | // Handly others as Faders 127 | var newValue = currValue + utils.getRelativeValue(value, posFrom, posTo, negFrom, negTo); 128 | newValue = Math.min(Math.max(newValue, 0), 127) || 0; 129 | routing[port]["rltvControl"][ctrl].currValue = newValue; 130 | 131 | send(ip, oscPort, prefix + "/Page" + page + "/Fader" + exec, { 132 | type: "i", 133 | value: newValue, 134 | }); 135 | } 136 | 137 | // handle attribute Encoders 138 | if (routing[port]["rltvControl"][ctrl] && routing[port]["rltvControl"][ctrl].attribute) { 139 | const { attribute, posFrom, posTo, negFrom, negTo, amount } = routing[port]["rltvControl"][ctrl]; 140 | 141 | let change = utils.getRelativeValue(value, posFrom, posTo, negFrom, negTo) * amount; 142 | change = encoderFine ? change / 10 : change; 143 | change = encoderRough ? change * 10 : change; 144 | const plusMinus = change > 0 ? " + " : " - "; 145 | const attributeToSend = attribute == "current" ? currentAttribute : attribute; 146 | send(ip, oscPort, prefix + "/cmd", { 147 | type: "s", 148 | value: "Attribute " + attributeToSend + " at " + plusMinus + Math.abs(change), 149 | }); 150 | } 151 | } 152 | if (address === "/pitch") { 153 | var [channel, value] = args.map((arg) => arg.value); 154 | if (!routing[port]["pitch"] || !routing[port]["pitch"][channel]) { 155 | return; 156 | } 157 | const valueMapped = Math.round((value / 16380) * 127); 158 | send(ip, oscPort, prefix + "/Page" + page + "/Fader" + routing[port]["pitch"][channel], { 159 | type: "i", 160 | value: valueMapped, 161 | }); 162 | } 163 | if (address === "/note") { 164 | var [channel, ctrl, value] = args.map((arg) => arg.value); 165 | var config = routing[port]["note"][ctrl]; 166 | 167 | if (!config) { 168 | return; 169 | } 170 | 171 | if (config.minValue && value <= config.minValue) { 172 | return; 173 | } 174 | 175 | if (routing[port].enableTimecodeSend) { 176 | if (config.timecodeSelect) { 177 | let slotNum = timecode.selectedSlot; 178 | 179 | slotNum = (slotNum + 1) % 9; 180 | 181 | midiUtils.resetSegments(routing, port); 182 | midiUtils.sendSegment(routing, port, 1, slotNum); 183 | 184 | if (timecode.slots[slotNum]) midiUtils.updateSegmentsBySlot(routing, timecode.slots[slotNum]); 185 | 186 | timecode.selectedSlot = slotNum; 187 | } 188 | 189 | if (config.timecodePlayPause && timecode.selectedSlot != 0) { 190 | const slotNum = timecode.selectedSlot; 191 | const slot = timecode.slots[slotNum]; 192 | 193 | if (value > 0) { 194 | timecode.btnTimeout = setTimeout(() => { 195 | slot.running = false; 196 | slot.cleared = true; 197 | 198 | send(ip, oscPort, "/cmd", { 199 | type: "s", 200 | value: "Off Timecodeslot " + slotNum, 201 | }); 202 | }, 500); 203 | } else { 204 | clearTimeout(timecode.btnTimeout); 205 | 206 | if (slot?.cleared) { 207 | slot.cleared = false; 208 | } else if (slot?.running) { 209 | slot.running = false; 210 | 211 | send(ip, oscPort, "/cmd", { 212 | type: "s", 213 | value: "Pause Timecodeslot " + slotNum, 214 | }); 215 | } else if (slot) { 216 | slot.running = true; 217 | 218 | send(ip, oscPort, "/cmd", { 219 | type: "s", 220 | value: "Go+ Timecodeslot " + slotNum, 221 | }); 222 | } 223 | } 224 | } 225 | } 226 | 227 | if (config.exec) { 228 | send(ip, oscPort, prefix + "/Page" + page + "/Key" + config.exec, { 229 | type: "i", 230 | value: value, 231 | }); 232 | } 233 | 234 | if (config.quicKey) { 235 | send(ip, oscPort, prefix + "/cmd", { 236 | type: "s", 237 | value: 'Go+ Quickey "' + config.quicKey + '"', 238 | }); 239 | } 240 | 241 | if (config.cmd) { 242 | send(ip, oscPort, prefix + "/cmd", { 243 | type: "s", 244 | value: config.cmd, 245 | }); 246 | } 247 | 248 | if (config.local) { 249 | if (config.local == "encoderRough") { 250 | encoderRough = !encoderRough; 251 | midiUtils.sendNoteResponse(routing, port, ctrl, encoderRough ? "On" : "Off", null, 1); 252 | } 253 | if (config.local == "encoderFine") { 254 | encoderFine = !encoderFine; 255 | midiUtils.sendNoteResponse(routing, port, ctrl, encoderFine ? "On" : "Off", null, 1); 256 | } 257 | 258 | if (config.local == "attribute" && config.attribute) { 259 | currentAttribute = config.attribute; 260 | midiUtils.sendAttributeLED(routing, currentAttribute); 261 | } 262 | } 263 | } 264 | return; 265 | } 266 | 267 | if (host === ip) { 268 | const addressSplit = address.split("/"); 269 | const fader = address.substring(address.length - 3, address.length); 270 | 271 | if (addressSplit[2]?.includes("Fader")) { 272 | const mappingsCtrl = routingUtils.getRoutingByControlerId(routing, fader); 273 | const mappingsPitch = routingUtils.getRoutingByPitchId(routing, fader); 274 | const mappingsRltvCtrl = routingUtils.getRoutingByRltvControlerId(routing, fader); 275 | 276 | mappingsCtrl.forEach((mapping) => { 277 | send("midi", mapping.device, "/control", 1, mapping.midiId, args[0].value); 278 | }); 279 | 280 | mappingsPitch.forEach((mapping) => { 281 | const valueMapped = Math.round((args[0].value / 127) * 16380); 282 | send("midi", mapping.device, "/pitch", mapping.midiId, valueMapped); 283 | }); 284 | 285 | mappingsRltvCtrl.forEach((mapping) => { 286 | const value = utils.mapValue(args[0].value, 0, 127, mapping.from, mapping.to); 287 | routing[mapping.device].rltvControl[mapping.id].currValue = args[0].value; 288 | send("midi", mapping.device, "/control", 1, mapping.midiId, value); 289 | }); 290 | } 291 | if (addressSplit[2]?.includes("Button")) { 292 | const mappings = routingUtils.getRoutingNoteByExecId(routing, fader); 293 | mappings.forEach((mapping) => { 294 | const value = mapping.permanentFeedback || args[0].value; 295 | midiUtils.sendNoteResponse(routing, mapping.device, mapping.midiId, value, mapping.buttonFeedbackMapper, mapping.midiChannel); 296 | }); 297 | } 298 | if (address?.includes("/updatePage/current")) { 299 | page = "" + args[0].value; 300 | } 301 | if (addressSplit[1]?.includes("masterEnabled")) { 302 | const mappings = routingUtils.getRoutingNoteByCMD(routing, addressSplit[2]); 303 | 304 | mappings.forEach((mapping) => { 305 | const value = mapping.permanentFeedback || args[0].value ? "On" : "Off"; 306 | midiUtils.sendNoteResponse(routing, mapping.device, mapping.midiId, value, mapping.buttonFeedbackMapper, mapping.midiChannel); 307 | }); 308 | } 309 | 310 | if (addressSplit[2]?.includes("Color")) { 311 | const mappingsDisplay = routingUtils.getRoutingByDisplayId(routing, fader); 312 | 313 | mappingsDisplay.forEach((mapping) => { 314 | colors[mapping.displayId] = args[0].value; 315 | displayDevice = mapping.device; 316 | }); 317 | 318 | if (!displayDevice) { 319 | return; 320 | } 321 | var midiCommand = "F0 00 00 66 14 72"; 322 | colors.forEach((colorString) => { 323 | const color = colorUtils.parseColorString(colorString); 324 | const displayColor = colorUtils.findNearestDisplayColor(color); 325 | midiCommand = midiCommand + displayColor + " "; 326 | }); 327 | send("midi", displayDevice, "/sysex", midiCommand + "F7"); 328 | } 329 | 330 | if (addressSplit[2]?.includes("Name")) { 331 | const mappingsDisplay = routingUtils.getRoutingByDisplayId(routing, fader); 332 | const values = args[0].value.split(";"); 333 | 334 | mappingsDisplay.forEach((mapping) => { 335 | const seqMidiNote = utils.numberIntoHex(mapping.displayId * 7); 336 | const cueMidiNote = utils.numberIntoHex(56 + mapping.displayId * 7); 337 | const seq = (values[0] + " ").substring(0, 7); 338 | const cue = (values[1] + " ").substring(0, 7); 339 | 340 | send( 341 | "midi", 342 | mapping.device, 343 | "/sysex", 344 | "f0 00 00 66 14 12 " + seqMidiNote + " " + utils.stringToAsciiHex(seq) + "f7" 345 | ); 346 | send( 347 | "midi", 348 | mapping.device, 349 | "/sysex", 350 | "f0 00 00 66 14 12 " + cueMidiNote + " " + utils.stringToAsciiHex(cue) + "f7" 351 | ); 352 | }); 353 | } 354 | 355 | for (let device of Object.keys(routing)) { 356 | if (routing[device].enableTimecodeSend) { 357 | if (addressSplit[1]?.includes("Timecode")) { 358 | let slot = addressSplit[1].slice(-1); 359 | 360 | if (!isNaN(slot)) { 361 | slot = parseInt(slot); 362 | 363 | const time = args[0].value; 364 | 365 | const hrsIndex = time.indexOf("h"); 366 | const minIndex = time.indexOf("m"); 367 | const secIndex = time.indexOf(":"); 368 | 369 | const hrs = hrsIndex == -1 ? "0" : time.substring(0, hrsIndex); 370 | const mins = minIndex == -1 ? "0" : time.substring(hrsIndex + 1, minIndex); 371 | const secs = time.substring(minIndex + 1, secIndex); 372 | const mili = time.substring(secIndex + 1); 373 | 374 | const updateChanges = (key, value) => { 375 | if (!timecode.slots[slot]) timecode.slots[slot] = {}; 376 | 377 | if (timecode.slots[slot][key] != value) timecode.slots[slot][key] = value; 378 | }; 379 | 380 | updateChanges("hrs", hrs); 381 | updateChanges("mins", mins); 382 | updateChanges("secs", secs); 383 | updateChanges("mili", mili); 384 | 385 | if (timecode.selectedSlot == slot) { 386 | midiUtils.updateSegmentsBySlot(routing, timecode.slots[slot]); 387 | } 388 | } 389 | } 390 | 391 | // Check if the message from MA3 contains an address in the timecode slot pool 392 | if (addressSplit[1]?.startsWith("14.")) { 393 | const slotNum = addressSplit[1].substring(3); 394 | 395 | if (!isNaN(slotNum) && timecode.slots[slotNum]) { 396 | timecode.slots[slotNum].running = args[0].value === "Go+"; 397 | } 398 | } 399 | } 400 | } 401 | } 402 | 403 | return { address, args, host, port }; 404 | }, 405 | }; 406 | -------------------------------------------------------------------------------- /gma3_library/datapools/plugins/pam-osc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------