SynthLab SDK
SynthLab::IWavetableDatabase Class Referenceabstract

Interface for wavetable databases. More...

#include <synthbase.h>

Inheritance diagram for SynthLab::IWavetableDatabase:
SynthLab::WavetableDatabase

Public Member Functions

virtual IWavetableSourcegetTableSource (const char *uniqueTableName)=0
 get a table source based on its unique name string More...
 
virtual IWavetableSourcegetTableSource (uint32_t uniqueTableIndex)
 
virtual bool addTableSource (const char *uniqueTableName, IWavetableSource *tableSource, uint32_t &uniqueIndex)=0
 adds a table to the database More...
 
virtual bool removeTableSource (const char *uniqueTableName)=0
 remove a table from the database More...
 
virtual bool clearTableSources ()=0
 clear all source pointers More...
 
virtual int32_t getWaveformIndex (const char *uniqueTableName)
 

Detailed Description

Interface for wavetable databases.

  • A wavetable database stores a set of wavetable sources and allows the calling object access to these sources; for example a wavetable oscillator would request a wavetable source pointer for the "analog saw" table set
  • The database interface functions allow:
  1. get a wavetable source interface pointer
  2. add/remove wavetable sources to/from the database
  3. clear all the table sources (for destruction time)
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

Member Function Documentation

◆ addTableSource()

virtual bool SynthLab::IWavetableDatabase::addTableSource ( const char *  uniqueTableName,
IWavetableSource tableSource,
uint32_t &  uniqueIndex 
)
pure virtual

adds a table to the database

Parameters
uniqueTableNamethe name of the table source (see IWavetableSource::getWaveformName( ))
tableSourcethe IWavetableSource interface pointer to the object
Returns
true if sucessful, false otherwise

Implemented in SynthLab::WavetableDatabase.

◆ clearTableSources()

virtual bool SynthLab::IWavetableDatabase::clearTableSources ( )
pure virtual

clear all source pointers

Returns
true if sucessful, false otherwise

Implemented in SynthLab::WavetableDatabase.

◆ getTableSource()

virtual IWavetableSource* SynthLab::IWavetableDatabase::getTableSource ( const char *  uniqueTableName)
pure virtual

get a table source based on its unique name string

Parameters
uniqueTableNamethe name of the table source (see IWavetableSource::getWaveformName( ))
Returns
an IWavetableSource pointer to the source

Implemented in SynthLab::WavetableDatabase.

◆ getWaveformIndex()

virtual int32_t SynthLab::IWavetableDatabase::getWaveformIndex ( const char *  uniqueTableName)
inlinevirtual
Returns
the table index (unique) for faster iteration (OPTIONAL), or -1 if not found

Reimplemented in SynthLab::WavetableDatabase.

◆ removeTableSource()

virtual bool SynthLab::IWavetableDatabase::removeTableSource ( const char *  uniqueTableName)
pure virtual

remove a table from the database

Parameters
uniqueTableNamethe name of the table source (see IWavetableSource::getWaveformName( ))
Returns
true if sucessful, false otherwise

Implemented in SynthLab::WavetableDatabase.


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