FFXController - Primary class used for displaying/running effects/colors/etc. Initialize with a PixelController like: new FXController( new FFXFastLEDPixelController( ledBufferPtr, numberOfLEDs ) );
Effects/Colors are placed into FFXSegments which are managed by the FXController. Every controller has a "Primary" segment, which represents the entire strip/array. This segment is always present and does not need to be created manually.
Additional (secondary) segments are added "on top" of the primary segment by calling AddSegment(...). Each of these
segments can have its own effect running and has independent opacity/transparency and brightness. Each secondary segment is referenced by a unique "Tag" or Name, which is used to address and manipulate the segment.
Displaying and changing effects (Primary Segment)
Displaying and changing effects (Additional Segments)
FFXSegment *seg = FXController->findSegment(
"Left");
if (seg) {
set->setOpacity(255);
}
** This will show the rotating rainbow effect on pixels 0-25 and the remainder of the strip will continue to show the primary effect.
inside main processing loop:
Each FFXSegment automatically supports cross-fading by using an independent FFXFrameProvider. The Frame Provider does this by allocating extra buffers and using cycles between refreshes to fade from one frame to the next. Turn this on and off using
or
Overlay FX are effects that can be displayed over the top of existing/running effects (the entire array), such as flashes, pulses, etc. These are also cross-faded and blended with the underlying FX as desired. Both the overlay and the underlying effect are cross-faded and continue to animate while displaying. These are done as follows:
OFX = new PulseOveralyFX( numberOfLEDs, speed );
OFX.getFXColor().setPalette( myPal );
Note that FFXController() automatically deletes the overlay FX, when it is complete so it MUST be created using - new OverlayFX(...); See FFXOverlay.h for more info.