Page 1 of 1
Script editing SCE Counter - How?
Posted: Tue May 18, 2021 9:54 am
by niklas
Hello,
I'm struggling with the use of scripts. I read trough the tutorial but am still kinda lost.
I want to use the SCE Counter effect and instead of adding a lot of numbers into the string table, i wanted to write a script that just adds Number "X" every 10 bpm.
Is it possible to "open" the SCE Effect Script and just change or add something to it?
Thank you for your help!
Niklas
Re: Script editing SCE Counter - How?
Posted: Wed May 19, 2021 6:21 am
by Guertler
Hello niklas,
You don't need to create a new MADRIX Script effect (MAS) to get the wanted result. You need to use the Effect Marco of the "SCE Counter" instead.
Every MADRIX effect offers the possibility to be modified by Macro commands. Under the following link you will find the Macro commands for the "SCE Counter":
http://help.madrix.com/m5/html/script/i ... unter.html
You want to modify the "String Table" of the "SCE Counter". The "String Table" has also a lot of Macro commands and you will find an overview of all these commands under the following link:
http://help.madrix.com/m5/html/script/i ... table.html
Please note: You need to calculate how often the Macro should modify the "String Table" by your own. The Macro is working according to the render frequence of MADRIX (by default 50 FPS). If you want to modify the "String Table" every 10 BPM, you have to convert BPM in FPS for the macro.
Re: Script editing SCE Counter - How?
Posted: Wed May 19, 2021 7:07 am
by niklas
Hey Guertler,
thank you for your fast answer!
I'm still kinda struggling ... Do i just have to paste in the Function as below which adds a string to the table?
I tried this and it says function is already decleared. I wanted to add just +10 onto the index.So 10,20,30,40 ...
I woud be very glad about some help, sorry for bothering.
Niklas
int index = 0;
string = s;
int page= 1;
void StringTableAddString(int index, string, int page)
{
s = (s + 10);
}
Re: Script editing SCE Counter - How?
Posted: Wed May 19, 2021 2:49 pm
by Guertler
Hello niklas,
All available functions of the "String Table" are already decleared. If you want to use a function, you only have to call the desired function including the needed parameters.
In case of adding a desired String to the "String Table" you have to call the function in the following way:
StringTableAddString(12, "Your Text", 0);
This example will add the String "Your Text" at index 12 to the "String Table" of the SCE Counter.
Please pay attention how often the macro will call this function. Because at every call the desired String will be added at the desired index of the "String Table".