StoneyVCV v2
StoneyDSP Modules for VCV Rack 2.
Loading...
Searching...
No Matches
plugin.hpp
Go to the documentation of this file.
1
31#pragma once
32
33#define STONEYVCV_PLUGIN_HPP_INCLUDED 1
34
35#if defined (STONEYVCV_BUILD_PLUGIN)
36
37//==============================================================================
38
39#include <StoneyVCV/version.hpp>
40
41//==============================================================================
42
43#include <rack.hpp>
44#include <StoneyDSP/Core.hpp>
45
46//==============================================================================
47
48#ifdef STONEYDSP_DEBUG
49#include <iostream>
50#define DBG(msg) \
51::std::cerr << msg << std::endl
52#else
53#define DBG(msg) \
54::StoneyDSP::ignoreUnused(msg)
55#endif
56
57//==============================================================================
58
59namespace StoneyDSP
60{
65//==============================================================================
66
74namespace StoneyVCV
75{
80//==============================================================================
81
89namespace Plugin
90{
95//==============================================================================
96
100extern ::rack::plugin::Plugin* pluginInstance;
101
102//==============================================================================
103
105} // namespace Plugin
106
107//==============================================================================
108
109#if defined (STONEYVCV_BUILD_MODULES)
110
111// Declare each Model, defined in each module source file
112
113#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 2U)
114
115 #if defined (STONEYVCV_BUILD_VCA)
116 namespace VCA {
124 extern ::rack::plugin::Model* modelVCA;
125
127 } // namespace VCA
128 #endif // STONEYVCV_BUILD_VCA
129
130#endif // STONEYVCV_VERSION_PATCH >= 2
131
132#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 1U)
133
134 #if defined (STONEYVCV_BUILD_HP4)
135 namespace HP4 {
143 extern ::rack::plugin::Model* modelHP4;
144
145
147 } // namespace HP4
148 #endif // STONEYVCV_BUILD_HP4
149
150 #if defined (STONEYVCV_BUILD_HP2)
151 namespace HP2 {
159 extern ::rack::plugin::Model* modelHP2;
160
162 } // namespace HP1
163 #endif // STONEYVCV_BUILD_HP2
164
165 #if defined (STONEYVCV_BUILD_HP1)
166 namespace HP1 {
174 extern ::rack::plugin::Model* modelHP1;
175
177 } // namespace HP1
178 #endif // STONEYVCV_BUILD_HP1
179
180#endif
181
182#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH < 1U)
183 #warning "No modules found..."
184#endif
185
186#if defined (STONEYVCV_EXPERIMENTAL)
187#warning "Building experimental modules..."
188
189 // EXPERIMENTAL MODULES HERE...
190
191 #if defined (STONEYVCV_BUILD_LFO)
192 namespace LFO {
200 extern ::rack::plugin::Model* modelLFO;
201
203 } // namespace LFO
204 #endif // STONEYVCV_BUILD_LFO
205
206#endif // STONEYVCV_EXPERIMENTAL
207
208namespace Panels {
209extern ::NVGcolor bgBlack;
210extern ::NVGcolor bgWhite;
211extern ::NVGcolor borderColor;
212extern ::NVGcolor bgGradientBlackS0;
213extern ::NVGcolor bgGradientBlackS1;
214extern ::NVGcolor bgGradientWhiteS0;
215extern ::NVGcolor bgGradientWhiteS1;
216extern ::StoneyDSP::float_t MIN_WIDTH;
217extern ::StoneyDSP::float_t MIN_HEIGHT;
218
219extern void addScrewsToWidget(::rack::widget::Widget* widget);
220
221}
222
223#endif // STONEYVCV_BUILD_MODULES
224
225//==============================================================================
226
227#if defined (STONEYVCV_BUILD_TESTS)
234struct Spec {
235public:
236 ::std::string slug, name, description;
237 static constexpr ::StoneyDSP::size_t NUM_PARAMS = 0U;
238 static constexpr ::StoneyDSP::size_t NUM_INPUTS = 0U;
239 static constexpr ::StoneyDSP::size_t NUM_OUTPUTS = 0U;
240 static constexpr ::StoneyDSP::size_t NUM_LIGHTS = 0U;
241 ::rack::math::Vec size;
243 : slug("Spec"),
244 name(""),
245 description("Unit test spec base class (internal)"),
246 size(
247 ::rack::window::mm2px(::StoneyDSP::StoneyVCV::Panels::MIN_WIDTH),
248 ::rack::window::mm2px(::StoneyDSP::StoneyVCV::Panels::MIN_HEIGHT)
249 )
250 {};
251 ~Spec() = default;
252private:
253 STONEYDSP_DECLARE_NON_COPYABLE(Spec)
254 STONEYDSP_DECLARE_NON_MOVEABLE(Spec)
255};
256#endif
257
258//==============================================================================
259
261} // namespace StoneyVCV
262
263//==============================================================================
264
266} // namespace StoneyDSP
267
268//==============================================================================
269
270#endif // STONEYVCV_BUILD_PLUGIN
271
272//==============================================================================
extern::rack::plugin::Model * modelLFO
Declaration of the LFO Model instance, defined in LFO.cpp.
Definition plugin.hpp:200
extern::rack::plugin::Plugin * pluginInstance
Declare the Plugin instance, defined in plugin.cpp
Definition plugin.hpp:100
extern::NVGcolor borderColor
Definition plugin.hpp:211
extern::NVGcolor bgGradientWhiteS1
Definition plugin.hpp:215
void addScrewsToWidget(::rack::widget::Widget *widget)
extern::NVGcolor bgGradientBlackS0
Definition plugin.hpp:212
extern::NVGcolor bgWhite
Definition plugin.hpp:210
extern::StoneyDSP::float_t MIN_WIDTH
Definition plugin.hpp:216
extern::StoneyDSP::float_t MIN_HEIGHT
Definition plugin.hpp:217
extern::NVGcolor bgGradientWhiteS0
Definition plugin.hpp:214
extern::NVGcolor bgBlack
Definition plugin.hpp:209
extern::NVGcolor bgGradientBlackS1
Definition plugin.hpp:213
Definition HP1.hpp:49
The Spec struct.
Definition plugin.hpp:234
static constexpr ::StoneyDSP::size_t NUM_LIGHTS
Definition plugin.hpp:240
static constexpr ::StoneyDSP::size_t NUM_PARAMS
Definition plugin.hpp:237
::rack::math::Vec size
Definition plugin.hpp:241
static constexpr ::StoneyDSP::size_t NUM_OUTPUTS
Definition plugin.hpp:239
static constexpr ::StoneyDSP::size_t NUM_INPUTS
Definition plugin.hpp:238
::std::string description
Definition plugin.hpp:236
Spec()
Definition plugin.hpp:242
::std::string slug
Definition plugin.hpp:236
::std::string name
Definition plugin.hpp:236
StoneyDSP Modules for VCV Rack 2.