jshea2 / OSC-for-OBS

Control and listen to OBS via OSC
113 stars 8 forks source link

visibility issue #3

Closed awrebels closed 3 years ago

awrebels commented 3 years ago

Has there been any update to the manner in which visibility is triggered? My OSC trigger seems to be passing the correct command and it works fine for switching scenes. However visibility doesn't work.

Screen Shot 2021-01-07 at 1 58 42 AM

Any ideas?

Also position doesn't seem to make change with X Y parameters but just switches the source to center positioning.

jshea2 commented 3 years ago

The position translate is probably because of this: image If you delete that, it should be fine. I'll make an update soon.

As for the visibility of sources, that looks correct to me. What scene item(source) are you using? Can you screenshot what visibility thing you're trying to change?

awrebels commented 3 years ago

So it is a nested scene. However I’ve also tried with the image source below and the video sources above.

Also of note in terminal I can see the scene changes but not changes when I manually toggle on/off sources is that expected behavior?

On Thu, Jan 7, 2021 at 4:03 AM Joe Shea notifications@github.com wrote:

The position translate is probably because of this: [image: image] https://user-images.githubusercontent.com/70780576/103872855-cd494100-5083-11eb-8222-7727c04ca7d0.jpeg If you delete that, it should be fine. I'll make an update soon.

As for the visibility of sources, that looks correct to me. What scene item(source) are you using? Can you screenshot what visibility thing you're trying to change?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jshea2/Node-OBSosc/issues/3#issuecomment-755982820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2AWD5BSESQWIWUTDL5ALDSYV2G3ANCNFSM4VYSC7IQ .

awrebels commented 3 years ago

Sorry image didn't post I guess IMG_5686

jshea2 commented 3 years ago

I got it to work when I recreated the layout. What are you using to send OSC? One thing I noticed is in your "OSC IN:" the log should have a comma "," between the string and argument. So it should say... OSC IN: /INTRO/AWR/visible, 0

This would mean your 0 is still in the string. Make sure where you put the 0 or 1 is in the 'value' or 'argument' input field (if they have it) rather than in the initial string or use a comma if it wants that. Some applications are different in how they send out OSC. Qlab separates them out by spaces.

Screen Shot 2021-01-07 at 1 52 53 PM
jshea2 commented 3 years ago

This also might explain the scene change, because you can change a scene just in the string without an argument. Let me know if this helps.

awrebels commented 3 years ago

Interesting - yea i noticed that comma in your example video but it didn't seem to do anything when I tested it. So I'm using ETC Sound2light which sends osc commands with an On and Off trigger. Your point about the value/argument field made me test a couple options; comma, brackets, space, and FINALLY the equal (=) sign, and that was the solution. Just in case anyone else has these issues.

image

Your code is brilliant - thanks for the help!

Side question: with qlab which version do you need at a minimum? Do we need to go up to the $1K license (yikes) or is it just, I assume, the audio license?

awrebels commented 3 years ago

I think I got a source filter visibility snippet working as well in case anyone needs it.

//Triggers Source Filter Visibility else if (msg[0].includes('filterEnabled')){ console.log(OSC IN: ${msg[0]} ${msg[1]}) var msgArray = msg[0].split("/") msgArray.shift() var filterEnabled; if(msg[1] === 0 || msg[1] === 'off'){ filterEnabled = false } else if(msg[1] === 1 || msg[1] === 'on'){ filterEnabled = true } obs.send("SetSourceFilterVisibility", { 'sourceName': msgArray[0].split('_').join(' ').toString(), 'filterName': msgArray[1].split('_').join(' ').toString(), 'filterEnabled': filterEnabled, }).catch(() => { console.log("ERROR: Opacity Command Syntax is Incorrect. Refer to Node OBSosc Github for Reference") }) }

jshea2 commented 3 years ago

Nice, Good to know! I'd love to check out your project once you're finished. I love (and miss) tech theatre projects! You inspired me today to update the code and add some stuff.

I also started a Discord cause I thought it'd be cool to see what kind of tech projects people are making and talk about tech for live events stuff. https://discord.gg/FJ79AKPgSk

jshea2 commented 3 years ago

Sorry! didn't see the QLab question. Yes, to send OSC cues at least the Audio license is required. If QLab is just receiving OSC, then the free works.