Compare commits

...
Sign in to create a new pull request.

1 commit

3 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_NAME "SquidgeTemplate"
#define DISTRHO_PLUGIN_AUTHOR "SquidgeSoft"
#define DISTRHO_PLUGIN_URI "moe.liam.squidgesoft.SquidgeTemplate"
#define DISTRHO_PLUGIN_CATEGORY "fx"
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_NUM_PARAMETERS 1
#define DISTRHO_PLUGIN_WANT_TIMEPOS 0
#define DISTRHO_PLUGIN_WANT_PROGRAMS 0
#define DISTRHO_PLUGIN_WANT_STATE 0
#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_SYNTH 0
#define DISTRHO_PLUGIN_PRIV_ID "moe.liam.squidgesoft.SquidgeTemplate"
#define DISTRHO_PLUGIN_BRAND "SquidgeSoft"
#define DISTRHO_PLUGIN_CLAP_ID "moe.liam.squidgesoft.SquidgeTemplate"
#endif

View file

@ -0,0 +1,10 @@
#!/usr/bin/make -f
NAME = squidgeTemplate
FILES_DSP = squidgeTemplate.cpp ../../core/Gain.cpp
TARGETS = vst3 clap
include ../../dpf/Makefile.plugins.mk
all: $(TARGETS)

View file

@ -0,0 +1,79 @@
#include "DistrhoDetails.hpp"
#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
#include "../../core/Gain.hpp"
START_NAMESPACE_DISTRHO
class squidgeTemplate : public Plugin
{
public:
enum Parameters
{
kParamGain,
kParameterCount
};
squidgeTemplate()
: Plugin(kParameterCount, 0, 0), gain_(1.0f)
{
}
protected:
const char *getLabel() const override { return "squidgeTemplate"; }
const char *getDescription() const override { return "Generic squidge plugin template."; }
const char *getMaker() const override { return "SquidgeSoft"; }
const char *getLicense() const override { return "GPL3"; }
uint32_t getVersion() const override { return d_version(0, 1, 0); }
int64_t getUniqueId() const override { return d_cconst('S', 'Q', 'T', 'P'); }
void initParameter(uint32_t index, Parameter &parameter) override
{
switch (index)
{
case kParamGain:
parameter.name = "Gain";
parameter.symbol = "gain";
parameter.ranges.min = 0.0f;
parameter.ranges.def = 1.0f;
parameter.ranges.max = 2.0f;
parameter.hints = kParameterIsAutomatable;
break;
}
}
float getParameterValue(uint32_t index) const override
{
if (index == kParamGain)
return gain_.getGain();
return 0.0f;
}
void setParameterValue(uint32_t index, float value) override
{
if (index == kParamGain)
gain_.setGain(value);
}
void run(const float **inputs, float **outputs, uint32_t frames) override
{
gain_.processStereo(inputs[0], inputs[1], outputs[0], outputs[1], frames);
}
void sampleRateChanged(double /*newSr*/) override
{
}
private:
Gain gain_;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(squidgeTemplate)
};
Plugin *createPlugin()
{
return new squidgeTemplate();
}
END_NAMESPACE_DISTRHO