diff --git a/companion/HELP.md b/companion/HELP.md index 7b751bf..4816652 100644 --- a/companion/HELP.md +++ b/companion/HELP.md @@ -10,42 +10,141 @@ Enter the IP address, port of the media player. If a password is required, enter ## Actions - **Stop** -- **Play** -- **Record** -- **Pause** -- **Jog** -- **Shuttle** -- **Flash Load** -- **Eject** + + + STOP puts the controlled device into the stop state and also takes the controlled device out of input monitor mode. +- **Play** + + + Play puts the controlled device into playback mode and also brings the controlled device from record ready mode to recording mode. +- **Record** + + + RECORD puts the controlled device into record ready mode. It also numbers tracks during recording and puts the controlled device into input monitoring mode when no media is in the controlled device. +- **Pause** + + + READY puts the controlled device into playback standby mode or record ready mode. +- **Jog** + + + Enables JOG playback of the controlled device. +- **Shuttle** + + + SHUTTLE puts the controlled device into the shuttle mode. The controlled device remains in the shuttle mode until it receives a command such as STOP, PLAY, or PAUSE. +- **Flash Load** + + + FLASH LOAD puts the controlled device into Flash Load mode. +- **Eject** + + + EJECT ejects a CD Media from the controlled device. (If the controlled device is SS-R250N, it returns ILLEGAL [F2].) If the device selected on the controlled device is not CD, this command is ignored. - **Skip** + + SKIP allows the controlled device to skip a track. - **Call** + + + CALL locates the controlled device to a call point and puts the controlled device into the ready state. - **Auto Cue Select** + + + AUTO CUE SELECT turns the Auto-cue mode of the controlled device on or off. - **Auto Cue Level Preset** + + + AUTO CUE LEVEL PRESET sets the auto cue level of the controlled device. - **Direct Track Search Preset** + + + DIRECT TRACK SEARCH PRESET performs a search for a track on the controlled device by specifying the track number. - **Auto Track Select** + + + AUTO TRACK SELECT turns the Auto-cue mode of the controlled device on or off. - **Auto Track Level Preset** + + + AUTO TRACK LEVEL PRESET sets the auto track level of the controlled device. - **Sync Rec Level Preset** + SYNC REC LEVEL PRESET sets the level of the sync recording of the controlled device. - **Pitch Control Select** + + + PITCH CONTROL SELECT turns the pitch control mode of the controlled device on or off. - **Auto Ready Select** + + + AUTO READY SELECT turns the auto ready mode of the controlled device on or off. - **Repeat Mode** + + + REPEAT SELECT turns the repeat mode of the controlled device on or off. - **Sync Rec Select** + + + SYNC REC SELECT turns the sync rec mode of the controlled device on or off. - **Incremental Playback Select** + + + INCR PLAY SELECT turns the incremental playback mode of the controlled device on or off. - **Key Control Select** + + + KEY CONTROL SELECT turns the key control mode of the controlled device on or off. - **Remote/Local Select** + + + REMOTE/LOCAL SELECT enables or disables key operation on the controlled device. - **Play Mode Select** + + + PLAY MODE SELECT sets the playback mode of the controlled device. - **Specified Device Status Sense** + + + SPECIFIED DEVICE STATUS SENSE requests to return the status of the specified device of the controlled device. - **Current Track Time Sense** + + + CURRENT TRACK TIME SENSE requests the controlled device to return the selected time information about the current track or the whole media, when in a playback or a ready state. - **Power Control** + + + POWER CONTROL turns ON / OFF (standby) the power of the controlled device. - **Device Select** + + + DEVICE SELECT changes the device to be used on the controlled device. - **Divide** + + + The File currently in playback standby mode on the controlled device is divided into two files at that point. - **Delete** + + + The file(s) for the current track on the controlled device are deleted. - **Play Area Select** + + + PLAY AREA SELECT sets the playback area of the controlled device. - **File Name Select** + + + Set the format of the recording file name of the controlled device. - **Media Format** + + + Formats the selected media in the controlled device. - **Input Select** + + INPUT SELECT sets the input source select of the controlled device. + ## Variables - **Track Number** - **Track Time** @@ -67,5 +166,10 @@ Enter the IP address, port of the media player. If a password is required, enter ## Version History +### Version 2.0.1 +- Add action & feedback subscription callbacks +- Update package.josn +- Update companion-module-base to 1.7.0 + ### Version 2.0.0 - Brand new module vs 1.0.0 diff --git a/companion/manifest.json b/companion/manifest.json index 3af63c3..39a29eb 100644 --- a/companion/manifest.json +++ b/companion/manifest.json @@ -3,7 +3,7 @@ "name": "tascam-cd", "shortname": "SS-CDR250N / SS-R250N", "description": "Bitfocus Companion module for the Tascam SS-CDR250N and SS-R250N", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "repository": "git+https://github.com/bitfocus/companion-module-tascam-cd.git", "bugs": "https://github.com/bitfocus/companion-module-tascam-cd/issues", diff --git a/package.json b/package.json index e7f7002..0050c48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tascam-cd", - "version": "2.0.0", + "version": "2.0.1", "main": "src/main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -11,10 +11,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+" + "url": "git+https://github.com/bitfocus/companion-module-tascam-cd.git" }, "dependencies": { - "@companion-module/base": "~1.6.0" + "@companion-module/base": "~1.7.0" }, "devDependencies": { "@companion-module/tools": "^1.4.2" diff --git a/src/actions.js b/src/actions.js index 546099d..b44a77c 100644 --- a/src/actions.js +++ b/src/actions.js @@ -137,7 +137,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoCueLevelPreset + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoCueLevelPreset + 'FF') + }, }, autoTrackLevelPreset: { name: 'Auto Track Level Preset', @@ -155,7 +157,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoTrackLevelPreset + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoTrackLevelPreset + 'FF') + }, }, directTrackSearchPreset: { name: 'Direct Track Search Preset', @@ -196,7 +200,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoTrackLevelPreset + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoTrackLevelPreset + 'FF') + }, }, autoCueSelect: { name: 'Auto Cue Select', @@ -214,7 +220,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoCueSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoCueSelect + 'FF') + }, }, autoTrackSelect: { name: 'Auto Track Select', @@ -232,7 +240,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoTrackSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoTrackSelect + 'FF') + }, }, pitchControlSelect: { name: 'Pitch Control Select', @@ -250,7 +260,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.pitchControlSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.pitchControlSelect + 'FF') + }, }, autoReadySelect: { name: 'Auto Ready Select', @@ -268,7 +280,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.autoReadySelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.autoReadySelect + 'FF') + }, }, repeatMode: { name: 'Repeat Mode', @@ -286,7 +300,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.repeatModeSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.repeatModeSelect + 'FF') + }, }, syncRecSelect: { name: 'Sync Rec Select', @@ -304,7 +320,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.syncRecSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.syncRecSelect + 'FF') + }, }, incrPlaySelect: { name: 'Incremental Playback Select', @@ -322,7 +340,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.incrPlaySelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.incrPlaySelect + 'FF') + }, }, keyControlSelect: { name: 'Key Control Select', @@ -340,7 +360,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.keyControlSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.keyControlSelect + 'FF') + }, }, remoteLocalMode: { name: 'Remote/Local Select', @@ -358,7 +380,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.remoteLocalModeSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.remoteLocalModeSelect + 'FF') + }, }, playMode: { name: 'Play Mode Select', @@ -451,7 +475,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.deviceSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.deviceSelect + 'FF') + }, }, divide: { name: 'Divide', @@ -486,7 +512,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.playAreaSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.playAreaSelect + 'FF') + }, }, fileNameSelect: { name: 'File Name Select', @@ -504,7 +532,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.fileNameSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.fileNameSelect + 'FF') + }, }, mediaFormat: { name: 'Media Format', @@ -540,7 +570,9 @@ module.exports = function (self) { self.addCmdtoQueue(SOM + cmd.inputSelect + options.mode) }, //learn: async () => {}, - //subscribe: async () => {}, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.inputSelect + 'FF') + }, }, }) } diff --git a/src/config.js b/src/config.js index 9b3307c..0a4c508 100644 --- a/src/config.js +++ b/src/config.js @@ -36,6 +36,7 @@ module.exports = { width: 6, default: 'SS-CDR250N', regex: '/^.{0,10}/g', + tooltip: 'Defaults to model name: SS-CDR250N / SS-R250N', }, ] }, diff --git a/src/feedbacks.js b/src/feedbacks.js index f2f7cb9..92617db 100644 --- a/src/feedbacks.js +++ b/src/feedbacks.js @@ -1,4 +1,5 @@ const { combineRgb } = require('@companion-module/base') +const { SOM, cmd } = require('./consts.js') module.exports = async function (self) { self.setFeedbackDefinitions({ @@ -22,6 +23,9 @@ module.exports = async function (self) { callback: ({ options }) => { return options.status == self.recorder.repeat }, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.repeatModeSelect + 'FF') + }, }, incrPlay: { name: 'Incremental Play', @@ -43,6 +47,9 @@ module.exports = async function (self) { callback: ({ options }) => { return options.status == self.recorder.incrPlay }, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.incrPlaySelect + 'FF') + }, }, remoteLocal: { name: 'Remote/Local Control', @@ -64,6 +71,9 @@ module.exports = async function (self) { callback: ({ options }) => { return options.status == self.recorder.remoteLocal }, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.remoteLocalModeSelect + 'FF') + }, }, playMode: { name: 'Play Mode', @@ -169,6 +179,9 @@ module.exports = async function (self) { callback: ({ options }) => { return options.device == self.recorder.device }, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.deviceSelect + 'FF') + }, }, playArea: { name: 'Play Area', @@ -190,6 +203,9 @@ module.exports = async function (self) { callback: ({ options }) => { return options.playArea == self.recorder.playArea }, + subscribe: async () => { + self.addCmdtoQueue(SOM + cmd.playAreaSelect + 'FF') + }, }, }) } diff --git a/yarn.lock b/yarn.lock index ad556bf..f482500 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,13 +7,13 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@companion-module/base@~1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@companion-module/base/-/base-1.6.0.tgz#1caa1b310855a757a0a55eb4b1f1b301f37615e3" - integrity sha512-KnsgHtgmB36t2wlBSYyRgw4eSrm6rJXoBWClBURfssk9OgochaJtWwPLuA/SgjLAxPOnTTNt4PvHgzcVv6MjYg== +"@companion-module/base@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@companion-module/base/-/base-1.7.0.tgz#d4bed26890db024b134922bf852d8bc75b449979" + integrity sha512-i9HD0fCMVjBOMyD5z3CK0IjCsfM2EBxeI1RDeVO3RxyQnygUYMkc/WWUiZ7zVZ6WCwNV+Qb93z7L3cdVh8vVFA== dependencies: - "@sentry/node" "^7.63.0" - "@sentry/tracing" "^7.63.0" + "@sentry/node" "^7.82.0" + "@sentry/tracing" "^7.82.0" ajv "^8.12.0" colord "^2.9.3" ejson "^2.2.3" @@ -22,7 +22,7 @@ nanoid "^3.3.4" p-queue "^6.6.2" p-timeout "^4.1.0" - tslib "^2.6.1" + tslib "^2.6.2" "@companion-module/tools@^1.4.2": version "1.4.2" @@ -160,52 +160,52 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@sentry-internal/tracing@7.86.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.86.0.tgz#657e80eb7d08d1030393902c1a7bc47fc39ccb2d" - integrity sha512-b4dUsNWlPWRwakGwR7bhOkqiFlqQszH1hhVFwrm/8s3kqEBZ+E4CeIfCvuHBHQ1cM/fx55xpXX/BU163cy+3iQ== +"@sentry-internal/tracing@7.92.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.92.0.tgz#505d94a93b5df965ec6bfb35da43389988259d4d" + integrity sha512-ur55vPcUUUWFUX4eVLNP71ohswK7ZZpleNZw9Y1GfLqyI+0ILQUwjtzqItJrdClvVsdRZJMRmDV40Hp9Lbb9mA== dependencies: - "@sentry/core" "7.86.0" - "@sentry/types" "7.86.0" - "@sentry/utils" "7.86.0" + "@sentry/core" "7.92.0" + "@sentry/types" "7.92.0" + "@sentry/utils" "7.92.0" -"@sentry/core@7.86.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.86.0.tgz#d01f538783dee9a0d79141a63145392ad2c1cb89" - integrity sha512-SbLvqd1bRYzhDS42u7GMnmbDMfth/zRiLElQWbLK/shmuZzTcfQSwNNdF4Yj+VfjOkqPFgGmICHSHVUc9dh01g== +"@sentry/core@7.92.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.92.0.tgz#4e74c1959348b698226c49ead7a24e165502b55c" + integrity sha512-1Tly7YB2I1byI5xb0Cwrxs56Rhww+6mQ7m9P7rTmdC3/ijOzbEoohtYIUPwcooCEarpbEJe/tAayRx6BrH2UbQ== dependencies: - "@sentry/types" "7.86.0" - "@sentry/utils" "7.86.0" + "@sentry/types" "7.92.0" + "@sentry/utils" "7.92.0" -"@sentry/node@^7.63.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.86.0.tgz#416db178aeb64f7895a23ae1c3d4d65ce51ed50a" - integrity sha512-cB1bn/LMn2Km97Y3hv63xwWxT50/G5ixGuSxTZ3dCQM6VDhmZoCuC5NGT3itVvaRd6upQXRZa5W0Zgyh0HXKig== +"@sentry/node@^7.82.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.92.0.tgz#880d3be5cb8ef805a6856c619db3951b1678f726" + integrity sha512-LZeQL1r6kikEoOzA9K61OmMl32/lK/6PzmFNDH6z7UYwQopCZgVA6IP+CZuln8K2ys5c9hCyF7ICQMysXfpNJA== dependencies: - "@sentry-internal/tracing" "7.86.0" - "@sentry/core" "7.86.0" - "@sentry/types" "7.86.0" - "@sentry/utils" "7.86.0" + "@sentry-internal/tracing" "7.92.0" + "@sentry/core" "7.92.0" + "@sentry/types" "7.92.0" + "@sentry/utils" "7.92.0" https-proxy-agent "^5.0.0" -"@sentry/tracing@^7.63.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.86.0.tgz#d18fc186c4fe654a629f1e536308b4c270dd195b" - integrity sha512-WPqgmbLm6ntpIoTZd1L/RHIVEDMmvVjIDxKeXGiJeXHZG2VMtgwoxuZAFluVFaD0Sr20Nhj+ZS7HvKOWTxrjjA== +"@sentry/tracing@^7.82.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.92.0.tgz#2471a03db3e1e86889ae1790732bdddc510718e3" + integrity sha512-1+TFFPVEdax4dNi68gin6MENiyGe9mOuNXfjulrP5eCzUEByus5HAxeDI/LLQ1hArfn048AzwSwKUsS2fO5sbg== dependencies: - "@sentry-internal/tracing" "7.86.0" + "@sentry-internal/tracing" "7.92.0" -"@sentry/types@7.86.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.86.0.tgz#56ed2f5b15e8130ea5ecfbbc4102d88eaa3b3a67" - integrity sha512-pGAt0+bMfWgo0KG2epthfNV4Wae03tURpoxNjGo5Fr4cXxvLTSijSAQ6rmmO4bXBJ7+rErEjX30g30o/eEdP9g== +"@sentry/types@7.92.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.92.0.tgz#4c308fdb316c0272f55f0816230fe87e7b9b551a" + integrity sha512-APmSOuZuoRGpbPpPeYIbMSplPjiWNLZRQa73QiXuTflW4Tu/ItDlU8hOa2+A6JKVkJCuD2EN6yUrxDGSMyNXeg== -"@sentry/utils@7.86.0": - version "7.86.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.86.0.tgz#356ec19bf1e3e5c40935dd987fd15bee8c6b37ba" - integrity sha512-6PejFtw9VTFFy5vu0ks+U7Ozkqz+eMt+HN8AZKBKErYzX5/xs0kpkOcSRpu3ETdTYcZf8VAmLVgFgE2BE+3WuQ== +"@sentry/utils@7.92.0": + version "7.92.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.92.0.tgz#20ed29742594eab007f9ff72e008b5262456a319" + integrity sha512-3nEfrQ1z28b/2zgFGANPh5yMVtgwXmrasZxTvKbrAj+KWJpjrJHrIR84r9W277J44NMeZ5RhRW2uoDmuBslPnA== dependencies: - "@sentry/types" "7.86.0" + "@sentry/types" "7.92.0" "@types/eslint-scope@^3.7.3": version "3.7.7" @@ -1980,7 +1980,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.6.1: +tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==