Skip to content
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

Action to change box input in SuperSource #15

Closed
hjoelr opened this issue Jun 2, 2019 · 12 comments
Closed

Action to change box input in SuperSource #15

hjoelr opened this issue Jun 2, 2019 · 12 comments

Comments

@hjoelr
Copy link

hjoelr commented Jun 2, 2019

To start, let me just say Thank You for this module to Companion! It is a huge help to me! As I've been experimenting with this, I'm realizing that it would be very helpful to have an action to change a box input inside of SuperSource. I thought about adding it myself, but a cursory look at the code showed that it's a pretty sizeable module and would take quite a bit of my time just to understand how the current code even works. I was wondering if someone familiar with the code could add this functionality?

It's not outside the realm of possibility for me to attempt to add it, but I'd need some direction on how to set up a dev environment and the code layout of the extension.

Thanks!

@krocheck
Copy link
Member

krocheck commented Jun 2, 2019

@hjoelr I'll take a look. Yeah, it is a beefy module ... my fault mostly. There's going to have to be a number of changes around SuperSource handling in the upstream library we use due to the new 8K switcher having 2 of them. We're managing that implementation in a different branch, so I may be able to get this in the short term as-is.

@hjoelr
Copy link
Author

hjoelr commented Jun 2, 2019

@krocheck Wow, thanks for the quick response! I noticed that you're using this library for most of the communications to the ATEM. They already have a function in there called setSuperSourceBoxSettings that may make it pretty simple to add to this library as is. My JS/TypeScript knowledge is shallow, but if I'm reading it right it seems that you can't set just the source property but have to set all the others (enabled, x, y, size, cropped, etc.) at the same time. Right now all I need/want is to change just the source property but leave all the others as they are.

@krocheck
Copy link
Member

krocheck commented Jun 2, 2019

Yes, that is correct. All of that data is reported from the atem, it just has to be stored in the states array. Its one of my complaints for that library because technically speaking the atem protocol allows you to set flags for which variables are going to be updated, but atem-connection doesn't let you manipulate that such that every variable must be sent (even those not changing).

I think I got it close, but I won't be able to test. Will you be in a position to test in the next few days?

@krocheck
Copy link
Member

krocheck commented Jun 2, 2019

@hjoelr should be there for you in the current build. I'll mostly be curious that it behaves correctly in terms of not changing the other parameters of the boxes.

@hjoelr
Copy link
Author

hjoelr commented Jun 3, 2019

@krocheck Thank you for the quick turnaround and implementation! Very grateful for your help 😊. I'll see if I can give it a try in the next day or two. The ATEM is at a different location than where I'm at, so I have to go there to test it.

@Julusian
Copy link
Member

Julusian commented Jun 4, 2019

@krocheck The library should let you set just one of the box properties at a time (hence the Partial parameter type). It determines which properties to update based on what fields are set in the object parameter. If it is resetting the other properties at the same time then that is a bug

@krocheck
Copy link
Member

krocheck commented Jun 4, 2019

@Julusian I'll have to test. I feel like I experienced the opposite elsewhere but it was a ways back.

@mint-dewit
Copy link

I feel like I experienced the opposite elsewhere but it was a ways back.

That is strange, it is something that is used in almost all high level commands actually. Next time you see it, it would be great if you could open an issue in the repository with a report of which commands you were using. Regarding the supersource command, I can confirm the Partial object will work as it is used in production by the Atem Compositor project.

I've tried to use Companion to set the supersource boxes on a production over the weekend but it resets all other parameters to 0 currently, probably because it is missing state info about the boxes. It should work more reliably if you use a Partial object instead.

@krocheck
Copy link
Member

Yeah, I need to get my atem over from the warehouse as per usual. Since this is all still alpha/beta I'll get it cleaned up. Is there polling we need to do to specifically? I was under the impression all of the commands report out state on connection, so I was expecting SuperSourceBoxPropertiesCommand to report those states? All things I can play with once a a unit is here.

@mint-dewit
Copy link

Yup, should work the same. I'm just speculating as to why it might not work to be honest. I don't have a 2 M/E over here either, just happened to be using it for a production. (Routing the MV windows from streamdeck is awesome btw)

@krocheck
Copy link
Member

Yeah, I was fairly infuriated when I couldn't do MV window changes in macros. Some guys will put temporary changes on a latched button. Definitely my favorite contribution to the project. Happy others agree!

@mint-dewit
Copy link

I've tried to use Companion to set the supersource boxes on a production over the weekend but it resets all other parameters to 0 currently

Come to think about this again, I have no idea on what version of the firmware that atem was. If it was on 8.0 I guess we wouldn't expect the current commands to function correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants