Object that acts as the wavetable database, as shared synth-wide resource. You should study this especially if you want to implement your own database with your own wavetable formats, etc...
More...
#include <synthbase.h>
Object that acts as the wavetable database, as shared synth-wide resource. You should study this especially if you want to implement your own database with your own wavetable formats, etc...
- exposes the IWavetableDatabase; your own object only needs to expose this interface
- this is an example object to study if you want to roll your own version
- the wavetable sources in the database are uniquely identified with their name strings
- a std::map is used to make the dictionary of table sources
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2021 / 04 / 26
◆ addTableSource()
bool SynthLab::WavetableDatabase::addTableSource |
( |
const char * |
uniqueTableName, |
|
|
IWavetableSource * |
tableSource, |
|
|
uint32_t & |
uniqueIndex |
|
) |
| |
|
overridevirtual |
add a table source to the database
- Parameters
-
uniqueTableName | name of the table set, usually the same as the waveform string the user sees |
tableSource | IWavetableSource* to add |
- Returns
- true if sucessful
Implements SynthLab::IWavetableDatabase.
◆ clearTableSources()
bool SynthLab::WavetableDatabase::clearTableSources |
( |
| ) |
|
|
overridevirtual |
◆ getIWavetableDatabase()
convenience function to return this as interface pointer
◆ getTableSource()
IWavetableSource * SynthLab::WavetableDatabase::getTableSource |
( |
const char * |
uniqueTableName | ) |
|
|
overridevirtual |
◆ getWaveformIndex()
int32_t SynthLab::WavetableDatabase::getWaveformIndex |
( |
const char * |
uniqueTableName | ) |
|
|
overridevirtual |
get the vector index of a waveform, use at reset() or startup, not runtime
- does not delete or destroy anything
- Returns
- index of waveform or -1 if not found
Reimplemented from SynthLab::IWavetableDatabase.
◆ removeTableSource()
bool SynthLab::WavetableDatabase::removeTableSource |
( |
const char * |
uniqueTableName | ) |
|
|
overridevirtual |
remove a table source from the database
- Parameters
-
uniqueTableName | name of the table set, usually the same as the waveform string the user sees |
- Returns
- true if sucessful
Implements SynthLab::IWavetableDatabase.
The documentation for this struct was generated from the following files: