diff --git a/src/synth/Instruments/WavetableOscillator.cpp b/src/synth/Instruments/WavetableOscillator.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/synth/Instruments/WavetableOscillator.hpp b/src/synth/Instruments/WavetableOscillator.hpp new file mode 100644 index 0000000..64b6761 --- /dev/null +++ b/src/synth/Instruments/WavetableOscillator.hpp @@ -0,0 +1,29 @@ + +#pragma once + +#include + +#include "synth/instruments/Instrument.hpp" + +class PianoString : public Instrument { + +public: + + WavetableOscillator() = default; + WavetableOscillator(ConfigService* config, LoggerService* logger, float sampleRate); + ~WavetableOscillator() = default; + + void noteOn(float frequency, float velocity) override; + void noteOff() override; + + bool isActive() override; + + float process(bool& scopeTrigger) override; + +private: + + bool loadWavetable(std::string filename); // TODO: load from conf file instead + + std::vector wavetable; + +}; diff --git a/src/synth/WavetableLoader.cpp b/src/synth/WavetableLoader.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/synth/WavetableLoader.hpp b/src/synth/WavetableLoader.hpp new file mode 100644 index 0000000..cd982a7 --- /dev/null +++ b/src/synth/WavetableLoader.hpp @@ -0,0 +1,4 @@ + +// placeholder to handle loading wavetables from files +// so that wavetables can be shared to each voice/instrument +// only need to need to load once for x number of voices