lv2export: expose lights as control output ports, always connect cv

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-06-01 16:17:15 +01:00
parent 848237c9c5
commit becfa5d39d
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
4 changed files with 63 additions and 45 deletions

View file

@ -92,7 +92,7 @@ void lv2_generate_ttl()
for (int i=0; i<module->getNumParams(); ++i)
{
ParamQuantity* q = module->getParamQuantity(i);
ParamQuantity* const q = module->getParamQuantity(i);
d_stdout(" lv2:port [");
d_stdout(" a lv2:InputPort, lv2:ControlPort ;");
d_stdout(" lv2:index %d ;", index++);
@ -107,6 +107,29 @@ void lv2_generate_ttl()
// q->unit.c_str()
}
for (int i=0; i<module->getNumLights(); ++i)
{
LightInfo* const li = module->getLightInfo(i);
d_stdout(" lv2:port [");
d_stdout(" a lv2:OutputPort, lv2:ControlPort ;");
d_stdout(" lv2:index %d ;", index++);
d_stdout(" lv2:symbol \"lv2_light_%d\" ;", i + 1);
if (!li->name.empty())
{
d_stdout(" lv2:name \"%s\" ;", li->name.c_str());
if (!li->description.empty())
d_stdout(" lv2:comment \"%s\" ;", li->description.c_str());
}
else
{
d_stdout(" lv2:name \"Light %d\" ;", i + 1);
}
d_stdout(" ] ;");
d_stdout("");
// q->getDescription().c_str()
// q->unit.c_str()
}
d_stdout(" .");
delete module;