Quartz programming through Quartz Composer works by implementing and connecting patches. Similar to routines in traditional programming languages, patches are base processing units. They execute and produce a result. For better performance, patch execution follows a lazy evaluation approach, meaning that patches are only executed when their output is needed. There are three types of patches: Consumers, Processors, and External Input patches that can receive and output mouse clicks, scrolls, and movements; MIDI and audio; keyboard; or other movements. A collection of patches can be melded into one, called a macro. Macros can be nested and their subroutines also edited.
To control the order of rendering, each renderer is assigned a layer, indicated in its upper-right corner. Layers are rendered sequentially, lowest to highest. Renderers can be enabled or disabled, essentially turning on or off that particular layer. Turning off unused layers often results in better performance, since fewer upstream patches need to be evaluated.
Some patches can have subpatches, which allows for global parameter changes to just the included subpatches. This is useful for lighting, 3D transformation, and GLSL shaders, among other things. Subpatch support is indicated by square corners on a patch, rather than the typical rounded corners.
With Version 3.0, it became possible to turn compositions into Virtual Patches. These allow the user to reuse functionality without having to store duplicate copies in each composition. The Quartz Composer Editor allows the user to save a "flattened" copy (with the virtual patches fully expanded inside), for easy distribution. Version 4.0 extended this functionality even more, and automatically includes "flattened" copies of virtual patches for use as a fallback if the desired virtual patch isn't installed on the host system. This greatly simplifies composition distribution.
Network functionality was greatly improved with the release of Leopard. It became possible to transmit data and synchronize over a network interface, and it also added support for Open Sound Control transmission and reception.
Read more about this topic: Quartz Composer
Famous quotes containing the word patches:
“A good story is one that isnt demanding, that proceeds from A to B, and above all doesnt remind us of the bad times, the cardboard patches we used to wear in our shoes, the failed farms, the way people you love just up and die. It tells us instead that hard work and perseverance can overcome all obstacles; it tells lie after lie, and the happy ending is the happiest lie of all.”
—Kathleen Norris (b. 1947)