SynthLab SDK
SynthLab::BasicLookupTables Class Reference

Very basic lookup table object. More...

#include <basiclookuptables.h>

Public Member Functions

 BasicLookupTables ()
 Construction: More...
 
double readTableByTablePointer (double *table, double index)
 Reads and interpolates a table using a pointer to the table. More...
 
double readTableByTableIndex (uint32_t tableIndex, double index)
 Reads and interpolates a table using a table index (codified enum) More...
 
double readTableByTableIndexNormalized (uint32_t table, double normalizedIndex)
 read a table with enumerated table index
 
double readHannTableWithNormIndex (double normalizedIndex)
 read Hann table
 
double readSineTableWithNormIndex (double normalizedIndex)
 read sine table
 

Protected Attributes

std::unique_ptr< LookUpTablehannTable = nullptr
 a single lookup table - you can add more tables here
 

Detailed Description

Very basic lookup table object.

  • holds a smart pointer to a single LookupTable structure, Hann Window
  • you can add more tables and access functions as you like
  • provides multiple functions to access the lookup table with different lookup index types
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included and described in further detail in Designing Software Synthesizer Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2021 / 04 / 26

Constructor & Destructor Documentation

◆ BasicLookupTables()

SynthLab::BasicLookupTables::BasicLookupTables ( )

Construction:

  • creates new Hann window table
  • you can add more here

Member Function Documentation

◆ readTableByTableIndex()

double SynthLab::BasicLookupTables::readTableByTableIndex ( uint32_t  tableIndex,
double  index 
)

Reads and interpolates a table using a table index (codified enum)

Parameters
tableIndexzero-indexed enumeration
indexread location, expected to be fractional so interpolation is used
Returns
the newly constructed object

◆ readTableByTablePointer()

double SynthLab::BasicLookupTables::readTableByTablePointer ( double *  table,
double  index 
)

Reads and interpolates a table using a pointer to the table.

Parameters
tabletable pointer
indexread location, expected to be fractional so interpolation is used
Returns
the newly constructed object

The documentation for this class was generated from the following files: