One layer controlling a second layer
Moderator: MADRIX Team
One layer controlling a second layer
Hello, I am using 2 layers each with an MAS scipt. When the top layer script is finished I would like it to instruct the bottom layer script to restart. Basically I have a moving pattern on top of a field of lights. I want to top layer to move a certain amount and then tell the bottom layer to pick a new random color. I'm unsure the best way to do this as it seems the layers run independently. Thanks
Re: One layer controlling a second layer
Hello cinetron,
.
At the moment there is no official way to communicate between several MAS scripts in MADRIX.
.
But you can consider the following trick which can help you to get the requested result.
You can missues a channel of the MADRIX "DMX Fader Tool". With the help of the fader you can set values with the script of the first layer and get the values with the script of the second layer. Therefor you have to ensure that the desired fader of the "DMX Fader Tool" is enabled and set to a channel which is not used in MADRIX. But the universe should be assigned to an used DMX universe in MADRIX. To set the value of a desired fader with the MADRIX script you have to use the following function:
"void SetDmxFaderValue(int fader, int value)".
To get the value of a desired fader you have to use the following function:
"int GetDmxFaderValue(int fader)"
.
Please keep in mind: This is just a way where you can get the requested result. But it is not a pretty one.
.
At the moment there is no official way to communicate between several MAS scripts in MADRIX.
.
But you can consider the following trick which can help you to get the requested result.
You can missues a channel of the MADRIX "DMX Fader Tool". With the help of the fader you can set values with the script of the first layer and get the values with the script of the second layer. Therefor you have to ensure that the desired fader of the "DMX Fader Tool" is enabled and set to a channel which is not used in MADRIX. But the universe should be assigned to an used DMX universe in MADRIX. To set the value of a desired fader with the MADRIX script you have to use the following function:
"void SetDmxFaderValue(int fader, int value)".
To get the value of a desired fader you have to use the following function:
"int GetDmxFaderValue(int fader)"
.
Please keep in mind: This is just a way where you can get the requested result. But it is not a pretty one.
Re: One layer controlling a second layer
Thanks for the quick reply. Will this work without a DMX device plugged in? It would be nice if Madrix supported OSC for such occasions. Just curious if the same trick can be used with MIDI ?. Also am I correct in thinking there is no way to have 2 layers in a single script? I want to be able to fade my top pattern into an underlying color. The top color and bottom color are different and change on a regular basis.
Thanks
Thanks
Re: One layer controlling a second layer
Just a question,
why it is not possible to achieve what you have in mind with just one script?
With other words why did you use two scripts instead one script which do the job of this two scripts?
why it is not possible to achieve what you have in mind with just one script?
With other words why did you use two scripts instead one script which do the job of this two scripts?
LEDs are nothing without control