Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::ColorMapper Class Reference

Maps a normalized value [0,1] to a color using a predefined ramp. More...

#include <spectrogram.hpp>

Public Member Functions

 ColorMapper (ColorRamp ramp=ColorRamp::inferno)
SpectrogramColor map (float t) const
 Map a normalized value (0 = minimum, 1 = maximum) to a color.
void set_ramp (ColorRamp ramp)
ColorRamp ramp () const

Detailed Description

Maps a normalized value [0,1] to a color using a predefined ramp.

RT contract: map(), set_ramp(), and ramp() are allocation-free fixed-state operations.

Constructor & Destructor Documentation

◆ ColorMapper()

pulp::signal::ColorMapper::ColorMapper ( ColorRamp ramp = ColorRamp::inferno)
inlineexplicit

Member Function Documentation

◆ map()

SpectrogramColor pulp::signal::ColorMapper::map ( float t) const
inline

Map a normalized value (0 = minimum, 1 = maximum) to a color.

◆ ramp()

ColorRamp pulp::signal::ColorMapper::ramp ( ) const
inline

◆ set_ramp()

void pulp::signal::ColorMapper::set_ramp ( ColorRamp ramp)
inline

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/spectrogram.hpp