Author Archive for admin

17
Sep

Quartz Composer: Building on the Spiral ideas

Playing around with the spiral ideas from my last post, I came up with this composition, which I think is kind of cool:

17
Sep

Quartz Composer: Spiral

Building on the previous post about iterators in Quartz Composer, here’s an example that shows how to draw a spiral.

Here’s what it looks like:

The spiral is composed of segments that progress outward radially from the origin. Each successive endpoint is computed as a polar coordinate (Degrees, Distance), then converted to a cartesian (X,Y) coordinate relative to the origin.

This also shows the basics of using LFOs (low frequency oscillators) to automate parameters that change over time: a Sawtooth LFO is used to rotate the spiral, and a Sine LFO is used to grow and shrink it.

You can download the source file here:

SpiralExample.qtz

16
Sep

Quartz Composer iterators

So I’ve been playing with Quartz Composer on and off for a while now, and have been using it to create cusomt visual patches for use with the excellent VDMX VJ software for doing live visual projections with my band.

Coming to QC from other languages (in my case C#, Ruby and JavaScript for the most part), there are a few gotchas… or perhaps my brain is slow to adapt. Anyway, one of these has to do with the Iterator and Iterator Variables patches.

So, the way this works, is you create an Iterator patch (think “for loop” if you are familiar with C-style languages). The Iterator patch is a “macro patch”, which means that it contains other patches. Within the Iterator patch (right-click and select “Edit Macro Patch…”) you create an Iterator Variables patch, which provides your current index, the number of iterations, and a “Position” output that doesn;t quite do what I thought it might:

So you can think of this as:



for (CurrentIndex = 0; CurrentIndex < Iterations; CurrentIndex++) {
    // Why is this (Iterations – 1) ?
    // I think it’s crazy too, but in Quartz,
    // the Current Position goes from 0 to 1
    CurrentPosition = CurrentIndex/(Iterations - 1);
}

I’ve attached a Quartz Composer patch that demonstrates the behavior visually, and shows how to use the iterator and iterator variables patches to draw a set of spheres arranged in a circle about the origin:

IteratorExample.qtz