diff --git a/README.md b/README.md index 0f854ed7..402db621 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ + supports VST program chunks (=> patches are saved with the DAW's project file or as .fxp files) + supports VST host timing (audioMasterGetTime / kVstTempoValid / kVstTransportPlaying, see Core.MIDI-1 module) + supports VST parameters (send / recv) -- does not support plugin DLLs due to VCV Rack's architecture which prevents this when it is run as a plugin itself - - future releases may contain additional (open source) add-ons modules ++ supports dynamically loaded plugin DLLs + - the plugin.dll files are _not_ binary compatible with the VCV Rack plugins ! Tested in - Eureka (my own work-in-progress VST host) @@ -23,7 +23,7 @@ Tested in # Downloads The current release can be found in the [vst2_bin/](vst2_bin/) folder. -Here's a snapshot of it: [veeseevstrack_0_6_1_win64_bin-12Jul2018.7z](dist/veeseevstrack_0_6_1_win64_bin-12Jul2018.7z) (64bit) +Here's a snapshot of it: [veeseevstrack_0_6_1_win64_bin-13Jul2018.7z](dist/veeseevstrack_0_6_1_win64_bin-13Jul2018.7z) (64bit) **WARNING: DON'T TRY TO USE THE INSTRUMENT AND EFFECT PLUGINS IN THE SAME PROJECT OR YOUR DAW WILL CRASH.** @@ -41,7 +41,27 @@ Here's a demo video of it: https://vimeo.com/277703414 # Add-on modules -The following (478) add-on modules are statically linked with the VST plugin: +The binary distribution contains the following dynamically loaded add-on modules: + - dBiz.dBizBlank + - dBiz.Multiple + - dBiz.Contorno + - dBiz.Chord + - dBiz.Utility + - dBiz.Transpose + - dBiz.Bene + - dBiz.Bene2 + - dBiz.BenePads + - dBiz.SubMix + - dBiz.Remix + - dBiz.PerfMixer + - dBiz.VCA530 + - dBiz.Verbo + - dBiz.DVCO + - dBiz.DAOSC + - Template_shared.MyModule + + +The following (462) add-on modules are statically linked with the VST plugin: - Alikins.IdleSwitch - Alikins.MomentaryOnButtons - Alikins.BigMuteButton @@ -204,22 +224,6 @@ The following (478) add-on modules are statically linked with the VST plugin: - cf.PATCH - cf.LEDS - cf.DAVE - - dBiz.dBizBlank - - dBiz.Multiple - - dBiz.Contorno - - dBiz.Chord - - dBiz.Utility - - dBiz.Transpose - - dBiz.Bene - - dBiz.Bene2 - - dBiz.BenePads - - dBiz.SubMix - - dBiz.Remix - - dBiz.PerfMixer - - dBiz.VCA530 - - dBiz.Verbo - - dBiz.DVCO - - dBiz.DAOSC - DHE-Modules.BoosterStage - DHE-Modules.Cubic - DHE-Modules.Hostage diff --git a/dep/dep.7z b/dep/dep.7z index 59ddbbb7..b3fae2a2 100644 Binary files a/dep/dep.7z and b/dep/dep.7z differ diff --git a/include/app.hpp b/include/app.hpp index ac472fc2..c2e24d33 100644 --- a/include/app.hpp +++ b/include/app.hpp @@ -5,8 +5,8 @@ #include "ui.hpp" -static const float SVG_DPI = 75.0; -static const float MM_PER_IN = 25.4; +static const float SVG_DPI = 75.0f; +static const float MM_PER_IN = 25.4f; namespace rack { diff --git a/include/componentlibrary.hpp b/include/componentlibrary.hpp index 165edc1b..d75ed362 100644 --- a/include/componentlibrary.hpp +++ b/include/componentlibrary.hpp @@ -29,8 +29,8 @@ static const NVGcolor COLOR_DARK_PANEL = nvgRGB(0x17, 0x17, 0x17); struct RoundKnob : SVGKnob { RoundKnob() { - minAngle = -0.83*M_PI; - maxAngle = 0.83*M_PI; + minAngle = float(-0.83*M_PI); + maxAngle = float(0.83*M_PI); } }; @@ -68,8 +68,8 @@ struct RoundBlackSnapKnob : RoundBlackKnob { struct Davies1900hKnob : SVGKnob { Davies1900hKnob() { - minAngle = -0.83*M_PI; - maxAngle = 0.83*M_PI; + minAngle = float(-0.83*M_PI); + maxAngle = float(0.83*M_PI); } }; @@ -112,8 +112,8 @@ struct Davies1900hLargeRedKnob : Davies1900hKnob { struct Rogan : SVGKnob { Rogan() { - minAngle = -0.83*M_PI; - maxAngle = 0.83*M_PI; + minAngle = float(-0.83*M_PI); + maxAngle = float(0.83*M_PI); } }; @@ -282,8 +282,8 @@ struct Rogan1PWhite : Rogan { struct SynthTechAlco : SVGKnob { SynthTechAlco() { - minAngle = -0.82*M_PI; - maxAngle = 0.82*M_PI; + minAngle = float(-0.82*M_PI); + maxAngle = float(0.82*M_PI); setSVG(SVG::load(assetGlobal("res/ComponentLibrary/SynthTechAlco.svg"))); SVGWidget *cap = new SVGWidget(); cap->setSVG(SVG::load(assetGlobal("res/ComponentLibrary/SynthTechAlco_cap.svg"))); @@ -293,16 +293,16 @@ struct SynthTechAlco : SVGKnob { struct Trimpot : SVGKnob { Trimpot() { - minAngle = -0.75*M_PI; - maxAngle = 0.75*M_PI; + minAngle = float(-0.75*M_PI); + maxAngle = float(0.75*M_PI); setSVG(SVG::load(assetGlobal("res/ComponentLibrary/Trimpot.svg"))); } }; struct BefacoBigKnob : SVGKnob { BefacoBigKnob() { - minAngle = -0.75*M_PI; - maxAngle = 0.75*M_PI; + minAngle = float(-0.75*M_PI); + maxAngle = float(0.75*M_PI); setSVG(SVG::load(assetGlobal("res/ComponentLibrary/BefacoBigKnob.svg"))); } }; @@ -316,8 +316,8 @@ struct BefacoBigSnapKnob : BefacoBigKnob { struct BefacoTinyKnob : SVGKnob { BefacoTinyKnob() { - minAngle = -0.75*M_PI; - maxAngle = 0.75*M_PI; + minAngle = float(-0.75*M_PI); + maxAngle = float(0.75*M_PI); setSVG(SVG::load(assetGlobal("res/ComponentLibrary/BefacoTinyKnob.svg"))); } }; @@ -335,8 +335,8 @@ struct BefacoSlidePot : SVGSlider { struct LEDSlider : SVGSlider { LEDSlider() { - maxHandlePos = mm2px(Vec(0.738, 0.738).plus(Vec(2, 0))); - minHandlePos = mm2px(Vec(0.738, 22.078).plus(Vec(2, 0))); + maxHandlePos = mm2px(Vec(0.738f, 0.738f).plus(Vec(2, 0))); + minHandlePos = mm2px(Vec(0.738f, 22.078f).plus(Vec(2, 0))); setSVGs(SVG::load(assetGlobal("res/ComponentLibrary/LEDSlider.svg")), NULL); } }; @@ -458,7 +458,7 @@ struct RGBLight : ModuleLightWidget { template struct LargeLight : BASE { LargeLight() { - this->box.size = mm2px(Vec(5.179, 5.179)); + this->box.size = mm2px(Vec(5.179f, 5.179f)); } }; @@ -466,7 +466,7 @@ struct LargeLight : BASE { template struct MediumLight : BASE { MediumLight() { - this->box.size = mm2px(Vec(3.176, 3.176)); + this->box.size = mm2px(Vec(3.176f, 3.176f)); } }; @@ -474,7 +474,7 @@ struct MediumLight : BASE { template struct SmallLight : BASE { SmallLight() { - this->box.size = mm2px(Vec(2.176, 2.176)); + this->box.size = mm2px(Vec(2.176f, 2.176f)); } }; @@ -491,7 +491,7 @@ template struct LEDBezelLight : BASE { LEDBezelLight() { this->bgColor = COLOR_BLACK_TRANSPARENT; - this->box.size = mm2px(Vec(6.0, 6.0)); + this->box.size = mm2px(Vec(6.0f, 6.0f)); } }; diff --git a/include/global_ui.hpp b/include/global_ui.hpp index 011fb042..6d1c19be 100644 --- a/include/global_ui.hpp +++ b/include/global_ui.hpp @@ -87,6 +87,11 @@ struct GlobalUI { bool bLoadVSTUniqueParamBaseId; // temp. false while cloning ModuleWidget } app; + struct { + int bnd_icon_image; + int bnd_font; + } blendish; + #ifdef USE_VST2 struct { volatile int b_close_window; @@ -136,6 +141,9 @@ struct GlobalUI { app.bLoadVSTUniqueParamBaseId = true; + blendish.bnd_icon_image = -1; + blendish.bnd_font = -1; + #ifdef USE_VST2 vst2.b_close_window = 0; vst2.b_hide_window = 0; diff --git a/include/plugin.hpp b/include/plugin.hpp index 15fe7cfc..02154988 100644 --- a/include/plugin.hpp +++ b/include/plugin.hpp @@ -1,9 +1,110 @@ #pragma once +#include "global_pre.hpp" #include +#include // debug #include #include "tags.hpp" +#define RACK_PLUGIN_INIT_ID_INTERNAL p->slug = TOSTRING(SLUG); p->version = TOSTRING(VERSION) + +#ifdef USE_VST2 + +namespace rack { + struct Plugin; +} + +typedef void (*vst2_handle_ui_param_fxn_t) (int uniqueParamId, float normValue); +typedef void (*rack_set_tls_globals_fxn_t) (rack::Plugin *p); + +#ifdef RACK_HOST + +// Rack host build: + +extern void vst2_handle_ui_param (int uniqueParamId, float normValue); + +#define RACK_PLUGIN_DECLARE(pluginname) +#define RACK_PLUGIN_INIT(pluginname) extern "C" void init_plugin_##pluginname##(rack::Plugin *p) +#define RACK_PLUGIN_INIT_ID() RACK_PLUGIN_INIT_ID_INTERNAL + +#else + +// Plugin build: + +#ifdef _MSC_VER +#ifdef RACK_PLUGIN_SHARED + #define RACK_PLUGIN_EXPORT extern "C" __declspec(dllexport) +#else + #define RACK_PLUGIN_EXPORT extern "C" +#endif // RACK_PLUGIN_SHARED + #define RACK_TLS __declspec(thread) +#else + #define RACK_PLUGIN_EXPORT extern "C" + #define RACK_TLS __thread +#endif // _MSC_VER + +extern vst2_handle_ui_param_fxn_t vst2_handle_ui_param; + +#ifndef RACK_PLUGIN_SHARED_LIB_BUILD +#ifdef RACK_PLUGIN_SHARED + // Dynamically loaded plugin build + #define RACK_PLUGIN_DECLARE(pluginname) namespace rack { extern RACK_TLS Plugin *plugin; } extern void __rack_unused_symbol(void) +#ifdef ARCH_WIN +#define JSON_SEED_INIT_EXTERNAL extern "C" extern long seed_initialized; +#else +#define JSON_SEED_INIT_EXTERNAL extern "C" extern volatile char seed_initialized; +#endif + #define RACK_PLUGIN_INIT(pluginname) \ +vst2_handle_ui_param_fxn_t vst2_handle_ui_param; \ +JSON_SEED_INIT_EXTERNAL \ +extern "C" extern volatile uint32_t hashtable_seed; \ +namespace rack { \ + RACK_TLS Plugin *plugin; \ + RACK_TLS Global *global; \ + RACK_TLS GlobalUI *global_ui; \ + static void loc_set_tls_globals(rack::Plugin *p) { \ + plugin = p; \ + global = plugin->global; \ + global_ui = plugin->global_ui; \ + hashtable_seed = p->json.hashtable_seed; \ + seed_initialized = p->json.seed_initialized; \ + } \ +} \ +RACK_PLUGIN_EXPORT void init_plugin(rack::Plugin *p) + #define RACK_PLUGIN_INIT_ID() \ + rack::plugin = p; \ + rack::plugin->set_tls_globals_fxn = &rack::loc_set_tls_globals; \ + vst2_handle_ui_param = p->vst2_handle_ui_param_fxn; \ + rack::global = p->global; \ + rack::global_ui = p->global_ui; \ + RACK_PLUGIN_INIT_ID_INTERNAL +#else + // Statically linked plugin build + #define RACK_PLUGIN_DECLARE(pluginname) + #define RACK_PLUGIN_INIT(pluginname) extern "C" void init_plugin_##pluginname##(rack::Plugin *p) + #define RACK_PLUGIN_INIT_ID() RACK_PLUGIN_INIT_ID_INTERNAL +#endif // RACK_PLUGIN_SHARED +#endif // RACK_PLUGIN_SHARED_LIB_BUILD + +#endif // RACK_HOST + + +#else + +#define RACK_PLUGIN_DECLARE(pluginname) extern Plugin *plugin +#define RACK_PLUGIN_INIT(pluginname) extern "C" RACK_PLUGIN_EXPORT void init(rack::Plugin *p) +#define RACK_PLUGIN_INIT_ID() plugin = p; RACK_PLUGIN_INIT_ID_INTERNAL + +#endif // USE_VST2 + +#define RACK_PLUGIN_INIT_WEBSITE(url) p->website = url +#define RACK_PLUGIN_INIT_MANUAL(url) p->manual = url + +#define RACK_PLUGIN_MODEL_DECLARE(pluginname, modelname) extern Model *create_model_##pluginname##_##modelname##(void) +#define RACK_PLUGIN_MODEL_INIT(pluginname, modelname) Model *create_model_##pluginname##_##modelname##(void) +#define RACK_PLUGIN_MODEL_ADD(pluginname, modelname) p->addModel(create_model_##pluginname##_##modelname##()) + + namespace rack { @@ -36,6 +137,34 @@ struct Plugin { std::string website; std::string manual; +#ifdef USE_VST2 + // + // Set by Rack host (before init_plugin()): + // + vst2_handle_ui_param_fxn_t vst2_handle_ui_param_fxn = NULL; + Global *global = NULL; + GlobalUI *global_ui = NULL; + + // Set by Rack host immediately before set_tls_globals_fxn is called: + // (note) must be copied by the plugin or json import won't function properly + struct { + uint32_t hashtable_seed; +#ifdef ARCH_WIN + long seed_initialized; +#else + char seed_initialized; +#endif + } json; + + // + // Set by plugin: + // - in init_plugin() + // - called by Rack host in audio thread + // - NULL if this is a statically linked add-on + // + rack_set_tls_globals_fxn_t set_tls_globals_fxn = NULL; +#endif // USE_VST2 + virtual ~Plugin(); void addModel(Model *model); }; @@ -74,9 +203,13 @@ struct Model { return module; } ModuleWidget *createModuleWidget() override { + printf("xxx createModuleWidget: ENTER\n"); TModule *module = new TModule(); + printf("xxx createModuleWidget: module=%p\n", module); TModuleWidget *moduleWidget = new TModuleWidget(module); + printf("xxx createModuleWidget: moduleWidget=%p\n", moduleWidget); moduleWidget->model = this; + printf("xxx createModuleWidget: LEAVE\n"); return moduleWidget; } ModuleWidget *createModuleWidgetNull() override { @@ -118,43 +251,6 @@ extern std::string gToken; } // namespace rack -//////////////////// -// Implemented by plugin -//////////////////// - -/** Called once to initialize and return the Plugin instance. -You must implement this in your plugin -*/ -#ifdef _MSC_VER -// (note) turns out that VCV plugins don't work when the VCV engine itself is a DLL -// #define RACK_PLUGIN_EXPORT __declspec(dllexport) -#define RACK_PLUGIN_EXPORT -#else -#define RACK_PLUGIN_EXPORT -#endif - -#define RACK_PLUGIN_INIT_ID_INTERNAL p->slug = TOSTRING(SLUG); p->version = TOSTRING(VERSION) - -#ifdef USE_VST2 - -#define RACK_PLUGIN_DECLARE(pluginname) -#define RACK_PLUGIN_INIT(pluginname) extern "C" void init_plugin_##pluginname##(rack::Plugin *p) -#define RACK_PLUGIN_INIT_ID() RACK_PLUGIN_INIT_ID_INTERNAL - -#else - -#define RACK_PLUGIN_DECLARE(pluginname) extern Plugin *plugin -#define RACK_PLUGIN_INIT(pluginname) extern "C" RACK_PLUGIN_EXPORT void init(rack::Plugin *p) -#define RACK_PLUGIN_INIT_ID() plugin = p; RACK_PLUGIN_INIT_ID_INTERNAL - -#endif // USE_VST2 - -#define RACK_PLUGIN_INIT_WEBSITE(url) p->website = url -#define RACK_PLUGIN_INIT_MANUAL(url) p->manual = url - -#define RACK_PLUGIN_MODEL_DECLARE(pluginname, modelname) extern Model *create_model_##pluginname##_##modelname##(void) -#define RACK_PLUGIN_MODEL_INIT(pluginname, modelname) Model *create_model_##pluginname##_##modelname##(void) -#define RACK_PLUGIN_MODEL_ADD(pluginname, modelname) p->addModel(create_model_##pluginname##_##modelname##()) // Access helpers for global UI vars // diff --git a/include/ui.hpp b/include/ui.hpp index b9c15129..c9426794 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -263,12 +263,4 @@ struct Scene : OpaqueWidget { void step() override; }; - -//////////////////// -// globals -//////////////////// - -extern Scene *gScene; - - } // namespace rack diff --git a/include/util/math.hpp b/include/util/math.hpp index 3f14cfb1..d67fdcd3 100644 --- a/include/util/math.hpp +++ b/include/util/math.hpp @@ -132,7 +132,7 @@ inline float crossfade(float a, float b, float frac) { Assumes that the array at `p` is of length at least floor(x)+1. */ inline float interpolateLinear(const float *p, float x) { - int xi = x; + int xi = int(x); float xf = x - xi; return crossfade(p[xi], p[xi+1], xf); } diff --git a/make.objects b/make.objects index 9a35ae32..acb919ef 100644 --- a/make.objects +++ b/make.objects @@ -1,4 +1,4 @@ -LIB_OBJ= \ +COMMON_OBJ= \ dep/jpommier-pffft-29e4f76ac53b/fftpack.o \ dep/jpommier-pffft-29e4f76ac53b/pffft.o \ dep/nanovg/src/nanovg.o \ @@ -38,14 +38,6 @@ LIB_OBJ= \ src/app/WireWidget.o \ src/asset.o \ src/audio.o \ - src/Core/AudioInterface.o \ - src/Core/Blank.o \ - src/Core/Core.o \ - src/Core/MIDICCToCVInterface.o \ - src/Core/MIDIToCVInterface.o \ - src/Core/MIDITriggerToCVInterface.o \ - src/Core/Notes.o \ - src/Core/QuadMIDIToCVInterface.o \ src/dsp/minblep.o \ src/engine.o \ src/keyboard.o \ @@ -91,6 +83,26 @@ LIB_OBJ= \ src/window.o \ src/vstmidi.o +HOST_OBJ= \ + src/Core/AudioInterface.o \ + src/Core/Blank.o \ + src/Core/Core.o \ + src/Core/MIDICCToCVInterface.o \ + src/Core/MIDIToCVInterface.o \ + src/Core/MIDITriggerToCVInterface.o \ + src/Core/Notes.o \ + src/Core/QuadMIDIToCVInterface.o + +LIB_OBJ= \ + $(COMMON_OBJ) \ + $(HOST_OBJ) + +LIB_OBJ_WIN= \ + src/util/dirent_win32/dirent.o + +SHARED_LIB_OBJ= \ + $(COMMON_OBJ) + MAIN_OBJ= \ src/vst2_main.o \ src/main.o diff --git a/makefile.msvc b/makefile.msvc index 64136ac2..0d22d26b 100644 --- a/makefile.msvc +++ b/makefile.msvc @@ -12,6 +12,10 @@ bin: vst lib: make -f makefile_lib.msvc bin -j $(NUM_JOBS) +.PHONY: +shared_lib: + make -f makefile_shared_lib.msvc bin -j $(NUM_JOBS) && mv Rack_shared.lib plugins/ + .PHONY: vst: lib rm -f src/vst2_main.o @@ -26,6 +30,7 @@ vst: lib clean: make -f makefile_lib.msvc clean + make -f makefile_shared_lib.msvc clean make -f makefile_vst_instr.msvc clean make -f makefile_vst_effect.msvc clean diff --git a/makefile_lib.msvc b/makefile_lib.msvc index a79407ab..a54fc956 100644 --- a/makefile_lib.msvc +++ b/makefile_lib.msvc @@ -22,6 +22,6 @@ PLAF_OBJ= include make.objects -ALL_OBJ=$(LIB_OBJ) +ALL_OBJ=$(LIB_OBJ) $(LIB_OBJ_WIN) include dep/yac/staticlib_msvc.mk diff --git a/makefile_shared_lib.msvc b/makefile_shared_lib.msvc new file mode 100644 index 00000000..c2377719 --- /dev/null +++ b/makefile_shared_lib.msvc @@ -0,0 +1,28 @@ +# +# Makefile for VCV rack lib + Microsoft Visual C++ 2003 / 2005 / 2008 / 2017 ToolKit +# (for linking with dynamically loaded plugins) +# +# + +include dep/yac/install_msvc.mk + +TARGET_BASENAME=Rack_shared + +EXTRAFLAGS= -DVERSION=0.6.1 -DARCH_WIN -D_USE_MATH_DEFINES -DRACK_PLUGIN -DRACK_PLUGIN_SHARED -DUSE_VST2 -DVST2_REPARENT_WINDOW_HACK -Iinclude/ -Idep/include +EXTRAFLAGS+= -DRACK_PLUGIN_SHARED_LIB_BUILD + +ifeq ($(BUILD_64),y) +EXTRALIBS= -LIBPATH:dep/lib/msvc/x64 +else +EXTRALIBS= -LIBPATH:dep/lib/msvc/x86 +endif + +EXTRALIBS+= jansson.lib glew.lib glfw.lib gdi32.lib opengl32.lib gdi32.lib user32.lib kernel32.lib Comdlg32.lib Shell32.lib ws2_32.lib winmm.lib + +PLAF_OBJ= + +include make.objects + +ALL_OBJ=$(SHARED_LIB_OBJ) $(LIB_OBJ_WIN) + +include dep/yac/staticlib_msvc.mk diff --git a/plugins/build_shared_plugin_post.mk b/plugins/build_shared_plugin_post.mk new file mode 100644 index 00000000..134ffc63 --- /dev/null +++ b/plugins/build_shared_plugin_post.mk @@ -0,0 +1,4 @@ + +#ifdef ARCH_WIN +include ../../../../dep/yac/sharedlib_msvc.mk +#endif diff --git a/plugins/build_shared_plugin_pre.mk b/plugins/build_shared_plugin_pre.mk new file mode 100644 index 00000000..210b7b58 --- /dev/null +++ b/plugins/build_shared_plugin_pre.mk @@ -0,0 +1,19 @@ +# called from plugin directory (plugins/community/repos//) +# +#include ../../../../arch.mk +#ifdef ARCH_WIN +include ../../../../dep/yac/install_msvc.mk +#endif + +TARGET_BASENAME=$(SLUG) + +EXTRAFLAGS+= -DVERSION=0.6.1 -D_USE_MATH_DEFINES -DUSE_VST2 -DRACK_PLUGIN -DRACK_PLUGIN_SHARED -DSLUG=$(SLUG) -I../../../../include/ -I../../../../dep/include -Idep/include +EXTRAFLAGS+= + +EXTRALIBS+= ../../../Rack_shared.lib + +PLAF_OBJ+= + +#ifdef ARCH_WIN +include ../../../build_plugin_msvc_pre.mk +#endif diff --git a/plugins/community/repos/Template_shared/LICENSE.txt b/plugins/community/repos/Template_shared/LICENSE.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/plugins/community/repos/Template_shared/LICENSE.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/plugins/community/repos/Template_shared/README.md b/plugins/community/repos/Template_shared/README.md new file mode 100644 index 00000000..8f1cd9c1 --- /dev/null +++ b/plugins/community/repos/Template_shared/README.md @@ -0,0 +1,13 @@ + +# VCV Template plugin + +The VCV Template plugin is a starting point for developing your own plugins for VCV Rack. +It implements a simple sine VCO, demonstrating inputs, outputs, parameters, and other concepts. + +See https://vcvrack.com/manual/PluginDevelopmentTutorial.html for a development tutorial. + +## Contributing + +I welcome Issues and Pull Requests to this repository if you have suggestions for improvement. + +This template is released into the public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)). \ No newline at end of file diff --git a/plugins/community/repos/Template_shared/make.objects b/plugins/community/repos/Template_shared/make.objects new file mode 100644 index 00000000..17df9230 --- /dev/null +++ b/plugins/community/repos/Template_shared/make.objects @@ -0,0 +1,3 @@ +ALL_OBJ= \ + src/MyModule.o \ + src/Template.o diff --git a/plugins/community/repos/Template_shared/makefile.msvc b/plugins/community/repos/Template_shared/makefile.msvc new file mode 100644 index 00000000..58b3fd3a --- /dev/null +++ b/plugins/community/repos/Template_shared/makefile.msvc @@ -0,0 +1,7 @@ +SLUG=Template_shared + +include ../../../build_shared_plugin_pre.mk + +include make.objects + +include ../../../build_shared_plugin_post.mk diff --git a/plugins/community/repos/Template_shared/res/MyModule.svg b/plugins/community/repos/Template_shared/res/MyModule.svg new file mode 100644 index 00000000..606be166 --- /dev/null +++ b/plugins/community/repos/Template_shared/res/MyModule.svg @@ -0,0 +1,243 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Template_shared/src/MyModule.cpp b/plugins/community/repos/Template_shared/src/MyModule.cpp new file mode 100644 index 00000000..fcf0b4f0 --- /dev/null +++ b/plugins/community/repos/Template_shared/src/MyModule.cpp @@ -0,0 +1,105 @@ +#include "Template.hpp" + +struct MyModule : Module { + enum ParamIds { + PITCH_PARAM, + NUM_PARAMS + }; + enum InputIds { + PITCH_INPUT, + NUM_INPUTS + }; + enum OutputIds { + SINE_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + BLINK_LIGHT, + NUM_LIGHTS + }; + + float phase = 0.0f; + float blinkPhase = 0.0f; + + MyModule() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} + void step() override; + + // For more advanced Module features, read Rack's engine.hpp header file + // - toJson, fromJson: serialization of internal data + // - onSampleRateChange: event triggered by a change of sample rate + // - onReset, onRandomize, onCreate, onDelete: implements special behavior when user clicks these from the context menu +}; + + +void MyModule::step() { + // Implement a simple sine oscillator + float deltaTime = engineGetSampleTime(); + + // Compute the frequency from the pitch parameter and input + float pitch = params[PITCH_PARAM].value; + pitch += inputs[PITCH_INPUT].value; + pitch = clamp(pitch, -4.0f, 4.0f); + // The default pitch is C4 + float freq = 261.626f * powf(2.0f, pitch); + + // Accumulate the phase + phase += freq * deltaTime; + if (phase >= 1.0f) + phase -= 1.0f; + + // Compute the sine output + float sine = sinf(float(2.0f * M_PI) * phase); + outputs[SINE_OUTPUT].value = 5.0f * sine; + + // Blink light at 1Hz + blinkPhase += deltaTime; + if (blinkPhase >= 1.0f) + blinkPhase -= 1.0f; + lights[BLINK_LIGHT].value = (blinkPhase < 0.5f) ? 1.0f : 0.0f; +} + + +struct MyModuleWidget : ModuleWidget { + MyModuleWidget(MyModule *module) : ModuleWidget(module) { + printf("xxx template_shared: global=%p\n", rack::global); + printf("xxx template_shared: global_ui=%p x\n", rack::global_ui); + printf("xxx template_shared: plugin=%p\n", plugin); + + std::shared_ptr svg = SVG::load(assetPlugin(plugin, "res/MyModule.svg")); + printf("xxx template_shared: SVG::load() OK\n"); + + setPanel(svg); + + printf("xxx template_shared: setPanel() OK\n"); + + addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); + printf("xxx template_shared: 1 addChild() OK\n"); + addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + printf("xxx template_shared: 2 addChild() OK\n"); + addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + printf("xxx template_shared: 3 addChild() OK\n"); + addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + printf("xxx template_shared: 4 addChild() OK\n"); + + addParam(ParamWidget::create(Vec(28, 87), module, MyModule::PITCH_PARAM, -3.0, 3.0, 0.0)); + printf("xxx template_shared: addParam() OK\n"); + + addInput(Port::create(Vec(33, 186), Port::INPUT, module, MyModule::PITCH_INPUT)); + printf("xxx template_shared: addInput() OK\n"); + + addOutput(Port::create(Vec(33, 275), Port::OUTPUT, module, MyModule::SINE_OUTPUT)); + printf("xxx template_shared: addOutput() OK\n"); + + addChild(ModuleLightWidget::create>(Vec(41, 59), module, MyModule::BLINK_LIGHT)); + printf("xxx template_shared: addChild() OK\n"); + } +}; + +// Specify the Module and ModuleWidget subclass, human-readable +// author name for categorization per plugin, module slug (should never +// change), human-readable module name, and any number of tags +// (found in `include/tags.hpp`) separated by commas. +RACK_PLUGIN_MODEL_INIT(Template_shared, MyModule) { + Model *modelMyModule = Model::create("Template_shared", "MyModule", "My Module", OSCILLATOR_TAG); + return modelMyModule; +} diff --git a/plugins/community/repos/Template_shared/src/Template.cpp b/plugins/community/repos/Template_shared/src/Template.cpp new file mode 100644 index 00000000..d1eb9933 --- /dev/null +++ b/plugins/community/repos/Template_shared/src/Template.cpp @@ -0,0 +1,22 @@ +#include +#include "Template.hpp" +// extern "C" extern int glfwInit(void); + +RACK_PLUGIN_MODEL_DECLARE(Template_shared, MyModule); + +RACK_PLUGIN_INIT(Template_shared) { + RACK_PLUGIN_INIT_ID(); + + RACK_PLUGIN_INIT_WEBSITE("https://"); + RACK_PLUGIN_INIT_MANUAL("https://"); + + // Add all Models defined throughout the plugin + RACK_PLUGIN_MODEL_ADD(Template_shared, MyModule); + + // Any other plugin initialization may go here. + // As an alternative, consider lazy-loading assets and lookup tables when your module is created to reduce startup times of Rack. + printf("hello from Template_shared plugin!\n"); + + // glfwInit(); + +} diff --git a/plugins/community/repos/Template_shared/src/Template.hpp b/plugins/community/repos/Template_shared/src/Template.hpp new file mode 100644 index 00000000..549ec3bf --- /dev/null +++ b/plugins/community/repos/Template_shared/src/Template.hpp @@ -0,0 +1,5 @@ +#include "rack.hpp" + +using namespace rack; + +RACK_PLUGIN_DECLARE(Template_shared); diff --git a/plugins/community/repos/dBiz/makefile.msvc b/plugins/community/repos/dBiz/makefile.msvc index df944e62..746ae96f 100644 --- a/plugins/community/repos/dBiz/makefile.msvc +++ b/plugins/community/repos/dBiz/makefile.msvc @@ -1,7 +1,7 @@ SLUG=dBiz -include ../../../build_plugin_pre.mk +include ../../../build_shared_plugin_pre.mk include make.objects -include ../../../build_plugin_post.mk +include ../../../build_shared_plugin_post.mk diff --git a/plugins/community/repos/dBiz/src/dBiz.hpp b/plugins/community/repos/dBiz/src/dBiz.hpp index 7d0b7b4d..02da56df 100644 --- a/plugins/community/repos/dBiz/src/dBiz.hpp +++ b/plugins/community/repos/dBiz/src/dBiz.hpp @@ -4,9 +4,9 @@ using namespace rack; RACK_PLUGIN_DECLARE(dBiz); -#ifdef USE_VST2 -#define plugin "dBiz" -#endif // USE_VST2 +// // #ifdef USE_VST2 +// // #define plugin "dBiz" +// // #endif // USE_VST2 namespace rack_plugin_dBiz { diff --git a/src/Core/Core.cpp b/src/Core/Core.cpp index 7cc6112e..c9603214 100644 --- a/src/Core/Core.cpp +++ b/src/Core/Core.cpp @@ -2,6 +2,8 @@ #include "Core.hpp" #include "global.hpp" +#ifdef RACK_HOST + RACK_PLUGIN_MODEL_DECLARE(Core, AudioInterface); RACK_PLUGIN_MODEL_DECLARE(Core, MIDIToCVInterface); RACK_PLUGIN_MODEL_DECLARE(Core, QuadMIDIToCVInterface); @@ -23,3 +25,5 @@ RACK_PLUGIN_INIT(Core) { RACK_PLUGIN_MODEL_ADD(Core, Blank); RACK_PLUGIN_MODEL_ADD(Core, Notes); } + +#endif // RACK_HOST diff --git a/src/Core/Core.hpp b/src/Core/Core.hpp index 973c3436..bf998888 100644 --- a/src/Core/Core.hpp +++ b/src/Core/Core.hpp @@ -1,6 +1,6 @@ #include "rack.hpp" - +#ifndef RACK_PLUGIN_SHARED using namespace rack; RACK_PLUGIN_INIT(Core); @@ -53,3 +53,4 @@ struct Grid16MidiWidget : MidiWidget { } virtual GridChoice *createGridChoice() {return NULL;} }; +#endif // RACK_PLUGIN_SHARED diff --git a/src/app/ModuleBrowser.cpp b/src/app/ModuleBrowser.cpp index 896239e4..8fc03918 100644 --- a/src/app/ModuleBrowser.cpp +++ b/src/app/ModuleBrowser.cpp @@ -133,13 +133,23 @@ struct ModelItem : BrowserListItem { } void onAction(EventAction &e) override { + printf("xxx vcvrack::ModuleBrowser: model=%p, calling createModuleWidget()\n", model); +#ifdef USE_VST2 + if(NULL != model->plugin->set_tls_globals_fxn) { + model->plugin->set_tls_globals_fxn(model->plugin); + } +#endif // USE_VST2 ModuleWidget *moduleWidget = model->createModuleWidget(); + printf("xxx vcvrack::ModuleBrowser: moduleWidget=%p\n", moduleWidget); if (!moduleWidget) return; global_ui->app.gRackWidget->addModule(moduleWidget); + printf("xxx vcvrack::ModuleBrowser: addModule() OK\n"); // Move module nearest to the mouse position moduleWidget->box.pos = global_ui->app.gRackWidget->lastMousePos.minus(moduleWidget->box.size.div(2)); + printf("xxx vcvrack::ModuleBrowser: box.pos OK\n"); global_ui->app.gRackWidget->requestModuleBoxNearest(moduleWidget, moduleWidget->box); + printf("xxx vcvrack::ModuleBrowser: requestModuleBoxNearest() OK\n"); } }; diff --git a/src/app/ModuleWidget.cpp b/src/app/ModuleWidget.cpp index 8e2ae2a2..26564ee4 100644 --- a/src/app/ModuleWidget.cpp +++ b/src/app/ModuleWidget.cpp @@ -7,14 +7,27 @@ #include "global_ui.hpp" +#ifdef USE_VST2 +extern "C" void glfw_hack_makeContextCurrent(GLFWwindow *handle); +// #include +#endif // USE_VST2 + + namespace rack { ModuleWidget::ModuleWidget(Module *module) { + printf("xxx ModuleWidget::ModuleWidget(module=%p) global=%p\n", module, global); + // printf("xxx ModuleWidget::ModuleWidget: GetCurrentThreadId=%d\n", GetCurrentThreadId()); if (module) { engineAddModule(module); + printf("xxx ModuleWidget::ModuleWidget: engineAddModule OK\n"); } this->module = module; + // printf("xxx ModuleWidget::ModuleWidget(): bind GL context global_ui->window.gWindow=%p\n", global_ui->window.gWindow); + // glfwMakeContextCurrent(global_ui->window.gWindow); + // // glfw_hack_makeContextCurrent(global_ui->window.gWindow); + printf("xxx ModuleWidget::ModuleWidget(): RETURN\n"); } ModuleWidget::~ModuleWidget() { @@ -54,17 +67,27 @@ void ModuleWidget::addParam(ParamWidget *param) { void ModuleWidget::setPanel(std::shared_ptr svg) { // Remove old panel +#ifdef RACK_PLUGIN_SHARED + printf("xxx ModuleWidget::setPanel: 1\n"); +#else + printf("xxx ModuleWidget::setPanel: 1\n"); +#endif if (panel) { removeChild(panel); delete panel; panel = NULL; } + // printf("xxx ModuleWidget::setPanel: 2\n"); panel = new SVGPanel(); + // printf("xxx ModuleWidget::setPanel: 3\n"); panel->setBackground(svg); + // printf("xxx ModuleWidget::setPanel: 4\n"); addChild(panel); + // printf("xxx ModuleWidget::setPanel: 5\n"); box.size = panel->box.size; + // printf("xxx ModuleWidget::setPanel: 6\n"); } @@ -132,6 +155,7 @@ void ModuleWidget::fromJson(json_t *rootJ) { double x, y; json_unpack(posJ, "[F, F]", &x, &y); Vec pos = Vec(x, y); + printf("xxx ModuleWidget::fromJson: pos=(%f, %f) posJ=%p rootJ=%p\n", x, y, posJ, rootJ); if (legacy && legacy <= 1) { box.pos = pos; } @@ -218,23 +242,31 @@ ParamWidget *ModuleWidget::findParamWidgetByParamId(int _paramId) { } void ModuleWidget::draw(NVGcontext *vg) { + // printf("xxx ModuleWidget::draw: ENTER this=%p global=%p global_ui=%p\n", this, global, global_ui); nvgScissor(vg, 0, 0, box.size.x, box.size.y); + // printf("xxx ModuleWidget::draw: 2\n"); Widget::draw(vg); + // printf("xxx ModuleWidget::draw: 3\n"); // CPU meter if (module && global->gPowerMeter) { + // printf("xxx ModuleWidget::draw: 4b\n"); nvgBeginPath(vg); + // printf("xxx ModuleWidget::draw: 5b\n"); nvgRect(vg, 0, box.size.y - 20, 55, 20); nvgFillColor(vg, nvgRGBAf(0, 0, 0, 0.5)); nvgFill(vg); + // printf("xxx ModuleWidget::draw: 6b module=%p\n", module); std::string cpuText = stringf("%.0f mS", module->cpuTime * 1000.f); + // printf("xxx ModuleWidget::draw: 7b\n"); nvgFontFaceId(vg, global_ui->window.gGuiFont->handle); nvgFontSize(vg, 12); nvgFillColor(vg, nvgRGBf(1, 1, 1)); nvgText(vg, 10.0, box.size.y - 6.0, cpuText.c_str(), NULL); + // printf("xxx ModuleWidget::draw: 8b\n"); float p = clamp(module->cpuTime, 0.f, 1.f); nvgBeginPath(vg); @@ -245,7 +277,10 @@ void ModuleWidget::draw(NVGcontext *vg) { nvgFill(vg); } + // printf("xxx ModuleWidget::draw: 4\n"); + nvgResetScissor(vg); + // printf("xxx ModuleWidget::draw: LEAVE\n"); } void ModuleWidget::drawShadow(NVGcontext *vg) { @@ -379,9 +414,12 @@ struct DeleteMenuItem : MenuItem { }; Menu *ModuleWidget::createContextMenu() { + printf("xxx ModuleWidget::createContextMenu: ENTER\n"); Menu *menu = global_ui->ui.gScene->createMenu(); MenuLabel *menuLabel = new MenuLabel(); + printf("xxx ModuleWidget::createContextMenu: model->author=\"%s\"\n", model->author.c_str()); + printf("xxx ModuleWidget::createContextMenu: model->name=\"%s\"\n", model->name.c_str()); menuLabel->text = model->author + " " + model->name + " " + model->plugin->version; menu->addChild(menuLabel); diff --git a/src/app/Panel.cpp b/src/app/Panel.cpp index 92d5a33a..1b372dfa 100644 --- a/src/app/Panel.cpp +++ b/src/app/Panel.cpp @@ -5,6 +5,7 @@ namespace rack { void Panel::draw(NVGcontext *vg) { + // printf("xxx Panel::draw: ENTER\n"); nvgBeginPath(vg); nvgRect(vg, 0.0, 0.0, box.size.x, box.size.y); @@ -31,7 +32,9 @@ void Panel::draw(NVGcontext *vg) { nvgStrokeWidth(vg, 1.0); nvgStroke(vg); + // printf("xxx Panel::draw: call Widget::draw\n"); Widget::draw(vg); + // printf("xxx Panel::draw: LEAVE\n"); } } // namespace rack diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 688970e4..91fb03bb 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -12,6 +12,10 @@ #include "global_ui.hpp" +#ifdef USE_VST2 +extern void vst2_set_shared_plugin_tls_globals(void); +#endif // USE_VST2 + namespace rack { @@ -300,6 +304,8 @@ json_t *RackWidget::toJson() { void RackWidget::fromJson(json_t *rootJ) { std::string message; + vst2_set_shared_plugin_tls_globals(); // update JSON hashtable seed + // version std::string version; json_t *versionJ = json_object_get(rootJ, "version"); @@ -343,6 +349,11 @@ void RackWidget::fromJson(json_t *rootJ) { } // Create ModuleWidget +// // #ifdef USE_VST2 +// // if(NULL != model->plugin->set_tls_globals_fxn) { +// // model->plugin->set_tls_globals_fxn(model->plugin); +// // } +// // #endif // USE_VST2 ModuleWidget *moduleWidget = model->createModuleWidget(); assert(moduleWidget); moduleWidget->fromJson(moduleJ); diff --git a/src/asset.cpp b/src/asset.cpp index 719ab958..96e483ac 100644 --- a/src/asset.cpp +++ b/src/asset.cpp @@ -97,6 +97,8 @@ std::string assetLocal(std::string filename) { std::string assetPlugin(Plugin *plugin, std::string filename) { + printf("xxx assetPlugin(plugin=%p)\n"); + printf("xxx assetPlugin: filename=\"%s\"\n", filename.c_str()); assert(plugin); return plugin->path + "/" + filename; } diff --git a/src/engine.cpp b/src/engine.cpp index 8e09b17f..9e6e5ef1 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -18,10 +18,6 @@ #include "global_ui.hpp" -#ifdef USE_VST2 -extern void vst2_handle_ui_param (int uniqueParamId, float normValue); -#endif // USE_VST2 - namespace rack { diff --git a/src/plugin.cpp b/src/plugin.cpp index 32565d8a..8998ec93 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -17,7 +17,9 @@ #include // for MAXPATHLEN #include #include -#endif +#else +#include "util/dirent_win32/dirent.h" +#endif // YAC_POSIX #include #include @@ -46,7 +48,9 @@ namespace rack { typedef void (*InitCallback)(Plugin *); #ifdef USE_VST2 +#ifndef RACK_PLUGIN static void vst2_load_static_rack_plugins(void); +#endif // RACK_PLUGIN #endif // USE_VST2 @@ -67,6 +71,7 @@ void Plugin::addModel(Model *model) { //////////////////// static bool loadPlugin(std::string path) { +#ifdef RACK_HOST std::string libraryFilename; #if ARCH_LIN libraryFilename = path + "/" + "plugin.so"; @@ -108,10 +113,15 @@ static bool loadPlugin(std::string path) { // Call plugin's init() function InitCallback initCallback; +#ifdef USE_VST2 +#define init_symbol_name "init_plugin" +#else +#define init_symbol_name "init" +#endif // USE_VST2 #if ARCH_WIN - initCallback = (InitCallback) GetProcAddress(handle, "init"); + initCallback = (InitCallback) GetProcAddress(handle, init_symbol_name); #else - initCallback = (InitCallback) dlsym(handle, "init"); + initCallback = (InitCallback) dlsym(handle, init_symbol_name); #endif if (!initCallback) { warn("Failed to read init() symbol in %s", libraryFilename.c_str()); @@ -122,6 +132,13 @@ static bool loadPlugin(std::string path) { Plugin *plugin = new Plugin(); plugin->path = path; plugin->handle = handle; +#ifdef USE_VST2 +#ifdef RACK_HOST + plugin->vst2_handle_ui_param_fxn = &vst2_handle_ui_param; + plugin->global = global; + plugin->global_ui = global_ui; +#endif // RACK_HOST +#endif // USE_VST2 initCallback(plugin); // Reject plugin if slug already exists @@ -137,6 +154,10 @@ static bool loadPlugin(std::string path) { global->plugin.gPlugins.push_back(plugin); info("Loaded plugin %s %s from %s", plugin->slug.c_str(), plugin->version.c_str(), libraryFilename.c_str()); +#else + (void)path; +#endif // RACK_HOST + return true; } @@ -231,18 +252,25 @@ static bool syncPlugin(std::string slug, json_t *manifestJ, bool dryRun) { } static void loadPlugins(std::string path) { +#ifdef RACK_HOST std::string message; for (std::string pluginPath : systemListEntries(path)) { if (!systemIsDirectory(pluginPath)) continue; if (!loadPlugin(pluginPath)) { +#ifndef USE_VST2 + // (note) skip message (some plugins are linked statically in VST2 build) message += stringf("Could not load plugin %s\n", pluginPath.c_str()); +#endif // USE_VST2 } } if (!message.empty()) { message += "See log for details."; osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); } +#else + (void)path; +#endif // RACK_HOST } #ifndef USE_VST2 @@ -349,6 +377,7 @@ static void extractPackages(std::string path) { void pluginInit(bool devMode) { tagsInit(); +#ifdef RACK_HOST // Load core // This function is defined in core.cpp @@ -356,11 +385,14 @@ void pluginInit(bool devMode) { init_plugin_Core(corePlugin); global->plugin.gPlugins.push_back(corePlugin); -#ifndef USE_VST2 + // Init statically linked plugins + vst2_load_static_rack_plugins(); + // Get local plugins directory std::string localPlugins = assetLocal("plugins"); mkdir(localPlugins.c_str(), 0755); +#ifndef USE_VST2 if (!devMode) { // Copy Fundamental package to plugins directory if folder does not exist std::string fundamentalSrc = assetGlobal("Fundamental.zip"); @@ -370,16 +402,17 @@ void pluginInit(bool devMode) { systemCopy(fundamentalSrc, fundamentalDest); } } +#endif // USE_VST2 // Extract packages and load plugins #ifndef USE_VST2 extractPackages(localPlugins); #endif // USE_VST2 + + // Load/init dynamically loaded plugins loadPlugins(localPlugins); -#else - vst2_load_static_rack_plugins(); -#endif // USE_VST2 +#endif // RACK_HOST } void pluginDestroy() { @@ -567,6 +600,7 @@ Model *pluginGetModel(std::string pluginSlug, std::string modelSlug) { #ifdef USE_VST2 +#ifndef RACK_PLUGIN extern "C" { extern void init_plugin_Alikins (rack::Plugin *p); extern void init_plugin_AS (rack::Plugin *p); @@ -577,7 +611,7 @@ extern void init_plugin_Bidoo (rack::Plugin *p); extern void init_plugin_Bogaudio (rack::Plugin *p); // extern void init_plugin_BOKONTEPByteBeatMachine (rack::Plugin *p); // unstable extern void init_plugin_cf (rack::Plugin *p); -extern void init_plugin_dBiz (rack::Plugin *p); +//extern void init_plugin_dBiz (rack::Plugin *p); // now a DLL (13Jul2018) extern void init_plugin_DHE_Modules (rack::Plugin *p); extern void init_plugin_DrumKit (rack::Plugin *p); extern void init_plugin_ErraticInstruments (rack::Plugin *p); @@ -649,7 +683,7 @@ void vst2_load_static_rack_plugins(void) { vst2_load_static_rack_plugin("Bogaudio", &init_plugin_Bogaudio); // vst2_load_static_rack_plugin("BOKONTEPByteBeatMachine", &init_plugin_BOKONTEPByteBeatMachine); vst2_load_static_rack_plugin("cf", &init_plugin_cf); - vst2_load_static_rack_plugin("dBiz", &init_plugin_dBiz); + // vst2_load_static_rack_plugin("dBiz", &init_plugin_dBiz); // now a DLL (13Jul2018) vst2_load_static_rack_plugin("DHE-Modules", &init_plugin_DHE_Modules); vst2_load_static_rack_plugin("DrumKit", &init_plugin_DrumKit); vst2_load_static_rack_plugin("ErraticInstruments", &init_plugin_ErraticInstruments); @@ -684,12 +718,34 @@ void vst2_load_static_rack_plugins(void) { vst2_load_static_rack_plugin("Valley", &init_plugin_Valley); // vst2_load_static_rack_plugin("VultModules", &init_plugin_VultModules); } +#endif // RACK_PLUGIN #endif // USE_VST2 } // namespace rack using namespace rack; +#ifdef USE_VST2 +#ifdef ARCH_WIN +extern "C" extern long seed_initialized; +#else +extern "C" extern volatile char seed_initialized; +#endif // ARCH_WIN +extern "C" extern volatile uint32_t hashtable_seed; +void vst2_set_shared_plugin_tls_globals(void) { + // Called in audio thread (see vst2_main.cpp:VSTPluginProcessReplacingFloat32()) + for(Plugin *p : global->plugin.gPlugins) { + if(NULL != p->set_tls_globals_fxn) { + // printf("xxx vcvrack: calling p->set_tls_globals_fxn() global=%p\n", p->global); + p->json.hashtable_seed = hashtable_seed; + p->json.seed_initialized = seed_initialized; + p->set_tls_globals_fxn(p); + // printf("xxx vcvrack: calling p->set_tls_globals_fxn() OK\n"); + } + } +} +#endif // USE_VST2 + RackScene *rack_plugin_ui_get_rackscene(void) { #ifdef USE_VST2 return rack::global_ui->app.gRackScene; diff --git a/src/ui/Menu.cpp b/src/ui/Menu.cpp index 580f3afc..935c1fe6 100644 --- a/src/ui/Menu.cpp +++ b/src/ui/Menu.cpp @@ -45,6 +45,7 @@ void Menu::step() { } void Menu::draw(NVGcontext *vg) { + // printf("xxx Menu::draw: box.size=(%f; %f)\n", box.size.x, box.size.y); bndMenuBackground(vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE); Widget::draw(vg); } diff --git a/src/ui/MenuLabel.cpp b/src/ui/MenuLabel.cpp index 59c55002..3d499fd8 100644 --- a/src/ui/MenuLabel.cpp +++ b/src/ui/MenuLabel.cpp @@ -8,14 +8,17 @@ namespace rack { void MenuLabel::draw(NVGcontext *vg) { - bndMenuLabel(vg, 0.0, 0.0, box.size.x, box.size.y, -1, text.c_str()); + // printf("xxx drawMenuLabel: text=\"%s\" box.size=(%f; %f)\n", text.c_str(), box.size.x, box.size.y); + bndMenuLabel(vg, 0.0, 0.0, box.size.x, box.size.y, -1, text.c_str()); } void MenuLabel::step() { // Add 10 more pixels because Retina measurements are sometimes too small const float rightPadding = 10.0; // HACK use gVg from the window. + // printf("xxx MenuLabel::step: x bndLabelWidth text=\"%s\"\n", text.c_str()); box.size.x = bndLabelWidth(global_ui->window.gVg, -1, text.c_str()) + rightPadding; + // printf("xxx MenuLabel::step: => bndLabelWidth = %f\n", box.size.x); Widget::step(); } diff --git a/src/ui/Scene.cpp b/src/ui/Scene.cpp index 12653ccf..40bfe409 100644 --- a/src/ui/Scene.cpp +++ b/src/ui/Scene.cpp @@ -24,6 +24,7 @@ Menu *Scene::createMenu() { MenuOverlay *overlay = new MenuOverlay(); Menu *menu = new Menu(); menu->box.pos = global_ui->window.gMousePos; + printf("xxx Scene::createMenu: box.size=(%f; %f)\n", box.size.x, box.size.y); overlay->addChild(menu); global_ui->ui.gScene->setOverlay(overlay); diff --git a/src/util/dirent_win32/POSIX Directory Browsing API for Win32.html b/src/util/dirent_win32/POSIX Directory Browsing API for Win32.html new file mode 100644 index 00000000..e1b8e98e --- /dev/null +++ b/src/util/dirent_win32/POSIX Directory Browsing API for Win32.html @@ -0,0 +1,143 @@ + + + +POSIX Directory Browsing API for Win32 + + + + + + +

POSIX Directory Browsing API for Windows

+The functions and types specified in POSIX for iterating over directory +entries have been defined here as wrappers for porting to and common use on +Windows platforms. The values of errno set in the event of errors +are the most significant difference between the POSIX definition and the +wrapper API. +

+In addition to this documentation file, the software is provided in the +dirent.h header file and the +dirent.c C source file. To use the API +ensure that the path to the dirent.h header is either somewhere +standard or is provided to the compiler as an additional option. Ensure also +that the dirent.c file is compiled and the object file is either +referenced explicitly in the link or included in a referenced library. The +source code also compiles cleanly as C++, but it retains C linkage. +

+ +


+

<dirent.h>

+ +
    +
    typedef ... DIR;
    +
    +struct dirent
    +{
    +    char *d_name;
    +};
    +
    +DIR           *opendir(const char *name);
    +int            closedir(DIR *dir);
    +struct dirent *readdir(DIR *dir);
    +void           rewinddir(DIR *dir);
    +
    +
+
+ +
+

DIR *opendir(const char *name);

+

Description

+
    + The opendir function opens the directory specified by + name, which may use either / or \ as a + directory separator but should not contain any wildcards. On success + it associates a DIR stream with the open directory. A non-null + DIR stream may be used in subsequent calls to + readdir, rewinddir and + closedir. +

    + A successful result will position the DIR stream at the first + directory entry, ready for reading. Note that a truly empty directory + (one without even . or .. entries) will not open + successfully. +

+

Returns

+
    + A pointer to the DIR structure for the opened directory on + success, otherwise null on failure. +
+

Errors

+
    + ENOENT   No such directory.
    + EINVAL   Invalid argument or directory name.
    + ENOMEM   Not enough memory to perform the operation. +
+ +
+

int closedir(DIR *dir);

+

Description

+
    + The closedir function closes the directory stream associated with + dir, freeing resources as necessary and invalidating the + dir pointer. +
+

Returns

+
    + Returns 0 on successful completion, otherwise -1. +
+

Errors

+
    + EBADF    Invalid directory stream. +
+ +
+

struct dirent *readdir(DIR *dir);

+

Description

+
    + The readdir function is used to iterate through the directory + stream dir. It advances it one entry at a time, details of which + it returns as its result. +

    + On NTFS and FAT file systems, except for drive root directories, the caller + is guaranteed that the . and .. entries will be included + in the directory stream. On FATX file systems the . and + .. entries are not included. +

+

Returns

+
    + Returns a pointer to the directory details on success, in which + d_name is the file name of the current entry, otherwise null + on error or end of stream. +
+

Errors

+
    + ENOENT   No more entries.
    + EBADF    Invalid directory stream. +
+ +
+

void rewinddir(DIR *dir);

+

Description

+
    + The rewindir function can be used to reset the directory stream + dir to the start. Sensible results cannot be guaranteed if the + directory name used in the initial call to opendir was a + relative path name and the program has since changed its current working + directory. +
+

Returns

+
    + No error status is returned. +
+

Errors

+
    + EBADF    Invalid directory stream. +
+ +

+

+© Copyright Kevlin Henney +
+ + + \ No newline at end of file diff --git a/src/util/dirent_win32/dirent.c b/src/util/dirent_win32/dirent.c new file mode 100644 index 00000000..12a2547b --- /dev/null +++ b/src/util/dirent_win32/dirent.c @@ -0,0 +1,148 @@ +/* + + Implementation of POSIX directory browsing functions and types for Win32. + + Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) + History: Created March 1997. Updated June 2003 and July 2012. + Rights: See end of file. + +*/ + +#include "dirent.h" +#include +#include /* _findfirst and _findnext set errno iff they return -1 */ +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef ptrdiff_t handle_type; /* C99's intptr_t not sufficiently portable */ + +struct DIR +{ + handle_type handle; /* -1 for failed rewind */ + struct _finddata_t info; + struct dirent result; /* d_name null iff first time */ + char *name; /* null-terminated char string */ +}; + +DIR *opendir(const char *name) +{ + DIR *dir = 0; + + if(name && name[0]) + { + size_t base_length = strlen(name); + const char *all = /* search pattern must end with suitable wildcard */ + strchr("/\\", name[base_length - 1]) ? "*" : "/*"; + + if((dir = (DIR *) malloc(sizeof *dir)) != 0 && + (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0) + { + strcat(strcpy(dir->name, name), all); + + if((dir->handle = + (handle_type) _findfirst(dir->name, &dir->info)) != -1) + { + dir->result.d_name = 0; + } + else /* rollback */ + { + free(dir->name); + free(dir); + dir = 0; + } + } + else /* rollback */ + { + free(dir); + dir = 0; + errno = ENOMEM; + } + } + else + { + errno = EINVAL; + } + + return dir; +} + +int closedir(DIR *dir) +{ + int result = -1; + + if(dir) + { + if(dir->handle != -1) + { + result = _findclose(dir->handle); + } + + free(dir->name); + free(dir); + } + + if(result == -1) /* map all errors to EBADF */ + { + errno = EBADF; + } + + return result; +} + +struct dirent *readdir(DIR *dir) +{ + struct dirent *result = 0; + + if(dir && dir->handle != -1) + { + if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) + { + result = &dir->result; + result->d_name = dir->info.name; + } + } + else + { + errno = EBADF; + } + + return result; +} + +void rewinddir(DIR *dir) +{ + if(dir && dir->handle != -1) + { + _findclose(dir->handle); + dir->handle = (handle_type) _findfirst(dir->name, &dir->info); + dir->result.d_name = 0; + } + else + { + errno = EBADF; + } +} + +#ifdef __cplusplus +} +#endif + +/* + + Copyright Kevlin Henney, 1997, 2003, 2012. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose is hereby granted without fee, provided + that this copyright and permissions notice appear in all copies and + derivatives. + + This software is supplied "as is" without express or implied warranty. + + But that said, if there are any problems please get in touch. + +*/ diff --git a/src/util/dirent_win32/dirent.h b/src/util/dirent_win32/dirent.h new file mode 100644 index 00000000..a02a0d82 --- /dev/null +++ b/src/util/dirent_win32/dirent.h @@ -0,0 +1,50 @@ +#ifndef DIRENT_INCLUDED +#define DIRENT_INCLUDED + +/* + + Declaration of POSIX directory browsing functions and types for Win32. + + Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) + History: Created March 1997. Updated June 2003. + Rights: See end of file. + +*/ + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct DIR DIR; + +struct dirent +{ + char *d_name; +}; + +DIR *opendir(const char *); +int closedir(DIR *); +struct dirent *readdir(DIR *); +void rewinddir(DIR *); + +/* + + Copyright Kevlin Henney, 1997, 2003. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose is hereby granted without fee, provided + that this copyright and permissions notice appear in all copies and + derivatives. + + This software is supplied "as is" without express or implied warranty. + + But that said, if there are any problems please get in touch. + +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/util/logger.cpp b/src/util/logger.cpp index 71bf40ba..e551f029 100644 --- a/src/util/logger.cpp +++ b/src/util/logger.cpp @@ -9,6 +9,7 @@ namespace rack { void loggerInit(bool devMode) { +#ifdef RACK_HOST global->logger.startTime = std::chrono::high_resolution_clock::now(); if (devMode) { global->logger.logFile = stderr; @@ -17,12 +18,15 @@ void loggerInit(bool devMode) { std::string logFilename = assetLocal("log.txt"); global->logger.logFile = fopen(logFilename.c_str(), "w"); } +#endif // RACK_HOST } void loggerDestroy() { +#ifdef RACK_HOST if (global->logger.logFile != stderr) { fclose(global->logger.logFile); } +#endif // RACK_HOST } static const char* const loggerText[] = { @@ -40,6 +44,7 @@ static const int loggerColor[] = { }; static void loggerLogVa(LoggerLevel level, const char *file, int line, const char *format, va_list args) { +#ifdef RACK_HOST auto nowTime = std::chrono::high_resolution_clock::now(); int duration = std::chrono::duration_cast(nowTime - global->logger.startTime).count(); if (global->logger.logFile == stderr) @@ -52,13 +57,16 @@ static void loggerLogVa(LoggerLevel level, const char *file, int line, const cha printf("\n"); // xxx fprintf(global->logger.logFile, "\n"); fflush(global->logger.logFile); +#endif // RACK_HOST } void loggerLog(LoggerLevel level, const char *file, int line, const char *format, ...) { +#ifdef RACK_HOST va_list args; va_start(args, format); loggerLogVa(level, file, line, format, args); va_end(args); +#endif // RACK_HOST } /** Deprecated. Included for ABI compatibility */ diff --git a/src/util/system.cpp b/src/util/system.cpp index f2ead4a7..7ebad531 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -4,6 +4,8 @@ #ifdef YAC_POSIX #include #include +#else +#include "dirent_win32/dirent.h" #endif // YAC_POSIX #if ARCH_WIN @@ -21,7 +23,6 @@ namespace rack { std::vector systemListEntries(std::string path) { std::vector filenames; -#ifndef SKIP_SYSTEM_FXNS DIR *dir = opendir(path.c_str()); if (dir) { struct dirent *d; @@ -33,7 +34,6 @@ std::vector systemListEntries(std::string path) { } closedir(dir); } -#endif return filenames; } @@ -47,25 +47,31 @@ bool systemExists(std::string path) { } bool systemIsFile(std::string path) { -#ifndef SKIP_SYSTEM_FXNS +#ifdef ARCH_WIN + DWORD dwAttrib = ::GetFileAttributes(path.c_str()); + return + (dwAttrib != INVALID_FILE_ATTRIBUTES) && + (0 == (dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) ; +#else struct stat statbuf; if (stat(path.c_str(), &statbuf)) return false; return S_ISREG(statbuf.st_mode); -#else - return false; -#endif // SKIP_SYSTEM_FXNS +#endif // ARCH_WIN } bool systemIsDirectory(std::string path) { -#ifndef SKIP_SYSTEM_FXNS +#ifdef ARCH_WIN + DWORD dwAttrib = ::GetFileAttributes(path.c_str()); + return + (dwAttrib != INVALID_FILE_ATTRIBUTES) && + (0 != (dwAttrib & FILE_ATTRIBUTE_DIRECTORY)) ; +#else struct stat statbuf; if (stat(path.c_str(), &statbuf)) return false; return S_ISDIR(statbuf.st_mode); -#else - return false; -#endif // SKIP_SYSTEM_FXNS +#endif // ARCH_WIN } void systemCopy(std::string srcPath, std::string destPath) { diff --git a/src/vst2_main.cpp b/src/vst2_main.cpp index 1c7601c1..10d8e19c 100644 --- a/src/vst2_main.cpp +++ b/src/vst2_main.cpp @@ -16,7 +16,7 @@ /// limitations under the License. /// /// created: 25Jun2018 -/// changed: 26Jun2018, 27Jun2018, 29Jun2018, 01Jul2018, 02Jul2018, 06Jul2018 +/// changed: 26Jun2018, 27Jun2018, 29Jun2018, 01Jul2018, 02Jul2018, 06Jul2018, 13Jul2018 /// /// /// @@ -56,6 +56,7 @@ extern void vst2_queue_param (int uniqueParamId, float normValue); extern void vst2_handle_queued_params (void); extern float vst2_get_param (int uniqueParamId); extern void vst2_get_param_name (int uniqueParamId, char *s, int sMaxLen); +extern void vst2_set_shared_plugin_tls_globals (void); #include "../include/window.hpp" @@ -830,6 +831,8 @@ static DWORD WINAPI vst2_ui_thread_entry(VSTPluginWrapper *_wrapper) { _wrapper->b_thread_started = YAC_TRUE; + vst2_set_shared_plugin_tls_globals(); + while(_wrapper->b_thread_running || _wrapper->b_queued_destroy_editor || _wrapper->queued_load_patch.addr) { // printf("xxx vstrack_plugin: idle loop\n"); @@ -1001,6 +1004,7 @@ void VSTPluginProcessReplacingFloat32(VSTPlugin *vstPlugin, wrapper->lockAudio(); wrapper->setGlobals(); + vst2_set_shared_plugin_tls_globals(); // // rack::global->engine.vipMutex.lock(); rack::global->engine.mutex.lock(); rack::global->vst2.last_seen_num_frames = sUI(sampleFrames); @@ -1014,17 +1018,18 @@ void VSTPluginProcessReplacingFloat32(VSTPlugin *vstPlugin, sUI i; sUI k = 0u; - if(wrapper->b_processing) + // Clear output buffers + // (note) AudioInterface instances accumulate samples in the output buffer + for(i = 0u; i < uint32_t(sampleFrames); i++) { - // Clear output buffers - // (note) AudioInterface instances accumulate samples in the output buffer - for(i = 0u; i < uint32_t(sampleFrames); i++) + for(chIdx = 0u; chIdx < NUM_OUTPUTS; chIdx++) { - for(chIdx = 0u; chIdx < NUM_OUTPUTS; chIdx++) - { - outputs[chIdx][i] = 0.0f; - } + outputs[chIdx][i] = 0.0f; } + } + + if(1 && wrapper->b_processing) + { #ifdef HAVE_WINDOWS _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); @@ -1032,18 +1037,6 @@ void VSTPluginProcessReplacingFloat32(VSTPlugin *vstPlugin, vst2_engine_process(inputs, outputs, sampleFrames); } - else - { - // Not processing, output silence - // printf("xxx vstrack_plugin: output silence\n"); - for(i = 0u; i < uint32_t(sampleFrames); i++) - { - for(chIdx = 0u; chIdx < NUM_OUTPUTS; chIdx++) - { - outputs[chIdx][i] = 0.0f; - } - } - } // // rack::global->engine.vipMutex.unlock(); rack::global->engine.mutex.unlock(); diff --git a/src/widgets/FramebufferWidget.cpp b/src/widgets/FramebufferWidget.cpp index 85f2180a..1f31a155 100644 --- a/src/widgets/FramebufferWidget.cpp +++ b/src/widgets/FramebufferWidget.cpp @@ -5,6 +5,7 @@ #include "nanovg_gl_utils.h" #include "global_ui.hpp" +// #include namespace rack { @@ -35,8 +36,14 @@ FramebufferWidget::~FramebufferWidget() { void FramebufferWidget::draw(NVGcontext *vg) { // Bypass framebuffer rendering entirely - // Widget::draw(vg); - // return; +#ifdef RACK_PLUGIN_SHARED + // (note) FBO path crashes when plugin is a DLL (!) + // (the glGenFramebuffers() call in nvgluCreateFramebuffer() to be precise) + Widget::draw(vg); + return; +#endif // RACK_PLUGIN_SHARED + // printf("xxx FramebufferWidget::draw: ENTER vg=%p\n", vg); + // printf("xxx FramebufferWidget::draw: GetCurrentThreadId=%d\n", GetCurrentThreadId()); // Get world transform float xform[6]; @@ -49,69 +56,103 @@ void FramebufferWidget::draw(NVGcontext *vg) { Vec bi = b.floor(); Vec bf = b.minus(bi); + // printf("xxx FramebufferWidget::draw: 2 dirty=%d\n", dirty); + // Render to framebuffer if (dirty) { dirty = false; + // printf("xxx FramebufferWidget::draw: 2b internal=%p\n", internal); + internal->box = getChildrenBoundingBox(); internal->box.pos = internal->box.pos.mult(s).floor(); internal->box.size = internal->box.size.mult(s).ceil().plus(Vec(1, 1)); + // printf("xxx FramebufferWidget::draw: 3b\n"); + Vec fbSize = internal->box.size.mult(global_ui->window.gPixelRatio * oversample); + // printf("xxx FramebufferWidget::draw: 4b\n"); + if (!fbSize.isFinite()) return; if (fbSize.isZero()) return; + // printf("xxx FramebufferWidget::draw: 5b\n"); + // info("rendering framebuffer %f %f", fbSize.x, fbSize.y); // Delete old one first to free up GPU memory internal->setFramebuffer(NULL); + // printf("xxx FramebufferWidget::draw: 5b2 global_ui->window.gVg=%p nvgluCreateFramebuffer=%p global_ui=%p\n", global_ui->window.gVg, global_ui); // Create a framebuffer from the main nanovg context. We will draw to this in the secondary nanovg context. - NVGLUframebuffer *fb = nvgluCreateFramebuffer(global_ui->window.gVg, fbSize.x, fbSize.y, 0); + NVGLUframebuffer *fb = nvgluCreateFramebuffer(global_ui->window.gVg, fbSize.x, fbSize.y, 0); + // // NVGLUframebuffer *fb = nvgluCreateFramebuffer(NULL, 0, 0, 0); + // printf("xxx FramebufferWidget::draw: 6b fb=%p\n", fb); if (!fb) return; internal->setFramebuffer(fb); + // printf("xxx FramebufferWidget::draw: 7b\n"); + nvgluBindFramebuffer(fb); glViewport(0.0, 0.0, fbSize.x, fbSize.y); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + // printf("xxx FramebufferWidget::draw: 8b\n"); + nvgBeginFrame(global_ui->window.gFramebufferVg, fbSize.x, fbSize.y, global_ui->window.gPixelRatio * oversample); nvgScale(global_ui->window.gFramebufferVg, global_ui->window.gPixelRatio * oversample, global_ui->window.gPixelRatio * oversample); + + // printf("xxx FramebufferWidget::draw: 9b\n"); + // Use local scaling nvgTranslate(global_ui->window.gFramebufferVg, bf.x, bf.y); nvgTranslate(global_ui->window.gFramebufferVg, -internal->box.pos.x, -internal->box.pos.y); nvgScale(global_ui->window.gFramebufferVg, s.x, s.y); + // printf("xxx FramebufferWidget::draw: 10b\n"); Widget::draw(global_ui->window.gFramebufferVg); + // printf("xxx FramebufferWidget::draw: 11b\n"); nvgEndFrame(global_ui->window.gFramebufferVg); + // printf("xxx FramebufferWidget::draw: 12b\n"); nvgluBindFramebuffer(NULL); + // printf("xxx FramebufferWidget::draw: 13b\n"); } + // printf("xxx FramebufferWidget::draw: 3\n"); + if (!internal->fb) { return; } + // printf("xxx FramebufferWidget::draw: 4\n"); + // Draw framebuffer image, using world coordinates nvgSave(vg); nvgResetTransform(vg); nvgTranslate(vg, bi.x, bi.y); + // printf("xxx FramebufferWidget::draw: 5\n"); + nvgBeginPath(vg); nvgRect(vg, internal->box.pos.x, internal->box.pos.y, internal->box.size.x, internal->box.size.y); NVGpaint paint = nvgImagePattern(vg, internal->box.pos.x, internal->box.pos.y, internal->box.size.x, internal->box.size.y, 0.0, internal->fb->image, 1.0); nvgFillPaint(vg, paint); nvgFill(vg); + // printf("xxx FramebufferWidget::draw: 6\n"); + // For debugging the bounding box of the framebuffer // nvgStrokeWidth(vg, 2.0); // nvgStrokeColor(vg, nvgRGBA(255, 0, 0, 128)); // nvgStroke(vg); nvgRestore(vg); + + // printf("xxx FramebufferWidget::draw: LEAVE\n"); } int FramebufferWidget::getImageHandle() { diff --git a/src/widgets/SVGWidget.cpp b/src/widgets/SVGWidget.cpp index 10138fc2..60db7250 100644 --- a/src/widgets/SVGWidget.cpp +++ b/src/widgets/SVGWidget.cpp @@ -210,10 +210,12 @@ void SVGWidget::setSVG(std::shared_ptr svg) { } void SVGWidget::draw(NVGcontext *vg) { + // printf("xxx SVGWidget::draw: ENTER\n"); if (svg && svg->handle) { // printf("drawing svg %f %f\n", box.size.x, box.size.y); drawSVG(vg, svg->handle); } + // printf("xxx SVGWidget::draw: LEAVE\n"); } diff --git a/src/widgets/Widget.cpp b/src/widgets/Widget.cpp index b5976636..189bdecb 100644 --- a/src/widgets/Widget.cpp +++ b/src/widgets/Widget.cpp @@ -110,12 +110,18 @@ void Widget::step() { void Widget::draw(NVGcontext *vg) { for (Widget *child : children) { + // printf("xxx Widget::draw: 1 child=%p vg=%p\n", child, vg); if (!child->visible) continue; + // printf("xxx Widget::draw: 2 child=%p\n", child); nvgSave(vg); + // printf("xxx Widget::draw: 3 child=%p\n", child); nvgTranslate(vg, child->box.pos.x, child->box.pos.y); + // printf("xxx Widget::draw: 4 child=%p\n", child); child->draw(vg); + // printf("xxx Widget::draw: 5 child=%p\n", child); nvgRestore(vg); + // printf("xxx Widget::draw: 6 child=%p\n", child); } } diff --git a/src/window.cpp b/src/window.cpp index 25520ae6..00de5283 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -306,6 +306,7 @@ void errorCallback(int error, const char *description) { void renderGui() { int width, height; + // printf("xxx renderGui: ENTER\n"); glfwGetFramebufferSize(global_ui->window.gWindow, &width, &height); // Update and render @@ -313,13 +314,16 @@ void renderGui() { nvgReset(global_ui->window.gVg); nvgScale(global_ui->window.gVg, global_ui->window.gPixelRatio, global_ui->window.gPixelRatio); + // printf("xxx renderGui: gScene->draw() BEGIN\n"); global_ui->ui.gScene->draw(global_ui->window.gVg); + // printf("xxx renderGui: gScene->draw() END\n"); glViewport(0, 0, width, height); glClearColor(0.0, 0.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); nvgEndFrame(global_ui->window.gVg); glfwSwapBuffers(global_ui->window.gWindow); + // printf("xxx renderGui: LEAVE\n"); } void windowInit() { @@ -469,7 +473,9 @@ void windowRun() { #endif // USE_VST2 ) { +#ifndef RACK_PLUGIN vst2_handle_queued_set_program_chunk(); +#endif // RACK_PLUGIN double startTime = glfwGetTime(); global_ui->window.gGuiFrame++; @@ -547,6 +553,7 @@ void windowRun() { break; } #if defined(YAC_WIN32) && defined(VST2_REPARENT_WINDOW_HACK) +#ifndef RACK_PLUGIN else if(rack::global_ui->vst2.b_queued_maximize_window || __glfw_hack__b_queued_maximize_window) { rack::global_ui->vst2.b_queued_maximize_window = false; @@ -554,6 +561,7 @@ void windowRun() { vst2_maximize_reparented_window(); } #endif // VST2_REPARENT_WINDOW_HACK +#endif // RACK_PLUGIN #endif // USE_VST2 } @@ -749,13 +757,16 @@ std::shared_ptr Image::load(const std::string &filename) { //////////////////// SVG::SVG(const std::string &filename) { + // printf("xxx SVG::SVG: ENTER\n"); handle = nsvgParseFromFile(filename.c_str(), "px", SVG_DPI); + // printf("xxx SVG::SVG: handle=%p\n"); if (handle) { info("Loaded SVG %s", filename.c_str()); } else { warn("Failed to load SVG %s", filename.c_str()); } + // printf("xxx SVG::SVG: LEAVE\n"); } SVG::~SVG() { @@ -763,9 +774,12 @@ SVG::~SVG() { } std::shared_ptr SVG::load(const std::string &filename) { + // printf("xxx SVG::load: ENTER\n"); auto sp = global_ui->window.svg_cache[filename].lock(); + // printf("xxx SVG::load: cache locked OK\n"); if (!sp) global_ui->window.svg_cache[filename] = sp = std::make_shared(filename); + // printf("xxx SVG::load: RETURN\n"); return sp; } diff --git a/vst2_bin/CHANGELOG_VST.txt b/vst2_bin/CHANGELOG_VST.txt index 4c7dd7f1..7126bbff 100644 --- a/vst2_bin/CHANGELOG_VST.txt +++ b/vst2_bin/CHANGELOG_VST.txt @@ -1,3 +1,9 @@ +** July 13th, 2018 +- add support for dynamically loaded plugins ("plugin.dll") +- add module Template_shared.MyModule +- change: the dBiz.* modules are now linked dynamically + + ** July 12th, 2018 - fix: assign unique VST param base id when duplicating modules - change: Core.MIDI*: pre-select default VST MIDI input device diff --git a/vst2_bin/log.txt b/vst2_bin/log.txt index 1b4a713b..8d025c7f 100644 --- a/vst2_bin/log.txt +++ b/vst2_bin/log.txt @@ -1,80 +1,111 @@ [0.000 info src/main.cpp:63] VeeSeeVST Rack 0.6.1 [0.000 info src/main.cpp:66] Global directory: f:\git\VeeSeeVSTRack\vst2_bin\/ [0.000 info src/main.cpp:67] Local directory: f:\git\VeeSeeVSTRack\vst2_bin\/ -[0.000 info src/plugin.cpp:639] vcvrack: Loaded static plugin Alikins 0.6.1 -[0.000 info src/plugin.cpp:639] vcvrack: Loaded static plugin AS 0.6.1 -[0.001 info src/plugin.cpp:639] vcvrack: Loaded static plugin AudibleInstruments 0.6.1 -[0.001 info src/plugin.cpp:639] vcvrack: Loaded static plugin BaconMusic 0.6.1 -[0.002 info src/plugin.cpp:639] vcvrack: Loaded static plugin Befaco 0.6.1 -[0.002 info src/plugin.cpp:639] vcvrack: Loaded static plugin Bidoo 0.6.1 -[0.002 info src/plugin.cpp:639] vcvrack: Loaded static plugin Bogaudio 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin cf 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin dBiz 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin DHE-Modules 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin DrumKit 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin ErraticInstruments 0.6.1 -[0.003 info src/plugin.cpp:639] vcvrack: Loaded static plugin ESeries 0.6.1 -[0.004 info src/plugin.cpp:639] vcvrack: Loaded static plugin FrozenWasteland 0.6.1 -[0.004 info src/plugin.cpp:639] vcvrack: Loaded static plugin Fundamental 0.6.1 -[0.004 info src/plugin.cpp:639] vcvrack: Loaded static plugin Gratrix 0.6.1 -[0.004 info src/plugin.cpp:639] vcvrack: Loaded static plugin HetrickCV 0.6.1 -[0.004 info src/plugin.cpp:639] vcvrack: Loaded static plugin huaba 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin JW-Modules 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin Koralfx-Modules 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin LindenbergResearch 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin LOGinstruments 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin ML_modules 0.6.1 -[0.005 info src/plugin.cpp:639] vcvrack: Loaded static plugin moDllz 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin modular80 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin mscHack 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin mtsch-plugins 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin NauModular 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin Ohmer 0.6.1 -[0.006 info src/plugin.cpp:639] vcvrack: Loaded static plugin Qwelk 0.6.1 -[0.007 info src/plugin.cpp:639] vcvrack: Loaded static plugin RJModules 0.6.1 -[0.007 info src/plugin.cpp:639] vcvrack: Loaded static plugin SerialRacker 0.6.1 -[0.007 info src/plugin.cpp:639] vcvrack: Loaded static plugin SonusModular 0.6.1 -[0.007 info src/plugin.cpp:639] vcvrack: Loaded static plugin Southpole-parasites 0.6.1 -[0.007 info src/plugin.cpp:639] vcvrack: Loaded static plugin squinkylabs-plug1 0.6.1 -[0.008 info src/plugin.cpp:639] vcvrack: Loaded static plugin SubmarineFree 0.6.1 -[0.008 info src/plugin.cpp:639] vcvrack: Loaded static plugin Template 0.6.1 -[0.008 info src/plugin.cpp:639] vcvrack: Loaded static plugin trowaSoft 0.6.1 -[0.008 info src/plugin.cpp:639] vcvrack: Loaded static plugin unless_modules 0.6.1 -[0.008 info src/plugin.cpp:639] vcvrack: Loaded static plugin Valley 0.6.1 -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_146097_cc.svg -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_31859_cc.svg -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1343816_cc.svg -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1343811_cc.svg -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1084369_cc.svg -[0.009 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1745061_cc.svg -[0.010 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1240789_cc.svg -[0.010 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_305536_cc.svg -[0.010 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_468341_cc.svg -[0.186 info src/window.cpp:703] Loaded font f:\git\VeeSeeVSTRack\vst2_bin\/res/fonts/DejaVuSans.ttf -[0.187 info src/settings.cpp:185] Loading settings f:\git\VeeSeeVSTRack\vst2_bin\/settings.json -[0.288 info src/app/RackWidget.cpp:192] Loading patch from string -[0.290 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/Core/AudioInterface.svg -[0.290 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/ScrewSilver.svg -[0.290 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/PJ301M.svg -[0.291 info src/window.cpp:703] Loaded font f:\git\VeeSeeVSTRack\vst2_bin\/res/fonts/ShareTechMono-Regular.ttf -[0.292 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/Core/MIDIToCVInterface.svg -[0.294 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/XCO.svg -[0.294 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/knob_68px.svg -[0.295 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/knob_16px.svg -[0.295 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/button_9px_0.svg -[0.295 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/button_9px_1.svg -[0.295 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/knob_38px.svg -[0.295 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/slider_switch_2_14px_0.svg -[0.296 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/slider_switch_2_14px_1.svg -[0.296 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Bogaudio/res/port.svg -[0.297 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Fundamental/res/VCA.svg -[0.297 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/RoundLargeBlackKnob.svg -[0.298 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Fundamental/res/VCF.svg -[0.298 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/RoundHugeBlackKnob.svg -[0.299 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/ADSR.svg -[0.299 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-hexscrew.svg -[0.300 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-SlidePot.svg -[0.300 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-SlidePotHandle.svg -[0.300 info src/window.cpp:754] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-PJ301M.svg -[25.866 info src/app/RackWidget.cpp:137] Saving patch F:\eureka_data\vst_patches\vcvrack_duplicate_test2.vcv -[29.444 info src/app/RackWidget.cpp:154] Saving patch to string +[0.000 info src/plugin.cpp:673] vcvrack: Loaded static plugin Alikins 0.6.1 +[0.001 info src/plugin.cpp:673] vcvrack: Loaded static plugin AS 0.6.1 +[0.001 info src/plugin.cpp:673] vcvrack: Loaded static plugin AudibleInstruments 0.6.1 +[0.001 info src/plugin.cpp:673] vcvrack: Loaded static plugin BaconMusic 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin Befaco 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin Bidoo 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin Bogaudio 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin cf 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin DHE-Modules 0.6.1 +[0.002 info src/plugin.cpp:673] vcvrack: Loaded static plugin DrumKit 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin ErraticInstruments 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin ESeries 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin FrozenWasteland 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin Fundamental 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin Gratrix 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin HetrickCV 0.6.1 +[0.003 info src/plugin.cpp:673] vcvrack: Loaded static plugin huaba 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin JW-Modules 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin Koralfx-Modules 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin LindenbergResearch 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin LOGinstruments 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin ML_modules 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin moDllz 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin modular80 0.6.1 +[0.004 info src/plugin.cpp:673] vcvrack: Loaded static plugin mscHack 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin mtsch-plugins 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin NauModular 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin Ohmer 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin Qwelk 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin RJModules 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin SerialRacker 0.6.1 +[0.005 info src/plugin.cpp:673] vcvrack: Loaded static plugin SonusModular 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin Southpole-parasites 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin squinkylabs-plug1 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin SubmarineFree 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin Template 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin trowaSoft 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin unless_modules 0.6.1 +[0.006 info src/plugin.cpp:673] vcvrack: Loaded static plugin Valley 0.6.1 +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Alikins/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/AS/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/AudibleInstruments/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/BaconMusic/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Befaco/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Bidoo/plugin.dll does not exist +[0.007 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Bogaudio/plugin.dll does not exist +[0.008 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/BOKONTEPByteBeatMachine/plugin.dll does not exist +[0.008 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/cf/plugin.dll does not exist +[0.008 info src/plugin.cpp:155] Loaded plugin dBiz 0.6.1 from f:\git\VeeSeeVSTRack\vst2_bin\/plugins/dBiz/plugin.dll +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/DHE-Modules/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/DrumKit/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/ErraticInstruments/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/ESeries/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/FrozenWasteland/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Fundamental/plugin.dll does not exist +[0.009 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Gratrix/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/HetrickCV/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/huaba/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/JW-Modules/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Koralfx-Modules/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/LindenbergResearch/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/LOGinstruments/plugin.dll does not exist +[0.010 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/ML_modules/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/moDllz/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/modular80/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/mscHack/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/mtsch-plugins/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/NauModular/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Ohmer/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Qwelk/plugin.dll does not exist +[0.011 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/RJModules/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/SerialRacker/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/SonusModular/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Southpole-parasites/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/squinkylabs-plug1/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/SubmarineFree/plugin.dll does not exist +[0.012 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Template/plugin.dll does not exist +[0.013 info src/plugin.cpp:155] Loaded plugin Template_shared 0.6.1 from f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Template_shared/plugin.dll +[0.013 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/trowaSoft/plugin.dll does not exist +[0.013 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/unless_modules/plugin.dll does not exist +[0.013 warn src/plugin.cpp:86] Plugin file f:\git\VeeSeeVSTRack\vst2_bin\/plugins/Valley/plugin.dll does not exist +[0.014 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_146097_cc.svg +[0.014 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_31859_cc.svg +[0.014 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1343816_cc.svg +[0.014 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1343811_cc.svg +[0.014 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1084369_cc.svg +[0.015 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1745061_cc.svg +[0.015 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_1240789_cc.svg +[0.015 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_305536_cc.svg +[0.015 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/icons/noun_468341_cc.svg +[0.192 info src/window.cpp:711] Loaded font f:\git\VeeSeeVSTRack\vst2_bin\/res/fonts/DejaVuSans.ttf +[0.194 info src/settings.cpp:185] Loading settings f:\git\VeeSeeVSTRack\vst2_bin\/settings.json +[0.295 info src/app/RackWidget.cpp:196] Loading patch from string +[0.297 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/Core/AudioInterface.svg +[0.297 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/ScrewSilver.svg +[0.297 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/PJ301M.svg +[0.297 info src/window.cpp:711] Loaded font f:\git\VeeSeeVSTRack\vst2_bin\/res/fonts/ShareTechMono-Regular.ttf +[0.299 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/Core/MIDIToCVInterface.svg +[0.301 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Fundamental/res/VCA.svg +[0.301 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/RoundLargeBlackKnob.svg +[0.303 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/Fundamental/res/VCF.svg +[0.303 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\/res/ComponentLibrary/RoundHugeBlackKnob.svg +[0.305 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/ADSR.svg +[0.305 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-hexscrew.svg +[0.305 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-SlidePot.svg +[0.305 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-SlidePotHandle.svg +[0.306 info src/window.cpp:764] Loaded SVG f:\git\VeeSeeVSTRack\vst2_bin\plugins/AS/res/as-PJ301M.svg +[223.996 info src/app/RackWidget.cpp:158] Saving patch to string diff --git a/vst2_bin/plugins/Template/LICENSE.txt b/vst2_bin/plugins/Template/LICENSE.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/vst2_bin/plugins/Template/LICENSE.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/vst2_bin/plugins/Template/README.md b/vst2_bin/plugins/Template/README.md new file mode 100644 index 00000000..8f1cd9c1 --- /dev/null +++ b/vst2_bin/plugins/Template/README.md @@ -0,0 +1,13 @@ + +# VCV Template plugin + +The VCV Template plugin is a starting point for developing your own plugins for VCV Rack. +It implements a simple sine VCO, demonstrating inputs, outputs, parameters, and other concepts. + +See https://vcvrack.com/manual/PluginDevelopmentTutorial.html for a development tutorial. + +## Contributing + +I welcome Issues and Pull Requests to this repository if you have suggestions for improvement. + +This template is released into the public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)). \ No newline at end of file diff --git a/vst2_bin/plugins/Template/res/MyModule.svg b/vst2_bin/plugins/Template/res/MyModule.svg new file mode 100644 index 00000000..606be166 --- /dev/null +++ b/vst2_bin/plugins/Template/res/MyModule.svg @@ -0,0 +1,243 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vst2_bin/plugins/Template_shared/LICENSE.txt b/vst2_bin/plugins/Template_shared/LICENSE.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/vst2_bin/plugins/Template_shared/LICENSE.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/vst2_bin/plugins/Template_shared/README.md b/vst2_bin/plugins/Template_shared/README.md new file mode 100644 index 00000000..8f1cd9c1 --- /dev/null +++ b/vst2_bin/plugins/Template_shared/README.md @@ -0,0 +1,13 @@ + +# VCV Template plugin + +The VCV Template plugin is a starting point for developing your own plugins for VCV Rack. +It implements a simple sine VCO, demonstrating inputs, outputs, parameters, and other concepts. + +See https://vcvrack.com/manual/PluginDevelopmentTutorial.html for a development tutorial. + +## Contributing + +I welcome Issues and Pull Requests to this repository if you have suggestions for improvement. + +This template is released into the public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)). \ No newline at end of file diff --git a/vst2_bin/plugins/Template_shared/plugin.dll b/vst2_bin/plugins/Template_shared/plugin.dll new file mode 100644 index 00000000..696aff87 Binary files /dev/null and b/vst2_bin/plugins/Template_shared/plugin.dll differ diff --git a/vst2_bin/plugins/Template_shared/res/MyModule.svg b/vst2_bin/plugins/Template_shared/res/MyModule.svg new file mode 100644 index 00000000..606be166 --- /dev/null +++ b/vst2_bin/plugins/Template_shared/res/MyModule.svg @@ -0,0 +1,243 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vst2_bin/plugins/dBiz/plugin.dll b/vst2_bin/plugins/dBiz/plugin.dll new file mode 100644 index 00000000..b6bf9ed4 Binary files /dev/null and b/vst2_bin/plugins/dBiz/plugin.dll differ diff --git a/vst2_bin/settings.json b/vst2_bin/settings.json index 5132a42f..d194953f 100644 --- a/vst2_bin/settings.json +++ b/vst2_bin/settings.json @@ -16,6 +16,10 @@ "lastPath": "", "moduleBrowser": { "favorites": [ + { + "plugin": "Template_shared", + "model": "MyModule" + }, { "plugin": "Alikins", "model": "SpecificValue" diff --git a/vst2_bin/veeseevstrack_effect.dll__X86_LEGACY b/vst2_bin/veeseevstrack_effect.dll__X86_LEGACY deleted file mode 100644 index 10940d51..00000000 Binary files a/vst2_bin/veeseevstrack_effect.dll__X86_LEGACY and /dev/null differ diff --git a/vst2_bin/veeseevstrack_instr.dll__ b/vst2_bin/veeseevstrack_instr.dll__ index 4fb4e2c2..ec5d3e64 100644 Binary files a/vst2_bin/veeseevstrack_instr.dll__ and b/vst2_bin/veeseevstrack_instr.dll__ differ diff --git a/vst2_bin/veeseevstrack_instr.dll__X86_LEGACY__ b/vst2_bin/veeseevstrack_instr.dll__X86_LEGACY__ deleted file mode 100644 index 38cc0c1b..00000000 Binary files a/vst2_bin/veeseevstrack_instr.dll__X86_LEGACY__ and /dev/null differ diff --git a/vst2_common.mk b/vst2_common.mk index 1505265b..4d603ae4 100644 --- a/vst2_common.mk +++ b/vst2_common.mk @@ -13,6 +13,6 @@ PLAF_OBJ= include make.objects -ALL_OBJ=$(MAIN_OBJ) +ALL_OBJ= $(MAIN_OBJ) include vst2_common_msvc_post.mk diff --git a/vst2_common_staticlibs.mk b/vst2_common_staticlibs.mk index b8a0581e..c944d3d2 100644 --- a/vst2_common_staticlibs.mk +++ b/vst2_common_staticlibs.mk @@ -8,7 +8,7 @@ EXTRALIBS+= $(call plugin_lib,Bidoo) EXTRALIBS+= $(call plugin_lib,Bogaudio) #EXTRALIBS+= $(call plugin_lib,BOKONTEPByteBeatMachine) # unstable EXTRALIBS+= $(call plugin_lib,cf) -EXTRALIBS+= $(call plugin_lib,dBiz) +#EXTRALIBS+= $(call plugin_lib,dBiz) # now a DLL (13Jul2018) EXTRALIBS+= $(call plugin_lib,DHE-Modules) EXTRALIBS+= $(call plugin_lib,DrumKit) EXTRALIBS+= $(call plugin_lib,ErraticInstruments)