| 31 | struct ModulationParameters; |
| 32 | |
| 33 | class ModulationVisualizer : public NoteEffectBase, public IDrawableModule |
| 34 | { |
| 35 | public: |
| 36 | ModulationVisualizer(); |
| 37 | static IDrawableModule* Create() { return new ModulationVisualizer(); } |
| 38 | static bool AcceptsAudio() { return false; } |
| 39 | static bool AcceptsNotes() { return true; } |
| 40 | static bool AcceptsPulses() { return false; } |
| 41 | |
| 42 | //INoteReceiver |
| 43 | void PlayNote(double time, int pitch, int velocity, int voiceIdx = -1, ModulationParameters modulation = ModulationParameters()) override; |
| 44 | |
| 45 | void LoadLayout(const ofxJSONElement& moduleInfo) override; |
| 46 | void SetUpFromSaveData() override; |
| 47 | |
| 48 | bool IsResizable() const override { return true; } |
| 49 | void Resize(float w, float h) override; |
| 50 | |
| 51 | bool IsEnabled() const override { return mEnabled; } |
| 52 | |
| 53 | private: |
| 54 | //IDrawableModule |
| 55 | void DrawModule() override; |
| 56 | void GetModuleDimensions(float& width, float& height) override |
| 57 | { |
| 58 | width = mWidth; |
| 59 | height = mHeight; |
| 60 | } |
| 61 | |
| 62 | struct VizVoice |
| 63 | { |
| 64 | std::string GetInfoString(); |
| 65 | bool mActive{ false }; |
| 66 | ModulationParameters mModulators; |
| 67 | }; |
| 68 | |
| 69 | float mWidth{ 350 }; |
| 70 | float mHeight{ 100 }; |
| 71 | VizVoice mGlobalModulation; |
| 72 | std::vector<VizVoice> mVoices; |
| 73 | }; |
nothing calls this directly
no test coverage detected