I feel like this request might be a bit of a reach. I am using Advance Scene Switcher to turn on and off a media source with the setting value match of a text item. The text item is a number. Is there any way that if there was a number in the text location that another variable could be added to do the math for how much the number has changed by?
Using this for a basketball game, if the number changes by 1 for a free throw, then one media source with a +1 would be triggered, but if the number changes by 2 a different media source with +2 would play.
You might want to set up a macro like this to assign the current and previous text values to variables and calculate the point difference accordingly:
You could then set up macros similar to the following to handle the difference score values:
You will of course have to tweak this / add handling which enables the macros handling the score difference at the appropriate times.
If you want to
import the examples you can use this code:
Code:
AAAUzXic7VhZb9s4EP4rBNGHHrFXcuweeesmbisgad04zcvCKGiJkonIpEBSrrOG/vvOUIdlJ3HcFnsVfkgiDefKN/PN0F7ROQu1MvTkjxWVbM7pCf3AZJRyYkKlOYlEHHPNZchJjx7RjOUGdGKWGo5vmqUpTxuBkqczJhPQsDqHd3MjsuGSh5/k2DJtGz1jVfY2tEJJE8QflT1Tcu010SrPmrdIhTdjbq2QCWS5oponwliuG4UZM5e5/D23Vsk6LshGmOkdKaRhc3POpq2kZyKZpfBjg/hUyUi4tK7AotHQtf8rvoR/gkK8GosNuYsJJ7m8e/allMFpuBGkzKhSWscnDMDHtLsbFu8woV0mLuMuLY7KwpYgNzrjLBUWwBsp495d2TMsf+9lrziqn73jYlI5GIK70snDtv7LQWProWVdow/K3vBb0+oXQKAUgvWkAaotsipJUj7aFq8hcHFDlaYsMzxqfAt4pAumBZumiHKqEhFCPtBBuWZoeaGgmQV2zopaMedfwaexmglpnZ7hGMQ12YKlWP7mwevCub3N8LHAtEVpsuDaOCj8AsR19I8lj8aOQGcNgehao1epBBICiIg4eToF0vGUO7QpkkRfl+EpvMl8ft1KpsEDyuUA50uociwSzJpLB0KLphbcr1maVUB6BdZtbyx9z/8l0OzthNP7GTihU1n4aJuakEv+dSGMmAog1S3kU8aImsGJGuMmfcTY4XVcVGeB5fN7zj2MsLxqPZd/QRviXvBIMDJWuQb8ijrVirS8YTrmPsHOqBbCe27vbIPDLvh1d4Hf95p53n/96rt2Qb//5j+yC0zZ5v/KJqhit2lZcQkrRZ6+PwtePMPCtObOAOPWvY0T/4enUB2/ogoaO0QsdgmgwE2oRVZGrRLC35DQnvOrtRq25tbW0B5pvhAqN+SqDP2jE/vJCh0Uj81tw5M5lzbAqdeBXWXy6dhqgKCaOF5bJP7k62E/YtjOiEf3eQ39BbPhLKgmaCxkdInS7y0FGkLEGmmrCEpcjCxlUKSNs0pIvgk7278FSuw3ws6ZnQ2XmeambEv6lPjkBemR5+SYPCO/kT7OJsNPc5i/85FW82w9koXMclvL6FtwkUjiCIA51kU8KT0EThmznqk0ag1jceeAdjpQHq4JdmKn49pnIbSSWLXrzdb5Mh5eji4/vQvOh/ThfbgmFrIJtlwGbrbXYdkMrnNpe38GMirrWXHbbzM7EroO5rlehJ455zKBujxgkbEoAiXYehrn5n5Xq938+Una7OTLYJMv3oEuB7r8z+nyT33i8g+7Zid5qnVNOuTJauMKUBxY9Dez6J4PcpM1Cza+56uWi2GLSr28I/OY5alteND6HLh9m9vf8h5iPmbc3EQ/5zx3iU9at2zqd3uDbr/T6yT+mzgc9OJXtPgLk6Mf5g==
Hope that helps! :)
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
I finally got around to looking a bit further into this issue.
You were testing this on a Windows machine, were you not?
If so, I think this might unfortunately be unsolvable at the moment.
The Windows Multimedia API seems to return unexpected values in regard to the amount of connected devices and this only seems to get "solved" when the process using this API is restarted.
At least the number of connected MIDI devices was incorrectly reported using this minimal example:
Code:
#include <iostream>
#include <windows.h>
#include <mmeapi.h>
#include <thread>
#pragma comment(lib, "Winmm.lib")
int main()
{
while (true) {
std::size_t nDevices = midiOutGetNumDevs();
std::cout << "devices:" << nDevices << "\n";
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
New devices were usually detected, but removed devices were always incorrectly reported as being connected still.
Could also be that I am simply using the API incorrectly, but if so I could not figure out where the issue lies.
Maybe I will give the current implementation a try on other platforms as well (when I find the time to) just to verify if this really is a Windows only issue or not.