-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected states when parsing information for tally lights #81
Comments
I think this is a known limitation of the v1 releases. The way we parse commands from the atem means that we emit a stateChanged for every single thing it sends, even thought they are batched. This will be better in v2, but there are some bugs there that are blocking its release (eg #76) As a workaround, you could try adding a simple debounce to stateChanged, so that you wait for a gap in commands before doing this, but I dont know if that will play well with transitions.. |
Hi @Julusian, thank you for your ultra fast response. Kind regards |
There is no concrete timescale on v2. It is waiting for either me to have the time and motivation to look into the issues which were reported, or for nrk to want to upgrade to it and provide the time needed. It does mostly work, I think it is just some bugs in edge case conditions, or functionality used less often |
Appreciate the work and time you guys are putting into this. Thank you very much! I would love to test v2 to see if it works without issues in my usecase. So I could just clone the current state of the master branch, build it and copy it into the node_modules folder to test v2 myself, right? Kind regards |
The easiest way to install it is via |
Awesome! Just tried it with the nightly build. Works like a charm in my usecase 😎 Even enabled me to make my code much simpler cuz' all of the weired in between states are gone now 😍👌 Thank you @Julusian your fast help on my challenge and huge thanks to all maintainers of this library for enabling me to do my project at all - thank you guys! Kind regards Here is my new code 🔽 copy/paste codeconstructor (ip: string) {
this.ip = ip
this.switcher = new AtemSwitcher()
this.switcher.on('connected', (state: any) => {
console.log(`Connected to ${this.ip}.`);
let update_now: boolean = true;
update_now = this.parseNewState(update_now)
this.switcher.on('stateChanged', (state: any) => {
update_now = this.parseNewState(update_now)
});
})
this.switcher.on('disconnected', () => {
console.log(`Disconnected from ${this.ip}.`);
this.connect();
})
}
parseNewState(update_now: boolean):boolean {
// checking out current preview and program information
let new_preview = this.switcher.listVisibleInputs("preview", 0)
let new_program = this.switcher.listVisibleInputs("program", 0)
// comparing to old preview information, updating if changed
if (_.isEqual(this.preview, new_preview) == false) {
console.log(`PREVIEW: ${new_preview}`)
this.preview = new_preview
update_now = true
}
// comparing to old program information, updating if changed
if (_.isEqual(this.program, new_program) == false) {
console.log(`PROGRAM: ${new_program}`)
this.program = new_program
update_now = true
}
// notifing tallys ("Inputs") if there are changes
if (update_now == true) {
this.notifyInputs();
update_now = false
}
// return update_now: boolean to track if
// information has changed compared to previous state
return update_now
}
connect () {
console.log(`Connecting to ${this.ip}...`);
this.switcher.connect(this.ip)
} |
Hi everyone, finally finished & published my tally light tool 🎉 Thank you @Julusian for your fast help on during development and huge thanks to all maintainers of this library for enabling me to do my project at all - thank you guys! Now I am very excited to see how people are going to use my new atem-tools library: Kind regards |
I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[x] question about how to use this project
Summary
I am building a dmx tally light solution for atem switchers. When I just cut between two cameras there is one state transmitted which has previous preview as program so preview and program are identical for one state. This results in the previous program tally switching off before switching to green again. (flickering)
In this example I am only showing camera 1 tally information to make it easier to understand:
Is there any way to catch this case or directly extract tally light information for example for one input with the atem-connection library?
Thank you all in advance for your help and this awesome open source library!
Kind regards
@lukas-runge
To get the Tally light information I am parsing the state object to extract tally information out of it. (using
listVisibleInputs()
on the switcher object) and some ways to prevent weird states messing up my readout.Here is my current code 🔽
image created with Polacode for Visual Studio Code
copy/paste code
The text was updated successfully, but these errors were encountered: