init + building

This commit is contained in:
Liam Kerr 2026-08-02 05:37:06 +01:00
commit 3e9b443b60
8 changed files with 127 additions and 0 deletions

6
.clangd Normal file
View file

@ -0,0 +1,6 @@
CompileFlags:
Add:
- -Idpf/distrho
- -Idpf/include
- -Iplugins/SquidgeDistortion
- -DDISTRHO_PLUGIN_MAGIC=1

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
bin
build
*.o
*.so
*.clap
*.vst3
compile_commands.json
.cache/

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "dpf"]
path = dpf
url = https://github.com/DISTRHO/DPF

34
Makefile Normal file
View file

@ -0,0 +1,34 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ------------------------------ #
# Define your plugins here as space-separated names
PLUGINS = SquidgeDistortion
# --------------------------------------------------------------
dgl:
ifeq ($(HAVE_OPENGL),true)
$(MAKE) -C dpf/dgl opengl
endif
# Build all plugins in the PLUGINS list
plugins: dgl
@for plugin in $(PLUGINS); do \
echo "Building $$plugin..."; \
$(MAKE) all -C plugins/$$plugin || exit 1; \
done
# --------------------------------------------------------------
clean:
$(MAKE) clean -C dpf/dgl
@for plugin in $(PLUGINS); do \
echo "Cleaning $$plugin..."; \
$(MAKE) clean -C plugins/$$plugin || true; \
done
rm -rf bin build
# --------------------------------------------------------------
.PHONY: dgl plugins clean

1
dpf Submodule

@ -0,0 +1 @@
Subproject commit 4238e1c7f0351bbe488d79f0899c540543ac7583

View file

@ -0,0 +1,31 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_NAME "SquidgeDistortion"
#define DISTRHO_PLUGIN_AUTHOR "SquidgeSoft"
#define DISTRHO_PLUGIN_URI "moe.liam.squidgesoft.SquidgeDistortion"
#define DISTRHO_PLUGIN_CATEGORY "fx"
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#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.SquidgeDistortion"
#define DISTRHO_PLUGIN_BRAND "SquidgeSoft"
#define DISTRHO_PLUGIN_CLAP_ID "moe.liam.squidgesoft.SquidgeDistortion"
enum Parameters {
kGain,
kTone,
kVolume,
// add your parameters here
kParameterCount // must be last
};
#endif

View file

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

View file

@ -0,0 +1,33 @@
#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
START_NAMESPACE_DISTRHO
class SquidgeDistortion : public Plugin {
public:
SquidgeDistortion()
: Plugin(kParameterCount, 0, 0), gain(1.0), tone(1.0), volume(1.0) {}
protected:
const char *getLabel() const override { return "SquidgeDistortion"; }
const char *getDescription() const override {
return "Simple distortion plugin.";
}
const char *getMaker() const override { return "SquidgeSoft"; }
const char *getLicense() const override { return "MIT"; }
uint32_t getVersion() const override { return d_version(1, 0, 0); }
int64_t getUniqueId() const override { return d_cconst('M', 'A', 'D', 'T'); }
void run(const float **inputs, float **outputs, uint32_t frames) override {}
private:
float gain;
float tone;
float volume;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(SquidgeDistortion);
};
Plugin *createPlugin() { return new SquidgeDistortion(); }
END_NAMESPACE_DISTRHO