@@ -1,9 +1,9 @@ | |||||
[submodule "plugins/CVCRack/Rack"] | |||||
path = plugins/CVCRack/Rack | |||||
[submodule "plugins/Cardinal/Rack"] | |||||
path = plugins/Cardinal/Rack | |||||
url = https://github.com/VCVRack/Rack.git | url = https://github.com/VCVRack/Rack.git | ||||
[submodule "dpf"] | [submodule "dpf"] | ||||
path = dpf | path = dpf | ||||
url = https://github.com/DISTRHO/DPF.git | url = https://github.com/DISTRHO/DPF.git | ||||
[submodule "plugins/CVCRack/mingw-std-threads"] | |||||
path = plugins/CVCRack/mingw-std-threads | |||||
[submodule "plugins/Cardinal/mingw-std-threads"] | |||||
path = plugins/Cardinal/mingw-std-threads | |||||
url = https://github.com/meganz/mingw-std-threads.git | url = https://github.com/meganz/mingw-std-threads.git |
@@ -8,15 +8,13 @@ include dpf/Makefile.base.mk | |||||
all: dgl plugins gen | all: dgl plugins gen | ||||
SKIP_NANOVG = true | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
dgl: | dgl: | ||||
$(MAKE) -C dpf/dgl opengl | |||||
$(MAKE) SKIP_NANOVG=true -C dpf/dgl opengl | |||||
plugins: dgl | plugins: dgl | ||||
$(MAKE) all -C plugins/CVCRack | |||||
$(MAKE) all -C plugins/Cardinal | |||||
ifneq ($(CROSS_COMPILING),true) | ifneq ($(CROSS_COMPILING),true) | ||||
gen: plugins dpf/utils/lv2_ttl_generator | gen: plugins dpf/utils/lv2_ttl_generator | ||||
@@ -36,19 +34,19 @@ endif | |||||
clean: | clean: | ||||
$(MAKE) clean -C dpf/dgl | $(MAKE) clean -C dpf/dgl | ||||
$(MAKE) clean -C dpf/utils/lv2-ttl-generator | $(MAKE) clean -C dpf/utils/lv2-ttl-generator | ||||
$(MAKE) clean -C plugins/CVCRack | |||||
$(MAKE) clean -C plugins/Cardinal | |||||
rm -rf bin build | rm -rf bin build | ||||
rm -rf plugins/CVCRack/Rack/dep/bin | |||||
rm -rf plugins/CVCRack/Rack/dep/include | |||||
rm -rf plugins/CVCRack/Rack/dep/lib | |||||
rm -rf plugins/CVCRack/Rack/dep/share | |||||
rm -rf plugins/CVCRack/Rack/dep/curl-7.66.0 | |||||
rm -rf plugins/CVCRack/Rack/dep/glew-2.1.0 | |||||
rm -rf plugins/CVCRack/Rack/dep/jansson-2.12 | |||||
rm -rf plugins/CVCRack/Rack/dep/libarchive-3.4.3 | |||||
rm -rf plugins/CVCRack/Rack/dep/openssl-1.1.1d | |||||
rm -rf plugins/CVCRack/Rack/dep/speexdsp-SpeexDSP-1.2rc3 | |||||
rm -rf plugins/CVCRack/Rack/dep/zstd-1.4.5 | |||||
rm -rf plugins/Cardinal/Rack/dep/bin | |||||
rm -rf plugins/Cardinal/Rack/dep/include | |||||
rm -rf plugins/Cardinal/Rack/dep/lib | |||||
rm -rf plugins/Cardinal/Rack/dep/share | |||||
rm -rf plugins/Cardinal/Rack/dep/curl-7.66.0 | |||||
rm -rf plugins/Cardinal/Rack/dep/glew-2.1.0 | |||||
rm -rf plugins/Cardinal/Rack/dep/jansson-2.12 | |||||
rm -rf plugins/Cardinal/Rack/dep/libarchive-3.4.3 | |||||
rm -rf plugins/Cardinal/Rack/dep/openssl-1.1.1d | |||||
rm -rf plugins/Cardinal/Rack/dep/speexdsp-SpeexDSP-1.2rc3 | |||||
rm -rf plugins/Cardinal/Rack/dep/zstd-1.4.5 | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -1,4 +1,6 @@ | |||||
# DISTRHO CVCRack | |||||
# DISTRHO Cardinal | |||||
*Cardinal, bring forth the Rack!* | |||||
WORK IN PROGRESS - nothing to see here | WORK IN PROGRESS - nothing to see here | ||||
@@ -1,17 +1,18 @@ | |||||
/* | /* | ||||
* DISTRHO CVCRack Plugin | |||||
* DISTRHO Cardinal Plugin | |||||
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com> | * 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. | |||||
* 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 3 of | |||||
* the License, or any later version. | |||||
* | * | ||||
* 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. | |||||
* 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 GNU General Public License see the LICENSE file. | |||||
*/ | */ | ||||
#include <asset.hpp> | #include <asset.hpp> | ||||
@@ -35,6 +36,15 @@ | |||||
START_NAMESPACE_DISTRHO | START_NAMESPACE_DISTRHO | ||||
// ----------------------------------------------------------------------------------------------------------- | // ----------------------------------------------------------------------------------------------------------- | ||||
// The following code was based from VCVRack adapters/standalone.cpp | |||||
/* | |||||
Copyright (C) 2016-2021 VCV | |||||
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 3 of the | |||||
License, or (at your option) any later version. | |||||
*/ | |||||
struct Initializer { | struct Initializer { | ||||
Initializer() | Initializer() | ||||
@@ -121,13 +131,12 @@ static const Initializer& getInitializerInstance() | |||||
return init; | return init; | ||||
} | } | ||||
/** | |||||
Plugin to demonstrate parameter outputs using meters. | |||||
*/ | |||||
class CVCRackPlugin : public Plugin | |||||
// ----------------------------------------------------------------------------------------------------------- | |||||
class CardinalPlugin : public Plugin | |||||
{ | { | ||||
public: | public: | ||||
CVCRackPlugin() | |||||
CardinalPlugin() | |||||
: Plugin(0, 0, 0) | : Plugin(0, 0, 0) | ||||
{ | { | ||||
} | } | ||||
@@ -142,7 +151,7 @@ protected: | |||||
*/ | */ | ||||
const char* getLabel() const override | const char* getLabel() const override | ||||
{ | { | ||||
return "CVCRack"; | |||||
return "Cardinal"; | |||||
} | } | ||||
/** | /** | ||||
@@ -166,7 +175,7 @@ protected: | |||||
*/ | */ | ||||
const char* getHomePage() const override | const char* getHomePage() const override | ||||
{ | { | ||||
return "https://github.com/DISTRHO/CVCRack"; | |||||
return "https://github.com/DISTRHO/Cardinal"; | |||||
} | } | ||||
/** | /** | ||||
@@ -192,7 +201,7 @@ protected: | |||||
*/ | */ | ||||
int64_t getUniqueId() const override | int64_t getUniqueId() const override | ||||
{ | { | ||||
return d_cconst('d', 'C', 'V', 'C'); | |||||
return d_cconst('d', 'C', 'd', 'n'); | |||||
} | } | ||||
/* -------------------------------------------------------------------------------------------------------- | /* -------------------------------------------------------------------------------------------------------- | ||||
@@ -223,7 +232,7 @@ private: | |||||
/** | /** | ||||
Set our plugin class as non-copyable and add a leak detector just in case. | Set our plugin class as non-copyable and add a leak detector just in case. | ||||
*/ | */ | ||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackPlugin) | |||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalPlugin) | |||||
}; | }; | ||||
/* ------------------------------------------------------------------------------------------------------------ | /* ------------------------------------------------------------------------------------------------------------ | ||||
@@ -232,7 +241,7 @@ private: | |||||
Plugin* createPlugin() | Plugin* createPlugin() | ||||
{ | { | ||||
getInitializerInstance(); | getInitializerInstance(); | ||||
return new CVCRackPlugin(); | |||||
return new CardinalPlugin(); | |||||
} | } | ||||
// ----------------------------------------------------------------------------------------------------------- | // ----------------------------------------------------------------------------------------------------------- |
@@ -1,17 +1,18 @@ | |||||
/* | /* | ||||
* DISTRHO CVCRack Plugin | |||||
* DISTRHO Cardinal Plugin | |||||
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com> | * 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. | |||||
* 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 3 of | |||||
* the License, or any later version. | |||||
* | * | ||||
* 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. | |||||
* 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 GNU General Public License see the LICENSE file. | |||||
*/ | */ | ||||
#include <app/common.hpp> | #include <app/common.hpp> | ||||
@@ -64,16 +65,25 @@ static const Initializer2& getInitializer2Instance() | |||||
return init; | return init; | ||||
} | } | ||||
class CVCRackUI : public UI | |||||
class CardinalUI : public UI | |||||
{ | { | ||||
ResizeHandle fResizeHandle; | ResizeHandle fResizeHandle; | ||||
public: | public: | ||||
CVCRackUI() | |||||
CardinalUI() | |||||
: UI(1280, 720), | : UI(1280, 720), | ||||
fResizeHandle(this) | fResizeHandle(this) | ||||
{ | { | ||||
using namespace rack; | using namespace rack; | ||||
/* | |||||
The following code was based from VCVRack adapters/standalone.cpp | |||||
Copyright (C) 2016-2021 VCV | |||||
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 3 of the | |||||
License, or (at your option) any later version. | |||||
*/ | |||||
// Initialize context | // Initialize context | ||||
INFO("Initializing context"); | INFO("Initializing context"); | ||||
window::lastUI = this; | window::lastUI = this; | ||||
@@ -92,7 +102,7 @@ public: | |||||
APP->engine->startFallbackThread(); | APP->engine->startFallbackThread(); | ||||
} | } | ||||
~CVCRackUI() override | |||||
~CardinalUI() override | |||||
{ | { | ||||
using namespace rack; | using namespace rack; | ||||
@@ -183,7 +193,7 @@ private: | |||||
/** | /** | ||||
Set our UI class as non-copyable and add a leak detector just in case. | Set our UI class as non-copyable and add a leak detector just in case. | ||||
*/ | */ | ||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackUI) | |||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalUI) | |||||
}; | }; | ||||
/* ------------------------------------------------------------------------------------------------------------ | /* ------------------------------------------------------------------------------------------------------------ | ||||
@@ -192,7 +202,7 @@ private: | |||||
UI* createUI() | UI* createUI() | ||||
{ | { | ||||
getInitializer2Instance(); | getInitializer2Instance(); | ||||
return new CVCRackUI(); | |||||
return new CardinalUI(); | |||||
} | } | ||||
// ----------------------------------------------------------------------------------------------------------- | // ----------------------------------------------------------------------------------------------------------- |
@@ -1,10 +1,10 @@ | |||||
/* | /* | ||||
* DISTRHO CVCRack Plugin | |||||
* DISTRHO Cardinal Plugin | |||||
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com> | * Copyright (C) 2021 Filipe Coelho <falktx@falktx.com> | ||||
* | * | ||||
* This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
* modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
* published by the Free Software Foundation; either version 2 of | |||||
* published by the Free Software Foundation; either version 3 of | |||||
* the License, or any later version. | * the License, or any later version. | ||||
* | * | ||||
* This program is distributed in the hope that it will be useful, | * This program is distributed in the hope that it will be useful, | ||||
@@ -12,15 +12,15 @@ | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
* GNU General Public License for more details. | * GNU General Public License for more details. | ||||
* | * | ||||
* For a full copy of the license see the LICENSE file. | |||||
* For a full copy of the GNU General Public License see the LICENSE file. | |||||
*/ | */ | ||||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | ||||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | #define DISTRHO_PLUGIN_INFO_H_INCLUDED | ||||
#define DISTRHO_PLUGIN_BRAND "DISTRHO" | #define DISTRHO_PLUGIN_BRAND "DISTRHO" | ||||
#define DISTRHO_PLUGIN_NAME "CVCRack" | |||||
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/CVCRack" | |||||
#define DISTRHO_PLUGIN_NAME "Cardinal" | |||||
#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal" | |||||
#define DISTRHO_PLUGIN_HAS_UI 1 | #define DISTRHO_PLUGIN_HAS_UI 1 | ||||
#define DISTRHO_PLUGIN_NUM_INPUTS 2 | #define DISTRHO_PLUGIN_NUM_INPUTS 2 |
@@ -7,16 +7,16 @@ | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Project name, used for binaries | # Project name, used for binaries | ||||
NAME = CVCRack | |||||
NAME = Cardinal | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Files to build (DPF stuff) | # Files to build (DPF stuff) | ||||
FILES_DSP = \ | FILES_DSP = \ | ||||
CVCRackPlugin.cpp | |||||
CardinalPlugin.cpp | |||||
FILES_UI = \ | FILES_UI = \ | ||||
CVCRackUI.cpp \ | |||||
CardinalUI.cpp \ | |||||
Window.cpp | Window.cpp | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- |
@@ -72,15 +72,10 @@ struct Window::Internal { | |||||
std::string lastWindowTitle; | std::string lastWindowTitle; | ||||
int lastWindowX = 0; | |||||
int lastWindowY = 0; | |||||
int lastWindowWidth = 0; | |||||
int lastWindowHeight = 0; | |||||
int frame = 0; | int frame = 0; | ||||
bool ignoreNextMouseDelta = false; | bool ignoreNextMouseDelta = false; | ||||
int frameSwapInterval = -1; | int frameSwapInterval = -1; | ||||
double monitorRefreshRate = 0.0; | |||||
double monitorRefreshRate = 60.0; // FIXME | |||||
double frameTime = 0.0; | double frameTime = 0.0; | ||||
double lastFrameDuration = 0.0; | double lastFrameDuration = 0.0; | ||||
@@ -131,6 +126,7 @@ Window::Window() { | |||||
osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize NanoVG. Does your graphics card support OpenGL 2.0 or greater? If so, make sure you have the latest graphics drivers installed."); | osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize NanoVG. Does your graphics card support OpenGL 2.0 or greater? If so, make sure you have the latest graphics drivers installed."); | ||||
exit(1); | exit(1); | ||||
} | } | ||||
d_stderr2("framebuffer is %p", fbVg); | |||||
// Load default Blendish font | // Load default Blendish font | ||||
uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); | uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); | ||||
@@ -305,7 +301,7 @@ void Window::cursorUnlock() { | |||||
bool Window::isCursorLocked() { | bool Window::isCursorLocked() { | ||||
return false; | |||||
return internal->ignoreNextMouseDelta; | |||||
} | } | ||||