hello,
coming back to vvvv after years is hitting hard on me..
I already forgot all the tricks and how tos…
I am just trying to play a random video from a spread in the videoplayer. But when the player hits the end of the video, it enters in a loop of random selection, without being able to get out of it
There is something about the timing of the value, or loop that I don’t see
I tried FrameDelay, Toggle, Timerflop, I can’t figure that out. How can I solve this?
TestRandomRead.vl (16.2 KB)
thank you for your help and explanation!
In gamma you almost never need framedelay. Write to a pad and read from it does a framedelay (so don’t use this as Send/Receive inside a patch)
TestRandomRead.vl (13.7 KB)
1 Like
woaaaaaah.
ok, now I understand the documentation page that was mentioning about FrameDelay and Pad
I still have a few question regarding what you have sent me if you don’t mind :
1: what do you mean by “don’t use this a send/receive inside a patch”???
2 : why use a cached region in that situation, instead of ‘changed’ node?
3 : in my original patch, the culprit seems like to be the S+H, and that the key element is TogEdge. what do you reckon?
TestRandomRead_myVersion.vl (14.8 KB)
1 : Because it would be tempting to write to a pad, duplicate it and read from it everywhere you need. like a send/receive. If this is done on the same process then there is a framedelay. Saying this just as an advice, it’s not related directly to the patch you sent.
2 : In the second patch you sent, the Changed isn’t necessary since there is already a TogEdge doing the same. TogEdge is act here as a Changed for boolean value. Now for the cache region, this is because some thing such as Create will be called everyframe, while you only need one when Up Edge is True. There is a Cache inside the Random but in general for things that need to happens only when necessary (and not every frame) you put it in a cache region (there are other technic as well) to save performance. In a patch like yours it doesn’t affect much since there isn’t a lot going on but it can be a good thing to keep in mind when working on bigger system, or with big spread of data.
3 : Using S+H doesn’t make much sense because the Random node as an Enabled input pin (which trigger the Cache region inside it) and you can connect it directly to a TogEdge.
Finally the framedelay isn’t necessary as the Pad will do it for you.
1 : ahhhhh ok! yes, I am using pads like a send/receive from everywhere in my patch. Maybe I should clean and reconsider what I am doing!
2 : ok, I understand the use of Cache Region. I didn’t know! thank you for your input, as my original project is reading 4 video sources and loading FX effects, I need to spare the power somewhere
3 : Yes, I get it now!
thank you for all the explanations! you rock!
1 Like