diff --git a/examples/page10-multitrack.companionconfig b/examples/page10-multitrack.companionconfig index def04b0..4e051be 100644 --- a/examples/page10-multitrack.companionconfig +++ b/examples/page10-multitrack.companionconfig @@ -11,9 +11,9 @@ "1": { "type": "button", "style": { - "text": "REC", + "text": "Play/\\nStop", "textExpression": false, - "size": "24", + "size": "18", "png64": null, "alignment": "center:center", "pngalignment": "center:center", @@ -30,11 +30,11 @@ }, "feedbacks": [ { - "id": "_tgBE7DC4KmRmHo0QAH4M", - "type": "mtkrecordstate", + "id": "ieB_drW6XE2VnoZrQ60yu", + "type": "mtkplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": "rec" + "state": 2 }, "style": { "color": 16777215, @@ -43,15 +43,15 @@ "isInverted": false }, { - "id": "xSXcmezW-lPZkTqlQHmOn", - "type": "mtkrecordstate", + "id": "xqWFb-Kstrg0f4ngceA2S", + "type": "mtkplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": "busy" + "state": 0 }, "style": { "color": 16777215, - "bgcolor": 16750899 + "bgcolor": 65280 }, "isInverted": false } @@ -61,8 +61,8 @@ "action_sets": { "down": [ { - "id": "KWh56YYi2ghr0lNTIjMh2", - "action": "mtkrecordtoggle", + "id": "1OF6l9mdikzvkkSUEOGrg", + "action": "mtkplay", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": {}, "delay": 0 @@ -79,7 +79,7 @@ "2": { "type": "button", "style": { - "text": "Play/\\nStop", + "text": "Pause", "textExpression": false, "size": "18", "png64": null, @@ -98,28 +98,15 @@ }, "feedbacks": [ { - "id": "UWsBoUD_g_o2yxqoupReG", - "type": "mtkplayerstate", - "instance_id": "K5mVTsGHIPgqYkyqYxEWS", - "options": { - "state": 2 - }, - "style": { - "color": 16777215, - "bgcolor": 16711680 - }, - "isInverted": false - }, - { - "id": "HXpTjGg0e8iQ4CXFmS0z2", + "id": "IHtSSTP4b32vRZEw_izTB", "type": "mtkplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": 0 + "state": 1 }, "style": { "color": 16777215, - "bgcolor": 65280 + "bgcolor": 16750899 }, "isInverted": false } @@ -129,8 +116,8 @@ "action_sets": { "down": [ { - "id": "ztl7i6LaR84JxcaUPNkHP", - "action": "mtkplay", + "id": "bBRFyJbUrbPq6-EjUCMPQ", + "action": "mtkstop", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": {}, "delay": 0 @@ -147,7 +134,7 @@ "3": { "type": "button", "style": { - "text": "Pause", + "text": "STOP", "textExpression": false, "size": "18", "png64": null, @@ -166,15 +153,15 @@ }, "feedbacks": [ { - "id": "Up92DtuUW5T7SomIJZDWp", + "id": "qDLTzGZnr6qG_FLz-6clC", "type": "mtkplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": 1 + "state": 2 }, "style": { "color": 16777215, - "bgcolor": 16750899 + "bgcolor": 16711680 }, "isInverted": false } @@ -184,8 +171,8 @@ "action_sets": { "down": [ { - "id": "eKWENz41m8jiPhyHo-ZON", - "action": "mtkstop", + "id": "hjb_KinCQX1fCxUxpRH60", + "action": "mtkpause", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": {}, "delay": 0 @@ -198,11 +185,16 @@ } } } + } + }, + "1": { + "0": { + "type": "pagenum" }, - "4": { + "1": { "type": "button", "style": { - "text": "STOP", + "text": "Sound\\ncheck", "textExpression": false, "size": "18", "png64": null, @@ -210,9 +202,7 @@ "pngalignment": "center:center", "color": 16777215, "bgcolor": 0, - "show_topbar": "default", - "png": null, - "latch": false + "show_topbar": "default" }, "options": { "relativeDelay": false, @@ -221,15 +211,15 @@ }, "feedbacks": [ { - "id": "w4AyFoqOh6JJflpq3_Whr", - "type": "mtkplayerstate", + "id": "bz9DDlrWC2JO--4AryVOI", + "type": "mtksoundcheckstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": 2 + "state": true }, "style": { - "color": 16777215, - "bgcolor": 16711680 + "bgcolor": 65280, + "color": 16777215 }, "isInverted": false } @@ -239,10 +229,12 @@ "action_sets": { "down": [ { - "id": "DbbObWfesrBEJLp86PjZB", - "action": "mtkpause", + "id": "fD3TKOpJyJTcrZpbUqUxQ", + "action": "mtksoundcheck", "instance": "K5mVTsGHIPgqYkyqYxEWS", - "options": {}, + "options": { + "state": 2 + }, "delay": 0 } ], @@ -253,24 +245,21 @@ } } } - } - }, - "1": { - "0": { - "type": "pagenum" }, - "1": { + "2": { "type": "button", "style": { - "text": "Sound\\ncheck", + "text": "REC", "textExpression": false, - "size": "18", + "size": "24", "png64": null, "alignment": "center:center", "pngalignment": "center:center", "color": 16777215, "bgcolor": 0, - "show_topbar": "default" + "show_topbar": "default", + "png": null, + "latch": false }, "options": { "relativeDelay": false, @@ -279,15 +268,28 @@ }, "feedbacks": [ { - "id": "v0yY17Ds47sde_EG15jJf", - "type": "mtksoundcheckstate", + "id": "hxwKphso3PUaCh_ZP0aIl", + "type": "mtkrecordstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { - "state": true + "state": "rec" }, "style": { - "bgcolor": 65280, - "color": 16777215 + "color": 16777215, + "bgcolor": 16711680 + }, + "isInverted": false + }, + { + "id": "2XD1zLA3gHk6lX0vSKLAR", + "type": "mtkrecordstate", + "instance_id": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "state": "busy" + }, + "style": { + "color": 16777215, + "bgcolor": 16750899 }, "isInverted": false } @@ -297,12 +299,10 @@ "action_sets": { "down": [ { - "id": "XO4rD_oDiKQRkK73eEoFH", - "action": "mtksoundcheck", + "id": "QoAlIUAj0HbhuoORZu-Kf", + "action": "mtkrecordtoggle", "instance": "K5mVTsGHIPgqYkyqYxEWS", - "options": { - "state": 2 - }, + "options": {}, "delay": 0 } ], @@ -343,7 +343,7 @@ "action_sets": { "down": [ { - "id": "7JTDG4T2F0dM2GMYtStpe", + "id": "MuNnJGyOjPaLC7lRM26Co", "action": "mtksoundcheck", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -359,6 +359,45 @@ } } } + }, + "2": { + "type": "button", + "style": { + "text": "REC Start", + "textExpression": false, + "size": "18", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "Rou1h1w_NI2nuOLVeevFn", + "action": "mtkrecordstart", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": {}, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } }, "3": { @@ -386,7 +425,7 @@ "action_sets": { "down": [ { - "id": "Lg80_-6ay0ZM05NmYvigH", + "id": "5DnSZemjZ_er_7J2qpTJR", "action": "mtksoundcheck", "instance": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -402,6 +441,45 @@ } } } + }, + "2": { + "type": "button", + "style": { + "text": "REC Stop", + "textExpression": false, + "size": "18", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "ZGXw6p2dZDq3kq1Ii11qO", + "action": "mtkrecordstop", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": {}, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } } }, @@ -427,5 +505,5 @@ "lastUpgradeIndex": 1 } }, - "oldPageNumber": 11 + "oldPageNumber": 93 } \ No newline at end of file diff --git a/examples/page9-player.companionconfig b/examples/page9-player.companionconfig index 61b7158..5b77931 100644 --- a/examples/page9-player.companionconfig +++ b/examples/page9-player.companionconfig @@ -34,11 +34,12 @@ "action_sets": { "down": [ { - "id": "ItfKN_ACNeLL2nKK4pNoc", + "id": "ZefQBKZuCEa7EPesm5tNL", "label": "GiXDbh3CB:mediaprev", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediaprev", - "options": {} + "options": {}, + "delay": 0 } ], "up": [] @@ -71,7 +72,7 @@ }, "feedbacks": [ { - "id": "4wgqEuDMKO9cUk2R_9swZ", + "id": "zfkq1_E63a_SNRhuqt59k", "type": "mediaplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -84,7 +85,7 @@ "isInverted": false }, { - "id": "K3IKu2g69HPzgameYJNys", + "id": "FTiKIdeEpxXL46BMHdeTT", "type": "mediaplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -102,7 +103,7 @@ "action_sets": { "down": [ { - "id": "KpkMYIeCFQX4SQANoezAu", + "id": "LL4nW3PA4VSz-Hm8kicr4", "label": "GiXDbh3CB:mediaplay", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediaplay", @@ -140,7 +141,7 @@ }, "feedbacks": [ { - "id": "zhFFH7aIrFLSMd_yE8WAt", + "id": "84ZCAUhxQJ37bLtijPIFw", "type": "mediaplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -158,11 +159,12 @@ "action_sets": { "down": [ { - "id": "vqyHbcI2UCVA-sn2PwaZL", + "id": "R2k5fll9bHE8KQFPX9SGh", "label": "GiXDbh3CB:mediapause", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediapause", - "options": {} + "options": {}, + "delay": 0 } ], "up": [] @@ -195,7 +197,7 @@ }, "feedbacks": [ { - "id": "af8No1PbKHiHTzZAYPBM8", + "id": "jQU_2c1SmLe_wWep2r2c9", "type": "mediaplayerstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -213,7 +215,7 @@ "action_sets": { "down": [ { - "id": "Xc9dms1dp2P870iWRmEpM", + "id": "uCSSGomP_94dubpwJsTkl", "label": "GiXDbh3CB:mediastop", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediastop", @@ -254,7 +256,7 @@ "action_sets": { "down": [ { - "id": "9M4ivXwVOIIGEHdkDMO71", + "id": "eVD-cLC1oBheklLBRa5dj", "label": "GiXDbh3CB:medianext", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "medianext", @@ -291,7 +293,7 @@ }, "feedbacks": [ { - "id": "tyn4bAbyGA56VB__0zcQK", + "id": "B78IoJ-DHpxKqsT6EXrl9", "type": "dualtrackrecordstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -304,7 +306,7 @@ "isInverted": false }, { - "id": "oE67VReihBgkOlSDJDRd_", + "id": "7unsgdf7reaeEOZzHmfbP", "type": "dualtrackrecordstate", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -322,7 +324,7 @@ "action_sets": { "down": [ { - "id": "Ing-6Dhu__9sjMPmuUZs-", + "id": "85SPOFIJJHm6i95dWfGAI", "label": "GiXDbh3CB:dualtrackrecordtoggle", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "dualtrackrecordtoggle", @@ -369,13 +371,14 @@ "action_sets": { "down": [ { - "id": "z8M6sbi5dmTEX3_vHtICl", + "id": "D27YIs7zOjKdYJPDk7lWO", "label": "GiXDbh3CB:mediaswitchplist", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediaswitchplist", "options": { "playlist": "~all~" - } + }, + "delay": 0 } ], "up": [] @@ -410,7 +413,18 @@ "steps": { "0": { "action_sets": { - "down": [], + "down": [ + { + "id": "LJ3a5g7yP06-0ahhBJpa0", + "action": "mediaswitchtrack", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "playlist": "~all~", + "track": "Meetup/Music/Power_Shutoff.mp3" + }, + "delay": 0 + } + ], "up": [] }, "options": { @@ -445,13 +459,14 @@ "action_sets": { "down": [ { - "id": "kMkNc3BQwUjwPFGVRRQ6A", + "id": "3jJjWbJNJ6-GVxvng37ZC", "label": "GiXDbh3CB:mediasetplaymode", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediasetplaymode", "options": { "mode": "manual" - } + }, + "delay": 0 } ], "up": [] @@ -488,7 +503,7 @@ "action_sets": { "down": [ { - "id": "Yw1ovSQU5Ro28QPJ5tgRE", + "id": "HbaDDSPVuMNqLRmc_8-2f", "label": "GiXDbh3CB:mediasetshuffle", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediasetshuffle", @@ -504,6 +519,45 @@ } } } + }, + "7": { + "type": "button", + "style": { + "text": "REC Start", + "textExpression": false, + "size": "18", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "AbUW-bfOEi3F-zKzhU6wT", + "action": "dualtrackrecordstart", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": {}, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } }, "2": { @@ -536,13 +590,14 @@ "action_sets": { "down": [ { - "id": "gSX9H5uR1WzQ944Z4pEm9", + "id": "rOhMDAqyy8pMazJyhyR3x", "label": "GiXDbh3CB:mediaswitchplist", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediaswitchplist", "options": { "playlist": "Meetup" - } + }, + "delay": 0 } ], "up": [] @@ -577,7 +632,18 @@ "steps": { "0": { "action_sets": { - "down": [], + "down": [ + { + "id": "QSko8cW8BkQVnlnd7eC2a", + "action": "mediaswitchtrack", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": { + "playlist": "~all~", + "track": "Meetup/Music/Thinking_About_The_Universe.mp3" + }, + "delay": 0 + } + ], "up": [] }, "options": { @@ -612,13 +678,14 @@ "action_sets": { "down": [ { - "id": "hAG2n705iP3PvqnLdGAlL", + "id": "AT1ItN9_HWaf5uHzqgsOy", "label": "GiXDbh3CB:mediasetplaymode", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediasetplaymode", "options": { "mode": "auto" - } + }, + "delay": 0 } ], "up": [] @@ -655,7 +722,7 @@ "action_sets": { "down": [ { - "id": "rwvQbj253WzxC1l3MhrBl", + "id": "hhj95hZBWV55BbgBgA_gS", "label": "GiXDbh3CB:mediasetshuffle", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediasetshuffle", @@ -671,6 +738,45 @@ } } } + }, + "7": { + "type": "button", + "style": { + "text": "REC Stop", + "textExpression": false, + "size": "18", + "png64": null, + "alignment": "center:center", + "pngalignment": "center:center", + "color": 16777215, + "bgcolor": 0, + "show_topbar": "default" + }, + "options": { + "relativeDelay": false, + "rotaryActions": false, + "stepAutoProgress": true + }, + "feedbacks": [], + "steps": { + "0": { + "action_sets": { + "down": [ + { + "id": "MEdOAro-MCSVouzPTJUgR", + "action": "dualtrackrecordstop", + "instance": "K5mVTsGHIPgqYkyqYxEWS", + "options": {}, + "delay": 0 + } + ], + "up": [] + }, + "options": { + "runWhileHeld": [] + } + } + } } }, "3": { @@ -696,7 +802,7 @@ }, "feedbacks": [ { - "id": "MmDVUJ0mh_F26NdWenwyD", + "id": "S-zBSTsR4UNomyMKRbJzp", "type": "mediaplayershuffle", "instance_id": "K5mVTsGHIPgqYkyqYxEWS", "options": { @@ -714,7 +820,7 @@ "action_sets": { "down": [ { - "id": "NHOeeZ_SBNbmT9_2xClMU", + "id": "UikONbExQHrl0EU2d5X98", "label": "GiXDbh3CB:mediasetshuffle", "instance": "K5mVTsGHIPgqYkyqYxEWS", "action": "mediasetshuffle", @@ -756,5 +862,5 @@ "lastUpgradeIndex": 1 } }, - "oldPageNumber": 39 + "oldPageNumber": 94 } \ No newline at end of file diff --git a/package.json b/package.json index 23383dc..610a806 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@companion-module/base": "~1.8.0", "bufferutil": "^4.0.7", "rxjs": "7.8.1", - "soundcraft-ui-connection": "2.2.1", + "soundcraft-ui-connection": "2.3.0", "utf-8-validate": "^6.0.3" }, "devDependencies": { diff --git a/src/actions.ts b/src/actions.ts index ea2c8b1..c8c93cd 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -61,12 +61,16 @@ export enum ActionId { // 2-Track Recorder DTRecordToggle = 'dualtrackrecordtoggle', + DTRecordStart = 'dualtrackrecordstart', + DTRecordStop = 'dualtrackrecordstop', // Multi-Track Recorder MTKPlay = 'mtkplay', MTKPause = 'mtkstop', MTKStop = 'mtkpause', MTKRecordToggle = 'mtkrecordtoggle', + MTKRecordStart = 'mtkrecordstart', + MTKRecordStop = 'mtkrecordstop', MTKSoundcheck = 'mtksoundcheck', // MUTE Groups / ALL / FX @@ -582,6 +586,18 @@ export function GetActionsList(conn: SoundcraftUI): CompanionActionDefinitions { /** * 2-track Recorder */ + [ActionId.DTRecordStart]: { + name: '2-Track Recording: Record Start', + options: [], + callback: () => conn.recorderDualTrack.recordStart(), + }, + + [ActionId.DTRecordStop]: { + name: '2-Track Recording: Record Stop', + options: [], + callback: () => conn.recorderDualTrack.recordStop(), + }, + [ActionId.DTRecordToggle]: { name: '2-Track Recording: Record Toggle', options: [], @@ -609,6 +625,18 @@ export function GetActionsList(conn: SoundcraftUI): CompanionActionDefinitions { callback: () => conn.recorderMultiTrack.pause(), }, + [ActionId.MTKRecordStart]: { + name: 'Multitrack Recording: Record Start', + options: [], + callback: () => conn.recorderMultiTrack.recordStart(), + }, + + [ActionId.MTKRecordStop]: { + name: 'Multitrack Recording: Record Stop', + options: [], + callback: () => conn.recorderMultiTrack.recordStop(), + }, + [ActionId.MTKRecordToggle]: { name: 'Multitrack Recording: Record Toggle', options: [], diff --git a/yarn.lock b/yarn.lock index 00dc06a..0d76315 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3380,13 +3380,13 @@ __metadata: languageName: node linkType: hard -"soundcraft-ui-connection@npm:2.2.1": - version: 2.2.1 - resolution: "soundcraft-ui-connection@npm:2.2.1" +"soundcraft-ui-connection@npm:2.3.0": + version: 2.3.0 + resolution: "soundcraft-ui-connection@npm:2.3.0" dependencies: isomorphic-ws: "npm:^5.0.0" ws: "npm:^7.4.1" - checksum: f92dd2f30580f41b16bbc87c0a5a4d6a85664148c012adfc367423be286ab4de0664008ae03f50f0e462b28276bf61b82ded7ffc5336ed60b1e8fad511e12927 + checksum: 876a6dc74812c530116a2e89e142cf78c10f6e2805dca7a1ddfb886aa14a45aa73cbde2b7b5b81b3192b5ff2a44a2d985c8d589300c00c7b65a5553ba4c9b87d languageName: node linkType: hard @@ -3402,7 +3402,7 @@ __metadata: lint-staged: "npm:^15.2.0" rimraf: "npm:^5.0.5" rxjs: "npm:7.8.1" - soundcraft-ui-connection: "npm:2.2.1" + soundcraft-ui-connection: "npm:2.3.0" typescript: "npm:~5.2.2" utf-8-validate: "npm:^6.0.3" languageName: unknown