Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Warmuptill

Active Member
Hello,

what is a good way to hide and show audio inside the mixer for different programs?

for example
I want to hide my audio track for my browser when there is no sound coming from it.
For now i tried the following:
If "audio" Output Volume is higher than -60 dB (so basically when any sound is played)
Change Visibility of "audio - Brower" if not hide it.

Sometimes this works, sometimes not and it works really slow. it takes like 5 seconds to show up and i dont know why.

View attachment 102575


Any Ideas how i can do this better?

If you ask why i want that.

I'm using OBS build in audio capture feature and i play different games and use some audio programs and i dont want my audio mixer filled with several audio tracks. Only the ones i need at the moment and don't want to deactivate them all the time manually

Thx

I don't really know why it would be slow.
Can you please share an OBS log file with verbose logging enabled?
Please also share the corresponding timestamp when the actions were performed slower than expected.

1710541362572.png
 

Destroy666

Member
When using the Media > Seek to duration macro action, Advanced SS seems to be unable to be more precise than ~5s intervals?
For example, seeking to 60 seconds, 61, 62, 63, and 64 are all landing at 1:01 duration for me, but 56-59s landing at 0:55, and 55s starting the video at 0:52.
Is this intended/known behavior? I suspect this was introduced in OBS 30 if it wasn't present before - I am using 30.0.2 and 1.25.3 AdvSS.

OBS 30 has been there for a while. Now it's 30.1. But even if you mean that, I'm on this version and works perfectly fine for me, like it did in 30. How are you testing it?
 

TRickeyG

New Member
Hello, I am somewhat new to using this plugin and ran into an issue. It seems like macros are unable to fire in quick rapid succession with the 2nd attempt to fire consistently being ignored if it's too quick.

This behaviour occurs both when the macro is triggered normally as well as manually with clicking the test macro button twice quickly.

Is this a new behaviour with the latest OBS update like the post above me or is this a safety feature/expected behaviour of the macros?

I also have not touched any of the delay settings or any of that; it is allset to 0. Currently out of town for the weekend so can't submit screenshots or logfiles for a bit; apologies in advance.
 

Daikota

New Member
Hi!

Try clicking on the timer icon and setting the conditions you need with the response time you need.
And set the volume level a little higher (not -60 dB) so that it works in any case.

View attachment 102576

Hey, i can't set it higher (or lower, depending how you see it) as -60 dB when i type -65 dB it sets it to -60dB. I also tried -59 and -55 dB but it didn't help.

I don't really know why it would be slow.
Can you please share an OBS log file with verbose logging enabled?
Please also share the corresponding timestamp when the actions were performed slower than expected.

View attachment 102578


After my posting i tried a different way of setting this up.
First i tried "If Sound is played, show it, if not hide it"
Now i tried it the other way around "If no Sound is played for 15 seconds, hide it. If not, show it."

This way it works, i don't know why. But i also don't care as long as it works. :D

Thank you two!
 

l1i1l

Member
Hey, i can't set it higher (or lower, depending how you see it) as -60 dB when i type -65 dB it sets it to -60dB. I also tried -59 and -55 dB but it didn't help.
Glad you found a solution))

What I meant was that there could be minimal noise in the audio signal that you don't hear, but that could be louder than -60dB, and therefore the condition of your macros was not met (it’s quite possible that -45 or -50dB would be enough for you).

For myself, I implemented something similar using two separate macros. One was responsible for turning off the source if the audio signal level was below the desired value for some time. And the second macro was responsible for turning on the source. Time control allows to avoid accidental switching on/off due to random one-time noise.
 

Destroy666

Member
Hello, I am somewhat new to using this plugin and ran into an issue. It seems like macros are unable to fire in quick rapid succession with the 2nd attempt to fire consistently being ignored if it's too quick.

This behaviour occurs both when the macro is triggered normally as well as manually with clicking the test macro button twice quickly.

Is this a new behaviour with the latest OBS update like the post above me or is this a safety feature/expected behaviour of the macros?

I also have not touched any of the delay settings or any of that; it is allset to 0. Currently out of town for the weekend so can't submit screenshots or logfiles for a bit; apologies in advance.

I just submitted a patch that (partially) gets around it:
- if your issue is that the macro is not running because it was still running (e.g. long animation, wait action, etc.), with latest master build you can mark a checkbox in macro settings that stops current actions and reruns them https://github.com/WarmUpTill/SceneSwitcher/actions/runs/8302243734
1710595205678.png

- if the macro is too quick for your cycle ("Check condition every ..." setting) then you will need to decrease that. Only certain conditions are coded to accept all matches regardless of the timing - e.g. WebSocket and Twitch ones. For anything else you'll need to do what I mentioned or manually use Queue action, if that kind of behavior is desired.
 

Destroy666

Member
To add (I hate the edit limits here), the 1st workaround is good for quick hotkey presses etc. that need to be considered ASAP and if your actions are sorted in a way that results in stopping the not too important parts.

Queues workaround works well for things that can go slower, like showing new Twitch subscribers in possibly infinitely long separate popups.

Shorter checks work only if the 1st workaround isn't required due to ongoing long actions and will use more CPU as all conditions will execute with higher frequency. Maybe some day separate timers for each macro would be great, I think it wouldn't be too easy to implement, though.
 

Daikota

New Member
Glad you found a solution))

What I meant was that there could be minimal noise in the audio signal that you don't hear, but that could be louder than -60dB, and therefore the condition of your macros was not met (it’s quite possible that -45 or -50dB would be enough for you).

For myself, I implemented something similar using two separate macros. One was responsible for turning off the source if the audio signal level was below the desired value for some time. And the second macro was responsible for turning on the source. Time control allows to avoid accidental switching on/off due to random one-time noise.


Could you show your setup?

I just noticed that sometimes my macro doesn't work because OBS Application Audio Capture doesn't pick up Sound when its hidden. -.-
 

l1i1l

Member
Could you show your setup?

I just noticed that sometimes my macro doesn't work because OBS Application Audio Capture doesn't pick up Sound when its hidden. -.-

This is a solution for my specific situation. The audio is captured from a microphone and there is some background noise. Therefore, values of about -30-40 dB are almost always present in the incoming signal. Because of this, I set the response threshold to approximately -24 dB. When I speak into the microphone, the signal level from it is guaranteed to be higher (to the right side, towards 0dB). When I am silent, the signal level from the microphone is below -24dB (to the left, towards -60dB).

1710606414441.png


Moreover, in my case, it is important that the source does not turn off instantly as soon as I pause. To do this, a pause of 5 seconds is set before the macro works. Therefore, pauses in my speech of up to 5 seconds do not affect the showing of the source.

Also in my case it was important that the source appeared immediately as soon as I started speaking. Therefore, the timer for the second macro is not activated— this macro will work immediately as soon as a signal is received from the microphone. That is why I have two separate macros, with different conditions for turning the source on and off depending on the microphone volume.

Your situation may have different requirements and logic of action. Just when you set the response threshold, keep in mind that already at -40dB a song with 100% volume will be heard very quietly, at -50dB it will no longer be audible almost at all. So these levels are quite enough for cutting off.
 

TRickeyG

New Member
I just submitted a patch that (partially) gets around it:
- if your issue is that the macro is not running because it was still running (e.g. long animation, wait action, etc.), with latest master build you can mark a checkbox in macro settings that stops current actions and reruns them https://github.com/WarmUpTill/SceneSwitcher/actions/runs/8302243734
View attachment 102585
- if the macro is too quick for your cycle ("Check condition every ..." setting) then you will need to decrease that. Only certain conditions are coded to accept all matches regardless of the timing - e.g. WebSocket and Twitch ones. For anything else you'll need to do what I mentioned or manually use Queue action, if that kind of behavior is desired.
Oh amazing and yes, I feel like that added tick box to stop and rerun the macro should do the trick. I'll definitely be downloading the patch and implementing that when I get home tomorrow.

Thanks for the nice detailed response! I'll confirm here tomorrow if that indeed completely solves it.
 

AaronD

Active Member
- if your issue is that the macro is not running because it was still running (e.g. long animation, wait action, etc.), with latest master build you can mark a checkbox in macro settings that stops current actions and reruns them https://github.com/WarmUpTill/SceneSwitcher/actions/runs/8302243734
View attachment 102585
I can see how that would be useful, but I can also see it hurting. For those that hurt, it would be good to have another option that starts a new copy in parallel, and lets the old one(s) continue running.

And of course, I can see how *that* would hurt too, in some situations. No universal settings here. :-)
 

Bairespm

Member
I added the functionality to check which MIDI devices are connected in this build:

You will have to be logged into GitHub to be able to download it. Let me know if that should be an issue!
View attachment 102485

It seems to work as expected as far as I can tell although I had trouble testing, if removal of devices works as intended.
I would appreciate if you could give this a try, whenever you find the time to, and report back if it also works with physical MIDI devices.
Hello, unfortunately it does not work as expected, if you start obs without the midi device connected, it does not show the system message alerting you, but the macro does detect it because it flashes green. If I start obs with the device connected, the macro also detects it even though I set it to IF NO and there it does show the system message alerting me... the strange thing is that it works the other way around than expected. Another test I did is that if I disconnect the midi device with obs running, advss does not realize that it was disconnected. in the same way as if it is disconnected when I start obs and I connect it after starting... advss does not detect the midi device. I hope to be of help, thank you
 

Cybergy

New Member
I installed A.S.S. 1.25.3 universal with OBS 30.1.0 running today, and now OBS crashes when I try to open it. When I downgrade to ASS 1.19.1 OBS starts normally.
Sonoma 14.3.1 Mini M1
 

ukie

Member
I have all that enabled. Set as Alerts. They simply stopped showing. I can’t figure out what changed.
@Warmuptill I finally got the notification working! I had System Tray disabled under the General OBS settings.
Once enabled, notifications started showing again.
It doesn't make sense. I would prefer to have System Tray disabled. Is this something you could check?
 

ukie

Member
@Warmuptill I finally got the notification working! I had System Tray disabled under the General OBS settings.
Once enabled, notifications started showing again.
It doesn't make sense. I would prefer to have System Tray disabled. Is this something you could check?
I guess the action is "System Tray notification"... But is it only possible to send notifications from OBS using System Tray?
 

Destroy666

Member
I guess the action is "System Tray notification"... But is it only possible to send notifications from OBS using System Tray?
Yes. Why do you think it doesn't make sense that tray notifications depend on tray? Why do you need to have it disabled? You can hide the icon on any Windows. On Linux you might need some extensions, depending on distro/graphical environment.
 

ukie

Member
Yes. Why do you think it doesn't make sense that tray notifications depend on tray? Why do you need to have it disabled? You can hide the icon on any Windows. On Linux you might need some extensions, depending on distro/graphical environment.
It’s called a menu bar on Mac, that’s part of the confusion. I would rather not have the menu bar cluttered. I just assumed “system tray” notifications referred to the windows taskbar system tray and the name was carried over into the Mac version of the plugin. It would be at least helpful for the plug-in to check on system tray being enabled in OBS when adding this action, or a notice text clarifying the option needs to be enabled in OBS itself.
 

Warmuptill

Active Member
It’s called a menu bar on Mac, that’s part of the confusion. I would rather not have the menu bar cluttered. I just assumed “system tray” notifications referred to the windows taskbar system tray and the name was carried over into the Mac version of the plugin. It would be at least helpful for the plug-in to check on system tray being enabled in OBS when adding this action, or a notice text clarifying the option needs to be enabled in OBS itself.
Thanks for reporting the issue and your suggestion!
Adding a note about this limitation on MacOS makes sense.
 
Top