nrkno / sofie-atem-connection

Sofie ATEM Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
129 stars 36 forks source link

inputMixOption does not work on the atem mini #101

Closed DPCLive closed 3 years ago

DPCLive commented 3 years ago

[x ] bug report [ ] feature request [ ] question about the decisions made in the repository [x ] question about how to use this project

Sorry for my english, i'm french

Here is our code used:

const Atem = require('atem-connection') const myAtem = new Atem() myAtem.on('info', console.log) myAtem.on('error', console.error)

myAtem.connect('192.168.1.116')

myAtem.on('connected', () => { myAtem.changeProgramInput(2).then(() => { // Fired once the atem has acknowledged the command // Note: the state likely hasnt updated yet, but will follow shortly console.log('Program input set')

})
myAtem.setAudioMixerInputMixOption(1, 2).then(() => {
    console.log('test')
})

})

Julusian commented 3 years ago

The mini has the fairlight audio mixer not the classic mixer. Instead you can do it with something like:

atem.setFairlightAudioMixerSourceProps(1, -256, { mixOption: 2 })

The -256 is the source id. I have not seen enough of a pattern to identify/translate those, so you are best to check the state object to see what it has. The sourceId will vary depending on the mode of the input (stereo/mono/dual-mono)

DPCLive commented 3 years ago

Thank you very much @Julusian for your answer. When I read "myAtem.state.fairlight.inputs", I get this: { '1': { sources: { '-65280': [Object] }, properties: { inputType: 0, externalPortType: 2, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [], activeInputLevel: 0 } }, '2': { sources: { '-65280': [Object] }, properties: { inputType: 0, externalPortType: 2, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [], activeInputLevel: 0 } }, '3': { sources: { '-65280': [Object] }, properties: { inputType: 0, externalPortType: 2, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [], activeInputLevel: 0 } }, '4': { sources: { '-65280': [Object] }, properties: { inputType: 0, externalPortType: 2, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [], activeInputLevel: 0 } }, '1301': { sources: { '-65280': [Object] }, properties: { inputType: 2, externalPortType: 512, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [Array], activeInputLevel: 1 } }, '1302': { sources: { '-65280': [Object] }, properties: { inputType: 2, externalPortType: 512, supportedConfigurations: [Array], activeConfiguration: 2, supportedInputLevels: [Array], activeInputLevel: 1 } } }

DPCLive commented 3 years ago

I allow myself to inform you that everything is working. Thank you for your help and for this great lib.