Help! javascript generated structure: too many members/array to the queue

jacopoB's picture

I've never worked with javascript but i've managed to create a structure, the problem is that i dont know how to dequeue the values. (I want to keep only the newest values 20-40 per points {x,y,z})

Anyone can help?

_Queue = []

function (__structure Queue) main (__number inputNumber[12]) { var result = new Object(); _Queue.push([inputNumber[0],inputNumber[1],inputNumber[2]]) _Queue.push([inputNumber[3],inputNumber[4],inputNumber[5]]) _Queue.push([inputNumber[6],inputNumber[7],inputNumber[8]]) _Queue.push([inputNumber[9],inputNumber[10],inputNumber[11]]) result.Queue = _Queue; return result; }

Video Scratching

scalf's picture

I am looking for a good way to "scratch video" in QC. By scratch, I mean analogous to Dj scratching in that one can alter the speed, position, and direction of a video on the fly using some fader, rotary, or other controller.

I have looked around, and it seems as though dust made it pretty good with his approach but I found no file to dive into. http://kineme.net/forum/Programming/bestapproachtovideoscratchplugin

The internet hints at using some sort of queue system to drive the video's position from what I have gathered.

Of course, if I hook up the mouse input to the rate, or selection start, the video becomes choppy. I know there is a good way to do this.

If someone could point me in the right direction that would be much appreciated

Iteration to Structure

realtime's picture

after a brief study how to nest iterators seen @noboko (thanks @gtoledo3 for useful link! http://kineme.net/forum/DevelopingCompositions/SuperCoolQuartzComposerQtzs) i tried to hook them to make structures. few examples attached.

so far i had an interesting adventure in generating various combinations of lines and stuff.. but i'm really stuck at this point. i have a basic question:

does this kind of structuring makes sense? could it go further (lets say something like http://kineme.net/Release/Beta/GLLookVeryCool) ?

is there a way to make offsetting points more controllable by this method, or i should include any other tools, maybe i'm missing something about structure making in general?

any tip would be appreciated!

Polyspin (Composition by gtoledo3)

Author: gtoledo3
License: (unknown)
Date: 2010.10.09
Compatibility: 10.4, 10.5, 10.6
Required plugins:

This is a composition that:

-Constructs a grid of colored objects, with different controls for color generation.

-Monitors mouse x/y and allows an object to push/pop in Z, and/or spin in x/y or z rotation if the mouse hovers over an object.

-Configures a color crossfade on the object as it returns back to the "home" position of the color grid.

-Controls for force and decay of the hit effect.

-Configurable columns and rows that adjust to the rendering destination.

...and that's the gist of it.

I'm sharing this composition to show a way of using an iterator that will make one or more object parameters change after they are triggered.

I used a modified version of this for this video post:

Javascript Sprite Animation

jersmi's picture

Posted is a working little animation using sprites, iterator and javascript. I want the animation to add the sprites (random size and color) without overlapping, and scroll as the screen fills.

  1. Regarding, for ex., sprites filling screen but not overlapping, in javascript (or otherwise, i guess), how can a relationship be set up between queue indices, so current index uses values from previous index (or indices) to determine x position, y position, width and height?

  2. Would it be better (faster) to have the random values sampled in js?

  3. How can I generate the scrolling, say after the screen fills? Best way? Sometimes I see the "dummy" patch time patch input in js -- what is this for? Am I off the mark for thinking of this re: scrolling in js?

Any help is appreciated.