Resource icon

Advanced Scene Switcher 1.25.5

Bairespm

Member
MMM. La verdad a mi me ha pasado lo mismo un par de veces, pero cuando lo reinicio vuelve a funcionar normal... es raro... espero que se pueda solucionar
 

Warmuptill

Active Member
Here are my settings, if that helps...

View attachment 94930
Unfortunately it is very difficult to say what is going wrong without having more information.

Can you please enable verbose logging and share a log file where the issue happens?
And a timestamp when the issue happened would also be helpful :)

Just looking at the screenshot I would recommend to disable the "after performing actions skip performing actions for X seconds" by entering 0 seconds.

I am Using A MIDI device where I am controlling a Synthesizer via MIDI but would like to have an output text source change (Maybe perhaps using chat log), based on the MIDI CC that I send, Referencing the MIDI implementation for the synth. Whether using a Pattern recognition of the synth's cc implementation in .pdf or .txt file, or an excel spreadsheet I could create (there are some 50 MIDI CCs and I could type it up).

I want to have the plugin here, use the recieved CC to call the pre mapped setting that is being changed on the synth, such as "Square Wave" and then state "on" or "off", written in the OBS Text source, which could work using the chat log option of Text sources.

I figure It would need program to allow using the chat log option in text field. So it would require that there is a chat log used in the Scene Switching plugin.

As an example, I also use the plugin OBS Tuna. Tuna uses the chat log implementation to pull info out of MP3 files in a playlist for instance a VLC playlist. Works well using the Chatlog option in the OBS text source and pointing to the .txt file created by the Tuna plugin. The Tuna plugin created file (in the user folder in Windows) uses chat log (check box in Tuna), so that updates the information. The Information is grabbed from there using the metadata string values such as {artist} that the user wants to see written in the text field. I think it could be done here using a predefined .txt file containing CC. Should work if it could correlate the recieved CC midi, to the premapped CC value in the .txt file, and read the label for that CC and place it in the chatlog. So like where the Tuna plugin reads an MP3 in a playlist in VLC or other music service, this would just read the info in the mapped .txt file... At least that seems like the simplest implementation.
So if I understand you correctly you want to create a mapping between MIDI control change messages and their textual representation, right?
The textual representation shall then be appended to a text file, correct?

If so you will have to create macros similar to this.
Midi1.PNG


Midi2.PNG


Although it might be easier to set up a script which handles the translation from numbers to strings, which gets called every time the Midi values variable changes.

Let me know if you have questions!

@Warmuptill I thought of something else to add! :-)

How about an MPD client?
I'd use this for a standalone jukebox, that feeds an external audio mixer, the finished output of which comes into OBS as the only audio source.

If you wanted to start with a generic TCP connection, I think I can make that work. According to Wireshark, I think I only need to send these messages:

Separate message for each line, all ASCII text. The first 4 are all sent at the same time, shortly after startup, one after another, possibly waiting for a response in between. (it works to rake a finger across the hotkeys in a standalone app) The other two are sent individually at their appropriate times. Each one ends with hex 0A (newline).

I will add it to the list :)
But I can't promise that I will get around to it soon.

Yo @Warmuptill
I looked for a way to do this but I couldn't
One question, can this be done in a single dock...? make it a toggle button

View attachment 94846
View attachment 94844
View attachment 94845
View attachment 94847
I can't find the toggle function here

thanks for you help.
You can find a build below which adds the following features which might help in this case:
  • Use of variables in the dock settings
  • Option to add status label to the macro docks
  • The option to toggle a filter on / off.

So you could for example set up something similar to this to for a button to toggle the visibility of a given filter on a source.

First two macros which set the value of a variable depending on the status of the filter.
Filter1.PNG
Filter2.PNG


Next a macro which toggles the filter, which will be used as the dock widget.

Filter3.PNG


For this macro specify that you want to use the content of the variable of the first two macros as the text of the run button like so.

Filter4.PNG


This should result in a macro dock widget which displays the current status of a filter widget and allows you to toggle its status.

Filter5.PNG
Filter6.PNG


I hope that helps already.

Combining multiple macro docks into a single combined dock window is something that has been requested previously already.
Unfortunately I did not yet have the time to look into this.
 
Last edited:

MrGhost

Member
This MIDI use, using a file, seems like a possibility. I made a screenshot, I will look into it and see if I can get anywhere with this. I will look into script writing for the possibility. Probably a better option than making ~49 different 'or' midi equals 'n' options in the Macro or 50 different macros probably as the or wouldn't call a different result would it. So it would actually need that many different macros. Script would be only option then.
 

Bairespm

Member
You can find a build below which adds the following features which might help in this case:
  • Use of variables in the dock settings
  • Option to add status label to the macro docks
  • The option to toggle a filter on / off.

So you could for example set up something similar to this to for a button to toggle the visibility of a given filter on a source.

First two macros which set the value of a variable depending on the status of the filter.
View attachment 94941View attachment 94942

Next a macro which toggles the filter, which will be used as the dock widget.

View attachment 94943

For this macro specify that you want to use the content of the variable of the first two macros as the text of the run button like so.

View attachment 94945

This should result in a macro dock widget which displays the current status of a filter widget and allows you to toggle its status.

View attachment 94946View attachment 94947

I hope that helps already.

Combining multiple macro docks into a single combined dock window is something that has been requested previously already.
Unfortunately I did not yet have the time to look into this.
amazing, thank you very much, works great. your work is very good. You can add these lights (image attached) if the condition is "False" or "True"
1686400164828.png
 

MrGhost

Member
This MIDI use, using a file, seems like a possibility. I made a screenshot, I will look into it and see if I can get anywhere with this. I will look into script writing for the possibility. Probably a better option than making ~49 different 'or' midi equals 'n' options in the Macro or 50 different macros probably as the or wouldn't call a different result would it. So it would actually need that many different macros. Script would be only option then.
I did this and the only way I could find, was to make 56 or so different macros. I will try and use it tomorrow or later today to actually show the synth settings as I am turning the CC controlling dials of the synth itself, and the midi controller which I use to control it.

I found at least 3 bugs in the Advanced Scene Switcher as I was doing this, mostly related to updating the Macros as I was duplicating them. As they are duplicated, they continue to reference the first in a line of duplicates, rather than updating to reference the most recent macro duplicated. This caused problems if I would look back at the duplicated macros before closing the window and reopening it. Looking back at duplicated macros caused the values in them to revert to the original duplicated macro, and get saved wrong.

A second bug I revisited several times as I made 56 or so macros, was if I made a 2nd macro with the same name as another (I was changing only the number of the macros, to match the sent CC value per macro). If I mistakenly made a 2nd 104, it would freeze the Automatic Scene Switcher window irretrievably. At first I thought all OBS was frozen, but using Ctrl-Q to close the window (a hotkey in my case has this) twice, makes it close without closing OBS.

I was having some problems with the MIDI fields marked 'ANY' in the first screenshot in your post (warmuptill), they can't seem to be changed to get only the CC without its changing value. I tried a number of ways to get the CC isolated, because in the 2nd macro that assigns a text output per variable, the changing of each dial passes several values that can cause the * field below the if a variable section to be activated thus calling up several different texts in succession by accident because a dial with cc of 73 will pass all the values between 0-127, and that activates all the other CC variable text to be written to the file.

I couldn't get the CC alone, so I had to use the * that allows 'partial' matches to activate the macro.

partial match.png
 
Last edited:

MrGhost

Member
Oh, I intended to edit in screenshots, but didn't get it in in time:

"If so you will have to create macros similar to this.

Midi1.PNG




Midi2.PNG

"

also I could only think of 2 bugs. It seemed like more but there were lots of problems cause of the first one. At one point having to go back thru and check work.

I went back in and set a duration value of .2 seconds hope that will keep out all the hits as midi dials roll past 0-127 values. If you can specify any way to isolate only the cc and not its carried data, that would be helpful as I could cut out any accidental hits on "near match" (say turning dial 73 and landing on 59 and then the macros fighting between the 73 macro and the 59 macro) as the dials are turned. In fact with nearly 60 CCs between 3 and 120, 30 of which have limits from 0-120 or 0-127, (many are toggles or small ranges and have limits of 0-1, 1-2 or 0-7) there will probably be 25% conflicting dial landings when the CC Macros are the same as the dial final position.
 
Last edited:

MrGhost

Member
real changes in effect here. I took out that upper factor, where the variable changes,and so continues to the 2nd upper factor in the Macro. This didn't seem to be relevant to me after I tried it and it seemed to work without it. I set the lower value, the "2nd" value in the initial MIDI macro to a variable, and set that to 0, it seemed to return (*when it worked which was almost never and I'll get to my theory on this in the end here) the right text output in the Text source after finally (only happened a few times) getting thru to the end of one of the 57 or so Macros. This gave me the most consistently correct results.

So on to my theory on why this may not be working
A. it is not changing the Text, it is not writing to the MIDIlog.txt that I made for it to write to. Don't know why but I suspect some problem with permissions or windows.
B. the MIDI is only operating at the 300ms time interval of the plugin, MIDI as we all know, needs to be realtime, and have a thruput maximum 5000/7000 messages per second (based on LoopMIDI with the advanced setting of 20000 messages / 3 seconds before a feedback loop detection). This is so it can report the wide range of things that it reports such as polyphonic aftertouch, from multiple keyboards etc. I don't see this as something the plugin does. Could be wrong, but doesn't react at all most of the time I am operating.

So of course there are other MIDI plugins but none of them activates a scene element. They don't have the option to set the variables.
Looks like it's not going to be possible to do this. It changed, only a few times and getting it to go off, after the changing stops, means having to make it go on again, before the changing can be reported to the file and read by the text source. It doesn't work fast enough at all. Any idea if this is even possible? I don't see how if the response time is a minimum of 50ms
 
Last edited:

MrGhost

Member
Nah seems to work ok. It required to use the more selective use on the variable. Then there was a bunch of other stuff. It is about 1 second after the MIDI control is changed, that it will post the message. Lots of difficulties, but primarily was to get the variable to read onlly the MIDI CC using the MIDI variable set to substring options and selecting beginning for first 3. Which includes all the numbers in the CCs in the 100s, all+ space in the 2 digits, and then gives a situation where 1-10 need to have an or statement for each of the digits that can be in the first part of the 2nd value sent with the midi. This finally will if everything is input correctly result in having the proper settings to write to the text file. It's not particularly easy to set up. But there is a video with it mostly working on my channel on Bitchute link is /video/nrbaIPMDzsyh/
 

AaronD

Active Member
@Warmuptill I thought of something else to add! :-)

How about an MPD client?
I'd use this for a standalone jukebox, that feeds an external audio mixer, the finished output of which comes into OBS as the only audio source.

If you wanted to start with a generic TCP connection, I think I can make that work. According to Wireshark, I think I only need to send these messages:

Separate message for each line, all ASCII text. The first 4 are all sent at the same time, shortly after startup, one after another, possibly waiting for a response in between. (it works to rake a finger across the hotkeys in a standalone app) The other two are sent individually at their appropriate times. Each one ends with hex 0A (newline).
I will add it to the list :)
But I can't promise that I will get around to it soon.
Nevermind. I found a command-line tool that works in the Run action:
sudo apt install mpc for *buntu.
 

MrGhost

Member
Nah seems to work ok. It required to use the more selective use on the variable. Then there was a bunch of other stuff. It is about 1 second after the MIDI control is changed, that it will post the message. Lots of difficulties, but primarily was to get the variable to read onlly the MIDI CC using the MIDI variable set to substring options and selecting beginning for first 3. Which includes all the numbers in the CCs in the 100s, all+ space in the 2 digits, and then gives a situation where 1-10 need to have an or statement for each of the digits that can be in the first part of the 2nd value sent with the midi. This finally will if everything is input correctly result in having the proper settings to write to the text file. It's not particularly easy to set up. But there is a video with it mostly working on my channel on Bitchute link is /video/nrbaIPMDzsyh/
would have been better to make another variable. I still don't understand the mathematical operations option for the variables, I don't understand how to place the variable into the math equation?

I'd really like to output oscillator frequency based on the midi cc for the oscillator, and it's associated value... 0-120 / 49 = 2.47 / note, so 29.63 midi values/octave and each note has its bracket in there..so to give the note and octave based on midi.

I went back thru and placed on off values for each toggle into the text expressions written to the files, as well as some of the values like # of voices for Unison, and off/half/full or key trigger values from Lo/Lo retrig Last and Last retrig. and Unison detune amounts 0-7
There are lot of things left to add, like program changes, programs being saved, possible so why not.
 
Last edited:

gavalarrr

New Member
Hi Warmuptill, is there currently a way to move a single Macro to another scene collection?... Without using export/import overwriting all existing Macros in that target collection?... Love this plugin, has to be up there with the best for OBS!! Awesome work
 

MrGhost

Member
Hi Warmuptill, is there currently a way to move a single Macro to another scene collection?... Without using export/import overwriting all existing Macros in that target collection?... Love this plugin, has to be up there with the best for OBS!! Awesome work
Along those same lines, It'd be great if there was a way of changing the file referenced by seventy macros at one time, rather than one at a time.
 

MrGhost

Member
You can reference variables using the ${variable name here} pattern.
For example:
View attachment 94999
Great. That will make it happen for this frequency captions.

I noticed timers are complex AF. Is it easy to make a timer? I seemed to have a difficult time with the timer. I thought it would be just an insertion, but in order to have a scene that was placed by an earlier macro, time out after 10 seconds, I had to reference the time the earlier macro was true, from a new macro, and then have that macro put time on the timer in, and continue the timer in a 3rd macro that is used to shut off the OBS text source. It was hard to figure this out for my non programmer brain. But finally it worked and seemed to have an aha moment. It is there someplace something however that is causing my issue of no more captions sometimes, then they spring back unexpectedly some time later. I have it shut off the captions on a previous scene, and also on the current scene.

This is a thing I don't understand, how to get the "Preview" and "Program" scenes to be chosen in a macro. Often things seem to freeze on one or the other, with the scene switcher plugin. I would like to be able to specify only the program to have things turn off (using studio mode in OBS).
 
Last edited:

MrGhost

Member
Is it possible to match the MIDI based on a function and a list of pre-charted values? If no chartable function option exists, can plugin send this output to a script (if it can't output its result to the script, then it's not going to be better than just making 49 seperate macros) and have the script return its result back to the plugin? Or would it be smoother for such a script to write directly to the utility .txt file with no return of info to the plugin?
 

Warmuptill

Active Member
Hi Warmuptill, is there currently a way to move a single Macro to another scene collection?... Without using export/import overwriting all existing Macros in that target collection?... Love this plugin, has to be up there with the best for OBS!! Awesome work
Unfortunately there is not an option to do this.

The only option would be to manually copy the entry from the scene collection data to the other, but this is rather error prone and I would not recommend it.

I noticed timers are complex AF. Is it easy to make a timer? I seemed to have a difficult time with the timer. I thought it would be just an insertion, but in order to have a scene that was placed by an earlier macro, time out after 10 seconds, I had to reference the time the earlier macro was true, from a new macro, and then have that macro put time on the timer in, and continue the timer in a 3rd macro that is used to shut off the OBS text source.
Sorry if I am misunderstanding something but wouldn't just doing something like this work?

SceneWait.PNG


Is it possible to match the MIDI based on a function and a list of pre-charted values? If no chartable function option exists, can plugin send this output to a script (if it can't output its result to the script, then it's not going to be better than just making 49 seperate macros) and have the script return its result back to the plugin? Or would it be smoother for such a script to write directly to the utility .txt file with no return of info to the plugin?
If your question is if a range of values can be matched (e.g. 100 - 150) using a single midi condition than that is unfortunately not possible at the moment.

You can use the "Run" condition to execute a script / program and use its exit code as the conditional.
Run.PNG

You can also pass variables defined in the plugin as arguments to this external script / program.

Hope that helps!
 

Bairespm

Member
amazing, thank you very much, works great. your work is very good. You can add these lights (image attached) if the condition is "False" or "True"
View attachment 94959
@Warmuptill
I'm sorry, I don't want to bother you, but let me check it out.
it is possible to add highlights to docks from macros. This would be great not only for the aforementioned but for any other macro that we create... if we have the possibility of blinking. Thanks for your time
 

Warmuptill

Active Member
@Warmuptill
I'm sorry, I don't want to bother you, but let me check it out.
it is possible to add highlights to docks from macros. This would be great not only for the aforementioned but for any other macro that we create... if we have the possibility of blinking. Thanks for your time
Sure, here you go:
Dock.PNG

Should be done in a few minutes.
Couldn't spend much time testing so let me know if there are issues.
 

Bairespm

Member
Top