Stop control on patch

digitalgigalow's picture

hey what is up guys and gales? I have what might be a simple question, yet am lost on what I want to do. I have a patch that I want to use in Resolume 4 and need it to start from the beginning every time I launch it.

What happens is as follows. When I trigger the patch it runs from the beginning. Next I trigger the next clip on the layer. I go back to the patch, it is still running from the first time I triggered it.

Is there a way to make a start/stop option in this patch.

thanks,

The Digital Gigalow

PreviewAttachmentSize
+MIRROR CUBE.qtz28.82 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Swiftlikeninja's picture
Re: Stop control on patch

Unfortunately Im not proficient enough at javascript to actually assist but looking at the script I can tell you that the timer is just used to keep the patch evaluating. In quartz (others can correct me if im wrong) the JS patch renders once every time something changes so the time input forces the patch to re-render. what is looks like you need is a slight change in the script that resets the y pos of the cubes and possibly reset the number of instances in the Cube array at the start of the patch. Maybe one of the other/better coders can provide some more assistance.

jersmi's picture
Re: Stop control on patch

I'm a javascript novice, but maybe something like this.

function (__structure output) main (__number timer, __boolean stop, __boolean reset)
{
   if(!stop)
   {
   if(!reset)
   list.push(new Cube());
   for (i=0 ; i<list.length ; i++)
   {
      list[i].anim();
      if(list[i].bound>3)list.splice(i,1);
   }
   }
   var result = new Object();
   result.output = list;
   return result;
}

digitalgigalow's picture
Re: Stop control on patch

thanks I will give it a go tomorrow. here is a video of what I am working on. so i should replace javascript with this and add a boolean to the reset?

https://www.facebook.com/video/video.php?v=2655619754817&saved

jersmi's picture
Re: Stop control on patch

yes, the js was a modification of yours.