Skip to content
James Elliott edited this page May 13, 2015 · 12 revisions

What is Afterglow?

Afterglow is a functional lighting controller, written in Clojure, intended to enable people to create spectacular lighting effects using modern stage and effect lighting, and which are related in deep ways to the phrasing of the music being played. (Its creator is a DJ and producer of light and laser shows by avocation.) Currently, the lighting effects and fixture definitions are written and organized through Clojure code, so you will either need to learn Clojure or work with a Clojure programmer to create new ones, but they are controlled through MIDI control surfaces or Open Sound Control, so once they are set up, there is great flexibility in how you can perform them.

Someday a user interface for building shows and fixture definitions may be created, either within Afterglow, or as a companion project, but that is not currently planned.

✳️ Actually, that is a bit of a fib… James has an Ableton Push and is already exploring how to build a rich interface using its LCD display, color-changing pressure-sensitive pads, and touch-sensitive encoders, but that is slightly separate from the main Afterglow project.

How Afterglow Works

The fundamental task of Afterglow is to make light shows happen. It does this by controlling lights, communicating with them through the Open Lighting Architecture, which can work with several kinds of control protocols, most of which are derived from DMX512, or a faster implementation of its basic ideas over Ethernet. When a show is running, Afterglow runs a thread which periodically asks “what should all the lights be doing now?” (resulting in a single “frame” of control values representing that moment in time), and sends the results of that analysis to all of the OLA universes the show is configured to control. By default this happens thirty times each second, but the interval is configurable within the show, and should be decided based on the fastest refresh rate of any physical interfaces you have hooked up to Afterglow. This is described in more detail in the Rendering Loop section.

In principle you could have more than one show running at a time, each controlling a different set of OLA universes, but most people will not need this capability.

When you just create a show and call (show/start! my-new-show), Afterglow will send a bunch of zero values to the show’s universes. To make interesting things happen you add Effects Functions to the show. The default namespace you are put into when you launch the Afterglow project using lein repl has some example effects that can help get a feel for this concept. To get a full understanding of how to use (and create) effect functions, learn about the Effect Function Lifecycle.

To learn how to install Afterglow and the Open Lighting Architecture, see the project README.

Since Afterglow was developed to create light shows for electronic music events, it is deeply driven by the notion of musical time, through its Metronomes, so it is worth learning how to configure and interact with them. It is also designed to work with MIDI controllers, both to trigger effects, and to synchronize with music, as described in MIDI Mapping and Beat Sync.

Clone this wiki locally