MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ModulationVisualizer

Class ModulationVisualizer

Source/ModulationVisualizer.h:33–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31struct ModulationParameters;
32
33class ModulationVisualizer : public NoteEffectBase, public IDrawableModule
34{
35public:
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
53private:
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};

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected