Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::CurveT< SampleType > Class Template Reference

Response shaper for a unit control: the stage-curve law, or smoothstep. More...

#include <mod_tools.hpp>

Public Types

enum class  Shape : std::uint8_t { stage_curve , smoothstep }

Public Member Functions

void set_shape (Shape s)
void set_curve (SampleType c)
 -1 logarithmic .
SampleType process (SampleType x) const

Detailed Description

template<typename SampleType = float>
class pulp::signal::CurveT< SampleType >

Response shaper for a unit control: the stage-curve law, or smoothstep.

RT contract: stateless apart from its settings; audio-thread safe.

USE: the last stage before a destination, where "how the knob feels" lives. A velocity curve is this on the velocity input; a knob taper that has to stay in unit space is this on the parameter. stage_curve mode with curve = +1 is the "you have to lean on it" feel; -1 is "it moves the moment you touch it"; smoothstep is the ease-in-out for anything that must not jerk at either end.

Member Enumeration Documentation

◆ Shape

template<typename SampleType = float>
enum class pulp::signal::CurveT::Shape : std::uint8_t
strong
Enumerator
stage_curve 
smoothstep 

Member Function Documentation

◆ process()

template<typename SampleType = float>
SampleType pulp::signal::CurveT< SampleType >::process ( SampleType x) const
inline

◆ set_curve()

template<typename SampleType = float>
void pulp::signal::CurveT< SampleType >::set_curve ( SampleType c)
inline

-1 logarithmic .

. 0 linear .. +1 exponential. Ignored in smoothstep mode, which has no free parameter.

◆ set_shape()

template<typename SampleType = float>
void pulp::signal::CurveT< SampleType >::set_shape ( Shape s)
inline

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