Skip to content

PraxisEffect

Source: PraxisEffect.h

PraxisEffect

class PraxisEffect
src/light/effects/PraxisEffect.h:23

Inherits: EffectBase

Algorithmic palette-pattern effect driven by two beat oscillators.

PraxisEffect card PraxisEffect controls Author: MONSOONO / @Flavourdynamics (MoonLight), https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Effects/E_MoonLight.h

Each pixel's hue comes from two oscillating mutators combined with its own position. So the pattern continually stretches, shears and rolls across the grid.

Prior art: MoonLight's Praxis, whose two-mutator model this reproduces.

Public Attributes

uint8_t speed = 4 : How fast the hue scrolls, which is this port's own addition to the source.

uint8_t macroMutatorFreq = 3 : The macro mutator's beat frequency.

uint8_t macroMutatorMin = 250 : Its low end, scaled into the wide sweep.

uint8_t macroMutatorMax = 255 : And its high end.

uint8_t microMutatorFreq = 4 : The micro mutator's beat frequency.

uint8_t microMutatorMin = 200 : Its low end.

uint8_t microMutatorMax = 255 : And its high end.

Public Methods

virtual inline const char * tags() const override : Catalog tags: MoonLight origin.

virtual inline Dim dimensions() const override : Writes the z=0 slice, which extrude fills through a volume.

virtual inline void defineControls() override : Publish the hue scroll and both mutators.

virtual inline void tick() override : Sweep both mutators, then color each pixel from them and its own position.

More info

What each mutator does

The micro mutator divides the spatial term, so it sets the pattern's spatial frequency. The macro mutator multiplies the cross term instead, which is what warps the field. A steadily advancing hue base then scrolls the whole thing through the palette.