MADRIX Forum • Combine Storages
Page 1 of 1

Combine Storages

Posted: Fri Aug 03, 2012 9:31 am
by chursin
Hello all! Some questions:

1. Is it possyble to combine two or more storages like a layers (add them)?
2. Is it possyble to make some global variables for the whole storage (for more layers) or for the whole project (one global variable for more storages)?
3. Is it possyble to make a script to drive parameters in different layers and storages?

Thanks a lot!

Re: Combine Storages

Posted: Fri Aug 03, 2012 11:34 am
by Fritzsche
Hello,

Thank you for your questions!

1. No, that is not really possible. But you can mix to two Storage Places with the help of the Crossfader. Or you can simply copy all Layers one by one from one Storage Place to another Storage Place to combine them.
2. There are certain controls that will influence the complete Storage (such as the Speed Master) or a Storage Place including all of its Layers (such as the Storage Submaster, Filters/Effects (FX)) or even the Main Output (such as the Main Output Macro). Whot global variables do you have in mind?
3. Yes and no. That depends on what you want to achieve. What do you have in mind?
Thank you!

Re: Combine Storages

Posted: Mon Aug 06, 2012 2:06 pm
by chursin
Thanks a lot for your answer!

certainly, I should clear the aim. I have a lot of layers, that I need to drive synchrony to each other. For example: after the button click set high of “fire” effect slowly to 100 and after that do something in another layer.
The problem is to send “drive events” from one layer to another.
I see only two ways to do it: send info through the external file or assign some “service pixels” which don't appear in the patch map for interchange info between the layers.
The both ways looks crazy enough. Is there any direct way to do this obvious action?

Re: Combine Storages

Posted: Tue Aug 07, 2012 4:18 pm
by Hertel
Unfortunately you are not able to send events from a storage place macro to a effect macro right now. But maybe our storage place macro helps you.

Image


@scriptname="LayerChaser";
@author="";
@version="";
@description="";

int tStart;
int tA = 250; //250 frames = 5sec
int tB = 50; //1sec
int tSum = 100;
int tCurrent = 0;
int layernum = 0;
int layercount = 1;

void InitEffect()
{
layercount = GetLayerCount();
SetLayerOpacity(0,255);
for(int l=1;l<layercount;l++)
SetLayerOpacity(l,0);
layernum = 0;

tStart = 0;
tCurrent = 0;
tSum = layercount*(tA+tB);
}

void PreRenderEffect()
{
tCurrent++;

if(tCurrent > tA)
{
if(tCurrent > tA+tB)
{
tCurrent = 0;
layernum = (layernum+1)%layercount;
SetLayerOpacity(layernum,255);
for(int l=0;l<layercount;l++)
{
if(l != layernum)
SetLayerOpacity(l,0);
}
}
else
{
float v = (float)(tCurrent-tA)/(float)tB;
int iV = (int)(v*255.0);
SetLayerOpacity(layernum,255-iV);
SetLayerOpacity((layernum+1)%layercount,iV);
}
}
}

void PostRenderEffect()
{

}

void MatrixSizeChanged()
{
InitEffect();
}

Re: Combine Storages

Posted: Thu Aug 09, 2012 10:20 am
by chursin
Great! This works! Only one problem was to start the layer with script effect from initial point, but it could be worked out with help of analyzing “opacity” property in effect script (if (opacity == 0) (setCounterToZero()). It is not direct but it`s work! Thanks a lot!

Re: Combine Storages

Posted: Thu Aug 09, 2012 11:08 am
by Hertel
That's brilliant.