#pragma once #include #include "../Resources.h" #include "../Wavetable.h" namespace serum { // =========================================================================== // Single-cycle wavetable view (morphs with the WT position knob). // =========================================================================== class WaveformDisplay : public juce::Component { public: void setWavetables (const WavetableLibrary* lib) { wtLib = lib; } void setWaveIndex (int index) { wave = index; } void setFramePosition (float pos) { wtPos = pos; } void setEnabled (bool e) { enabled = e; } void paint (juce::Graphics& g) override; private: const WavetableLibrary* wtLib = nullptr; int wave = 0; float wtPos = 0.0f; bool enabled = true; }; } // namespace serum