Midi Cross-Fade with Quartz Composer

The following set of Quartz Composer patches can be used to cross fade between two items. Each item is rendered in a “Render in image” patch, which is output to a Billboard. The Billboard patch multiples the image it receives by a colour, we use this to modify the alpha/transparency of each render.

Screen Shot 2013-08-21 at 13.15.06

 

The alpha value comes from a MIDI receiver patch, which via OSX’s core-midi driver receives MIDI information over the network from an iPhone app called midi designer.

Configuring core-midi networking via OSX’s “Audio MIDI Setup” utility:

Screen Shot 2013-08-21 at 13.40.39

For one billboard, the received value is passed directly to the colour generator, for the other it is inverted via a “1-x” mathematical expression patch. The result is that the alpha values received by each billboard are inversely proportional, causing one to become opaque as the other becomes transparent.

Midi Designer showing fader:

photo

 

Output window, part way through the fade:

viewer-crossfade

So the example is simple, but each of the items rendered could be an audio visualisation or a video (via quicktime) or a presentation slide or pretty much anything! This could form the basis of an easily remote controlled presentation/VJ app.