MovingHeadEffect
Source:
MovingHeadEffect.h
Formation¶
src/light/effects/MovingHeadEffect.h:196One head's place in the formation: a phase offset into the sweep, and a direction.
Public Attributes¶
uint16_t phase
int32_t dir
MovingHeadEffect¶
src/light/effects/MovingHeadEffect.h:30Inherits:
EffectBase
Effect: aims a rig of moving heads, with formations and an audio-reactive mode.

One head sweeping a sine is a demo, and a rig of them is a show. formation is the relationship between them: one sweep, a per-head phase and direction. One control changes the rig's whole character without touching speed or range.
Public Attributes¶
uint8_t formation = kFan
: The selected formation.
uint8_t panBpm = 6
: Pan sweep rate in BPM, so 60 is one sweep a second.
uint8_t tiltBpm = 9
: Tilt sweep rate in BPM, deliberately unequal to panBpm.
uint8_t panRange = 128
: How much pan travel to use: a band around center, since full pan aims away from the audience.
uint8_t tiltRange = 96
: How much tilt travel to use.
uint8_t panCenter = 128
: Where the pan sweep is centered, 128 being the fixture's middle.
uint8_t tiltCenter = 128
: Where the tilt sweep is centered.
uint8_t gobo = 0
: The gobo pattern, a raw fixture byte: only the fixture's manual says what a value selects.
uint8_t rotate = 0
: The gobo or prism spin, a raw fixture byte.
bool goboOnBeat = false
: Roll a new gobo on a bass hit, with a hold so a busy track cannot strobe through patterns.
bool audioReactive = false
: Move and light with the music: the beam widens with the room and each head takes its own band.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags: the audio glyph applies when audioReactive is set.
virtual inline Dim dimensions() const override
: D3: every head has its own aim, so the effect places all of them rather than being extruded.
virtual inline void defineControls() override
: Publish the formation, the sweep, the beam wheels and the audio switch.
virtual inline void prepare() override
: Reset both sweep clocks and return the gobo to the user's own choice.
virtual inline void tick() override
: Aim every head from its place in the formation, and color it from the palette.
Public Static Attributes¶
constexpr const char * kFormationNames = {"fan", "mirror", "chase", "cross", "unison"}
: The formation names, in enum order, for the select control.
Public Types¶
enum
: How the heads relate to each other, which is what the audience reads.
| Value | Description |
|---|---|
kFan |
|
kMirror |
|
kChase |
|
kCross |
|
kUnison |
|
kFormationCount |
More info¶
Pan and tilt run at different rates¶
Two sines at different rates trace a Lissajous path. It closes into a loop when the rates share a small ratio, and drifts when they do not. That drift keeps a long show from looking like a metronome.
The same effect runs on a strip¶
Everything is written through EffectBase's role setters, which no-op on an absent channel. So this effect on an LED strip paints its color pattern and moves nothing. An effect says what it wants, and the fixture's preset decides what can be expressed.