add oscillator

This commit is contained in:
2026-09-27 14:07:06 -05:00
parent eb84c93b7b
commit 8de4081a50
4 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#pragma once
#include <cmath>
#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<float> wavetable;
};