1 #ifndef __wavetableBank_h__ 2 #define __wavetableBank_h__ 8 #include "synthlabwtsource.h" 17 const uint32_t MAX_BANKS_PER_OSCILLATOR = 8;
20 const uint32_t FACTORY_BANK_START = 0;
21 const uint32_t NUM_FACTORY_BANKS = 4;
22 const uint32_t FACTORY_BANK_END = FACTORY_BANK_START + NUM_FACTORY_BANKS - 1;
25 const uint32_t USER_BANK_START = NUM_FACTORY_BANKS;
26 const uint32_t NUM_USER_BANKS = 4;
27 const uint32_t USER_BANK_END = USER_BANK_START + NUM_USER_BANKS - 1;
31 BANK_SET_0, BANK_SET_1
35 const uint32_t MAX_TABLES_PER_BANK = 32;
36 const uint32_t MAX_MORPHING_TABLES_PER_BANK = 128;
55 enum wtWaveFormIndex { SINE_WAVE, PARABOLIC_WAVE, TRIANGLE_WAVE };
58 inline uint32_t getBankIndex(uint32_t bankSet, uint32_t oscillatorBankIndex) {
return (bankSet * MAX_BANKS_PER_OSCILLATOR) + oscillatorBankIndex; }
129 inline virtual double readWaveTable(IWaveTable* selectedWT,
double readIndex)
131 if (selectedWT ==
nullptr)
return 0.0;
135 inline virtual double morphWaveTable(
MorphTablePair* selectedWTPair,
double readIndex,
double morphModulation)
155 virtual bool resetWaveTables(
double sampleRate)
166 virtual IWaveTable* selectTable(
int oscillatorWaveformIndex, uint32_t midiNoteNumber, uint32_t& tableLen)
185 virtual MorphTablePair* selectTablePair(
double morphPosition, uint32_t midiNoteNumber)
217 virtual uint32_t getNumWaveforms() {
return 0; }
221 virtual std::vector<std::string> getWaveformNames()
224 std::vector<std::string> stringList;
238 virtual std::string getWaveBankName() {
return bankName; }
239 virtual void setWaveBankName(std::string _bankName) { bankName = _bankName; }
413 std::string bankName;
Definition: analogegcore.cpp:4
Definition: wavetablebank.h:61
Definition: synthstructures.h:262
Definition: synthbase.h:1876