More details for lv2 export (category, CV type, label/brand)

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-06-29 14:14:14 +01:00
parent aabd9f9342
commit dd5344d2b8
10 changed files with 79 additions and 10 deletions

View file

@ -15,6 +15,14 @@
* For a full copy of the GNU General Public License see the LICENSE file.
*/
#ifndef PLUGIN_BRAND
# error PLUGIN_BRAND undefined
#endif
#ifndef PLUGIN_LABEL
# error PLUGIN_LABEL undefined
#endif
#ifndef PLUGIN_MODEL
# error PLUGIN_MODEL undefined
#endif
@ -43,11 +51,14 @@ void lv2_generate_ttl()
d_stdout("@prefix doap: <http://usefulinc.com/ns/doap#> .");
d_stdout("@prefix foaf: <http://xmlns.com/foaf/0.1/> .");
d_stdout("@prefix lv2: <http://lv2plug.in/ns/lv2core#> .");
d_stdout("@prefix mod: <http://moddevices.com/ns/mod#> .");
d_stdout("");
d_stdout("<urn:cardinal:" SLUG ">");
d_stdout(" a lv2:Plugin, doap:Project ;");
d_stdout(" a \"" PLUGIN_LV2_CATEGORY "\", doap:Project ;");
d_stdout(" doap:name \"" SLUG "\" ;");
d_stdout(" mod:brand \"" PLUGIN_BRAND "\" ;");
d_stdout(" mod:label \"" PLUGIN_LABEL "\" ;");
d_stdout("");
int index = 0;
@ -57,8 +68,18 @@ void lv2_generate_ttl()
d_stdout(" lv2:port [");
if (kCvInputs[i])
{
d_stdout(" a lv2:InputPort, lv2:CVPort ;");
d_stdout(" a lv2:InputPort, lv2:CVPort, mod:CVPort ;");
d_stdout(" lv2:symbol \"lv2_cv_in_%d\" ;", ++numCV);
if (kCvOutputs[i] == Bi)
{
d_stdout(" lv2:minimum -5.0 ;");
d_stdout(" lv2:maximum 5.0 ;");
}
else
{
d_stdout(" lv2:minimum 0.0 ;");
d_stdout(" lv2:maximum 10.0 ;");
}
}
else
{
@ -76,8 +97,18 @@ void lv2_generate_ttl()
d_stdout(" lv2:port [");
if (kCvOutputs[i])
{
d_stdout(" a lv2:OutputPort, lv2:CVPort ;");
d_stdout(" a lv2:OutputPort, lv2:CVPort, mod:CVPort ;");
d_stdout(" lv2:symbol \"lv2_cv_out_%d\" ;", ++numCV);
if (kCvOutputs[i] == Bi)
{
d_stdout(" lv2:minimum -5.0 ;");
d_stdout(" lv2:maximum 5.0 ;");
}
else
{
d_stdout(" lv2:minimum 0.0 ;");
d_stdout(" lv2:maximum 10.0 ;");
}
}
else
{

View file

@ -27,8 +27,14 @@
# error PLUGIN_CV_OUTPUTS undefined
#endif
static constexpr const bool kCvInputs[] = PLUGIN_CV_INPUTS;
static constexpr const bool kCvOutputs[] = PLUGIN_CV_OUTPUTS;
enum PortType {
Audio = 0,
Bi = 1,
Uni = 2,
};
static constexpr const int kCvInputs[] = PLUGIN_CV_INPUTS;
static constexpr const int kCvOutputs[] = PLUGIN_CV_OUTPUTS;
#include "src/lv2/buf-size.h"
#include "src/lv2/options.h"

View file

@ -52,9 +52,12 @@
#include "AudibleInstruments/eurorack/plaits/resources.cc"
#define PLUGIN_BRAND "AudibleInstruments"
#define PLUGIN_LABEL "Macro Osc 2"
#define PLUGIN_MODEL modelPlaits
#define PLUGIN_CV_INPUTS {1,1,1,1,1,1,1,1}
#define PLUGIN_CV_OUTPUTS {0,0}
#define PLUGIN_LV2_CATEGORY "lv2:GeneratorPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -32,9 +32,12 @@
// #include "AudibleInstruments/eurorack/braids/quantizer.cc"
#include "AudibleInstruments/eurorack/braids/resources.cc"
#define PLUGIN_BRAND "AudibleInstruments"
#define PLUGIN_LABEL "Macro Osc"
#define PLUGIN_MODEL modelBraids
#define PLUGIN_CV_INPUTS {1,1,1,1,1}
#define PLUGIN_CV_OUTPUTS {0}
#define PLUGIN_LV2_CATEGORY "lv2:GeneratorPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -17,9 +17,12 @@
#include "Fundamental/src/Quantizer.cpp"
#define PLUGIN_BRAND "VCV Fundamental"
#define PLUGIN_LABEL "Quantizer"
#define PLUGIN_MODEL modelQuantizer
#define PLUGIN_CV_INPUTS {1}
#define PLUGIN_CV_OUTPUTS {1}
#define PLUGIN_CV_INPUTS {Bi}
#define PLUGIN_CV_OUTPUTS {Bi}
#define PLUGIN_LV2_CATEGORY "mod:CVPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -17,9 +17,21 @@
#include "Fundamental/src/SEQ3.cpp"
#define PLUGIN_BRAND "VCV Fundamental"
#define PLUGIN_LABEL "SEQ3"
#define PLUGIN_MODEL modelSEQ3
#define PLUGIN_CV_INPUTS {1,1,1,1,1}
#define PLUGIN_CV_OUTPUTS {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
#define PLUGIN_CV_INPUTS {Bi,Uni,Uni,Uni,Uni}
#define PLUGIN_CV_OUTPUTS { \
/* trigger */ \
Uni, \
/* 3 cv outs */ \
Bi,Bi,Bi, \
/* 8 steps */ \
Uni,Uni,Uni,Uni,Uni,Uni,Uni,Uni, \
/* steps, clk, run, reset */ \
Uni,Uni,Uni,Uni \
}
#define PLUGIN_LV2_CATEGORY "mod:CVPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -17,9 +17,12 @@
#include "MSM/src/Phaser.cpp"
#define PLUGIN_BRAND "MSM"
#define PLUGIN_LABEL "Phaser"
#define PLUGIN_MODEL modelPhaserModule
#define PLUGIN_CV_INPUTS {1,1,1,0}
#define PLUGIN_CV_OUTPUTS {0}
#define PLUGIN_LV2_CATEGORY "lv2:DistortionPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -17,9 +17,12 @@
#include "rackwindows/src/mv.cpp"
#define PLUGIN_BRAND "Rackwindows"
#define PLUGIN_LABEL "MV"
#define PLUGIN_MODEL modelMv
#define PLUGIN_CV_INPUTS {1,1,1,1,0,0}
#define PLUGIN_CV_OUTPUTS {0,0}
#define PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -17,9 +17,12 @@
#include "rackwindows/src/vibrato.cpp"
#define PLUGIN_BRAND "Rackwindows"
#define PLUGIN_LABEL "Vibrato"
#define PLUGIN_MODEL modelVibrato
#define PLUGIN_CV_INPUTS {1,1,1,1,1,0}
#define PLUGIN_CV_OUTPUTS {1,0,1}
#define PLUGIN_LV2_CATEGORY "lv2:DynamicsPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"

View file

@ -20,10 +20,12 @@
#include "ValleyAudio/src/Plateau/Dattorro.cpp"
#include "ValleyAudio/src/Plateau/Plateau.cpp"
#define PLUGIN_BRAND "Valley Audio"
#define PLUGIN_LABEL "Plateau"
#define PLUGIN_MODEL modelPlateau
#define PLUGIN_CV_INPUTS {0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
#define PLUGIN_CV_OUTPUTS {0,0}
#define PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#include "lv2plugin.cpp"
#include "export.cpp"