SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::DSP::Tables Namespace Reference

Namespace for compile-time generated tables. More...

Classes

struct  Generator
 Table value generators and initializers. More...
 
struct  PanLookup
 Lookup tables for SF2 pan values, where -500 means only left-channel, and +500 means only right channel. More...
 
struct  SineLookup
 Estimate std::sin() value using a table of pre-calculated sin values and linear interpolation. More...
 
struct  CentsFrequencyLookup
 Convert cent into frequency multiplier using a table lookup. More...
 
struct  CentsPartialLookup
 Convert cents to frequency. More...
 
struct  AttenuationLookup
 Convert centibels into attenuation via table lookup. More...
 
struct  GainLookup
 Convert centibels into gain value (same as 1.0 / attenuation) More...
 
struct  Cubic4thOrder
 Interpolation using a cubic 4th-order polynomial. More...
 

Detailed Description

Namespace for compile-time generated tables.

Each table is encapsulated in a struct that has three components:

  • a TableSize definition that states how many entries are in the table (all tables hold Float values).
  • a lookup_ class attribute that declares the lookup table
  • a value class method that returns the Float value to store at a given table index

All structs also include a class method that performs a lookup for a given value. However, this is not used by the table generating infrastructure.