Initial commit

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-07 11:00:47 +01:00
commit 812afaf90b
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
10 changed files with 423 additions and 0 deletions

15
.gitignore vendored Normal file
View file

@ -0,0 +1,15 @@
*.a
*.d
*.o
*.exe
*.dll
*.dylib
*.so
*.zip
.kdev_include_paths
.kdev4/
bin/
build/

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "plugins/CVCRack/Rack"]
path = plugins/CVCRack/Rack
url = https://github.com/VCVRack/Rack.git
[submodule "dpf"]
path = dpf
url = https://github.com/DISTRHO/DPF.git

42
Makefile Normal file
View file

@ -0,0 +1,42 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#
include dpf/Makefile.base.mk
all: dgl plugins gen
# --------------------------------------------------------------
dgl:
$(MAKE) -C dpf/dgl opengl
plugins: dgl
$(MAKE) all -C plugins/CVCRack
ifneq ($(CROSS_COMPILING),true)
gen: plugins dpf/utils/lv2_ttl_generator
@$(CURDIR)/dpf/utils/generate-ttl.sh
ifeq ($(MACOS),true)
@$(CURDIR)/dpf/utils/generate-vst-bundles.sh
endif
dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator
else
gen:
endif
# --------------------------------------------------------------
clean:
$(MAKE) clean -C dpf/dgl
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
$(MAKE) clean -C plugins/CVCRack
rm -rf bin build
# --------------------------------------------------------------
.PHONY: plugins

5
README.md Normal file
View file

@ -0,0 +1,5 @@
# DISTRHO CVCRack
WORK IN PROGRESS
This is a DPF'ied build of [VCVRack](https://github.com/VCVRack/Rack), allowing it to be used as an audio plugin.

1
dpf Submodule

@ -0,0 +1 @@
Subproject commit f79095abdeb7442121f9f26adc53b87352f04e26

View file

@ -0,0 +1,138 @@
/*
* DISTRHO CVCRack Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "DistrhoPlugin.hpp"
START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------------------------------------------
/**
Plugin to demonstrate parameter outputs using meters.
*/
class CVCRackPlugin : public Plugin
{
public:
CVCRackPlugin()
: Plugin(0, 0, 0)
{
}
protected:
/* --------------------------------------------------------------------------------------------------------
* Information */
/**
Get the plugin label.
A plugin label follows the same rules as Parameter::symbol, with the exception that it can start with numbers.
*/
const char* getLabel() const override
{
return "CVCRack";
}
/**
Get an extensive comment/description about the plugin.
*/
const char* getDescription() const override
{
return "...";
}
/**
Get the plugin author/maker.
*/
const char* getMaker() const override
{
return "DISTRHO";
}
/**
Get the plugin homepage.
*/
const char* getHomePage() const override
{
return "https://github.com/DISTRHO/CVCRack";
}
/**
Get the plugin license name (a single line of text).
For commercial plugins this should return some short copyright information.
*/
const char* getLicense() const override
{
return "ISC";
}
/**
Get the plugin version, in hexadecimal.
*/
uint32_t getVersion() const override
{
return d_version(1, 0, 0);
}
/**
Get the plugin unique Id.
This value is used by LADSPA, DSSI and VST plugin formats.
*/
int64_t getUniqueId() const override
{
return d_cconst('d', 'C', 'V', 'C');
}
/* --------------------------------------------------------------------------------------------------------
* Init */
/* --------------------------------------------------------------------------------------------------------
* Internal data */
/* --------------------------------------------------------------------------------------------------------
* Process */
/**
Run/process function for plugins without MIDI input.
*/
void run(const float** inputs, float** outputs, uint32_t frames) override
{
// copy inputs over outputs if needed
if (outputs[0] != inputs[0])
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames);
if (outputs[1] != inputs[1])
std::memcpy(outputs[1], inputs[1], sizeof(float)*frames);
}
// -------------------------------------------------------------------------------------------------------
private:
/**
Set our plugin class as non-copyable and add a leak detector just in case.
*/
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackPlugin)
};
/* ------------------------------------------------------------------------------------------------------------
* Plugin entry point, called by DPF to create a new plugin instance. */
Plugin* createPlugin()
{
return new CVCRackPlugin();
}
// -----------------------------------------------------------------------------------------------------------
END_NAMESPACE_DISTRHO

View file

@ -0,0 +1,73 @@
/*
* DISTRHO CVCRack Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "DistrhoUI.hpp"
START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------------------------------------------
class CVCRackUI : public UI
{
public:
CVCRackUI()
: UI(128, 512)
{
setGeometryConstraints(32, 128, false);
}
protected:
/* --------------------------------------------------------------------------------------------------------
* DSP/Plugin Callbacks */
/**
A parameter has changed on the plugin side.
This is called by the host to inform the UI about parameter changes.
*/
void parameterChanged(uint32_t index, float value) override
{
}
/* --------------------------------------------------------------------------------------------------------
* Widget Callbacks */
/**
The drawing function.
*/
void onDisplay() override
{
}
// -------------------------------------------------------------------------------------------------------
private:
/**
Set our UI class as non-copyable and add a leak detector just in case.
*/
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackUI)
};
/* ------------------------------------------------------------------------------------------------------------
* UI entry point, called by DPF to create a new UI instance. */
UI* createUI()
{
return new CVCRackUI();
}
// -----------------------------------------------------------------------------------------------------------
END_NAMESPACE_DISTRHO

View file

@ -0,0 +1,37 @@
/*
* DISTRHO CVCRack Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the license see the LICENSE file.
*/
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "CVCRack"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/glBars"
#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1
// #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
// #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer"
#define DISTRHO_UI_USER_RESIZABLE 1
enum Parameters {
kParameterCount
};
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

105
plugins/CVCRack/Makefile Normal file
View file

@ -0,0 +1,105 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#
# --------------------------------------------------------------
# Project name, used for binaries
NAME = CVCRack
# --------------------------------------------------------------
# Files to build (DPF stuff)
FILES_DSP = \
CVCRackPlugin.cpp
FILES_UI = \
CVCRackUI.cpp
# --------------------------------------------------------------
# Files to build (VCV stuff)
FILES_DSP += Rack/dep/pffft/pffft.c
FILES_DSP += Rack/dep/pffft/fftpack.c
# FILES_DSP += Rack/build/src/common.cpp
FILES_UI += Rack/dep/oui-blendish/blendish.c
FILES_UI += Rack/dep/nanovg/src/nanovg.c
FILES_UI += Rack/dep/glfw/deps/glad.c
# FIXME
FILES_UI += Rack/dep/osdialog/osdialog.c
FILES_UI += Rack/dep/osdialog/osdialog_zenity.c
FILES_DSP += $(wildcard Rack/src/*.c)
FILES_DSP += $(wildcard Rack/src/*/*.c)
# TODO filter out src/rtaudio.cpp src/rtmidi.cpp
FILES_DSP += $(wildcard Rack/src/*.cpp)
FILES_DSP += $(wildcard Rack/src/*/*.cpp)
EXTRA_LIBS = Rack/dep/lib/libglfw3.a
EXTRA_LIBS += Rack/dep/lib/libjansson.a
EXTRA_LIBS += Rack/dep/lib/libspeexdsp.a
# ifeq ($(LINUX),true)
EXTRA_LIBS += Rack/dep/lib/libGLEW.a
# endif
# ifeq ($(MACOS),true)
# EXTRA_LIBS += Rack/dep/lib/libGLEW.a
# endif
#
# ifeq ($(WINDOWS),true)
# EXTRA_LIBS += Rack/dep/lib/libglew32.a
# endif
# --------------------------------------------------------------
Rack/dep/lib/%.a:
$(MAKE) -C Rack/dep lib/$*.a
# --------------------------------------------------------------
# Do some magic
include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Extra flags for VCV stuff
BASE_FLAGS += -D_APP_VERSION=2.git.0
BASE_FLAGS += -IRack/include
BASE_FLAGS += -IRack/dep/include
BASE_FLAGS += -IRack/dep/filesystem/include
BASE_FLAGS += -IRack/dep/fuzzysearchdatabase/src
BASE_FLAGS += -IRack/dep/glfw/deps
BASE_FLAGS += -IRack/dep/nanovg/src
BASE_FLAGS += -IRack/dep/nanosvg/src
BASE_FLAGS += -IRack/dep/osdialog
BASE_FLAGS += -IRack/dep/oui-blendish
BASE_FLAGS += -IRack/dep/pffft
ifeq ($(MACOS),true)
BASE_FLAGS += -DARCH_MAC
else ifeq ($(WINDOWS),true)
BASE_FLAGS += -DARCH_WIN
else
BASE_FLAGS += -DARCH_LIN
endif
# FIXME
BASE_FLAGS += -Wno-unused-parameter
BASE_FLAGS += -Wno-unused-variable
LINK_FLAGS += -lpthread -ldl
# --------------------------------------------------------------
# Enable all possible plugin types
TARGETS = jack lv2 vst2 vst3
all: $(TARGETS)
# --------------------------------------------------------------

1
plugins/CVCRack/Rack Submodule

@ -0,0 +1 @@
Subproject commit 042a9ce026d253700ea14e340182900162ab4653