From 3e9b443b60e8dc44277e892803157875527013a8 Mon Sep 17 00:00:00 2001 From: Liam Kerr Date: Sun, 2 Aug 2026 05:37:06 +0100 Subject: [PATCH] init + building --- .clangd | 6 ++++ .gitignore | 8 +++++ .gitmodules | 3 ++ Makefile | 34 +++++++++++++++++++ dpf | 1 + plugins/SquidgeDistortion/DistrhoPluginInfo.h | 31 +++++++++++++++++ plugins/SquidgeDistortion/Makefile | 11 ++++++ .../SquidgeDistortion/SquidgeDistortion.cpp | 33 ++++++++++++++++++ 8 files changed, 127 insertions(+) create mode 100644 .clangd create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Makefile create mode 160000 dpf create mode 100644 plugins/SquidgeDistortion/DistrhoPluginInfo.h create mode 100644 plugins/SquidgeDistortion/Makefile create mode 100644 plugins/SquidgeDistortion/SquidgeDistortion.cpp diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..23bdeb6 --- /dev/null +++ b/.clangd @@ -0,0 +1,6 @@ +CompileFlags: + Add: + - -Idpf/distrho + - -Idpf/include + - -Iplugins/SquidgeDistortion + - -DDISTRHO_PLUGIN_MAGIC=1 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1a1239 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +bin +build +*.o +*.so +*.clap +*.vst3 +compile_commands.json +.cache/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..924d963 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dpf"] + path = dpf + url = https://github.com/DISTRHO/DPF diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b5e82c9 --- /dev/null +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/dpf b/dpf new file mode 160000 index 0000000..4238e1c --- /dev/null +++ b/dpf @@ -0,0 +1 @@ +Subproject commit 4238e1c7f0351bbe488d79f0899c540543ac7583 diff --git a/plugins/SquidgeDistortion/DistrhoPluginInfo.h b/plugins/SquidgeDistortion/DistrhoPluginInfo.h new file mode 100644 index 0000000..d279de3 --- /dev/null +++ b/plugins/SquidgeDistortion/DistrhoPluginInfo.h @@ -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 \ No newline at end of file diff --git a/plugins/SquidgeDistortion/Makefile b/plugins/SquidgeDistortion/Makefile new file mode 100644 index 0000000..49e290f --- /dev/null +++ b/plugins/SquidgeDistortion/Makefile @@ -0,0 +1,11 @@ +#!/usr/bin/make -f +NAME = SquidgeDistortion + +FILES_DSP = SquidgeDistortion.cpp + +TARGETS = vst3 clap + +include ../../dpf/Makefile.plugins.mk + +all: $(TARGETS) + diff --git a/plugins/SquidgeDistortion/SquidgeDistortion.cpp b/plugins/SquidgeDistortion/SquidgeDistortion.cpp new file mode 100644 index 0000000..b72ac36 --- /dev/null +++ b/plugins/SquidgeDistortion/SquidgeDistortion.cpp @@ -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