Signalsmith Audio's DSP Library  1.6.0
Useful C++ classes/templates for audio effects
Static Methods | Methods
signalsmith::curves::Reciprocal< Sample > Class Template Reference

#include <curves.h>

Detailed Description

template<typename Sample = double>
class signalsmith::curves::Reciprocal< Sample >

A warped-range map, based on 1/x.

Static Methods

static Reciprocal< Sample > barkScale ()
 Decent approximation to the Bark scale. More...
 
static Reciprocal< Sample > barkRange (Sample lowHz, Sample highHz)
 Returns a map from 0-1 to the given (non-negative) Hz range. More...
 

Methods

 Reciprocal (Sample y0, Sample y1, Sample y2)
 If no x-range given, default to the unit range. More...
 
 Reciprocal (Sample x0, Sample x1, Sample x2, Sample y0, Sample y1, Sample y2)
 
Sample operator() (double x) const
 
Reciprocal inverse () const
 
Sample inverse (Sample y) const
 
Sample dx (Sample x) const
 
Reciprocal then (const Reciprocal &other) const
 Combine two Reciprocals together in sequence. More...
 

Constructor & Destructor Documentation

◆ Reciprocal()

template<typename Sample = double>
signalsmith::curves::Reciprocal< Sample >::Reciprocal ( Sample  y0,
Sample  y1,
Sample  y2 
)
inline

If no x-range given, default to the unit range.

Method Details

◆ barkRange()

template<typename Sample = double>
static Reciprocal<Sample> signalsmith::curves::Reciprocal< Sample >::barkRange ( Sample  lowHz,
Sample  highHz 
)
inlinestatic

Returns a map from 0-1 to the given (non-negative) Hz range.

◆ barkScale()

template<typename Sample = double>
static Reciprocal<Sample> signalsmith::curves::Reciprocal< Sample >::barkScale ( )
inlinestatic

Decent approximation to the Bark scale.

The Bark index goes from 1-24, but this map is valid from approximately 0.25 - 27.5. You can get the bandwidth by barkScale.dx(barkIndex).

◆ then()

template<typename Sample = double>
Reciprocal signalsmith::curves::Reciprocal< Sample >::then ( const Reciprocal< Sample > &  other) const
inline

Combine two Reciprocals together in sequence.