Skip to content

Commit

Permalink
Import carla.lv2 ttl fixes from main branch
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jan 2, 2024
1 parent 623920c commit e2d1ab6
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions source/plugin/carla-lv2-export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ static void writeManifestFile(PluginListManager& plm, const uint32_t microVersio
text += "@prefix atom: <" LV2_ATOM_PREFIX "> .\n";
text += "@prefix doap: <http://usefulinc.com/ns/doap#> .\n";
text += "@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n";
text += "@prefix idpy: <http://harrisonconsoles.com/lv2/inlinedisplay#> .\n";
text += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n";
text += "@prefix mod: <http://moddevices.com/ns/mod#> .\n";
text += "@prefix opts: <" LV2_OPTIONS_PREFIX "> .\n";
text += "@prefix owl: <http://www.w3.org/2002/07/owl#> .\n";
text += "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n";
text += "@prefix ui: <" LV2_UI_PREFIX "> .\n";
text += "\n";
Expand All @@ -129,7 +131,7 @@ static void writeManifestFile(PluginListManager& plm, const uint32_t microVersio
// Project

text += "<https://kx.studio/carla>\n";
text += " a lv2:Project ;\n";
text += " a owl:Ontology, doap:Project ;\n";
text += " doap:homepage <https://kx.studio/carla> ;\n";
text += " doap:maintainer [\n";
text += " foaf:homepage <https://falktx.com/> ;\n";
Expand All @@ -143,6 +145,17 @@ static void writeManifestFile(PluginListManager& plm, const uint32_t microVersio
text += " lv2:symbol \"carla\" .\n";
text += "\n";

// -------------------------------------------------------------------
// Extensions

text += "idpy:interface\n";
text += " a lv2:ExtensionData .\n";
text += "\n";

text += "idpy:queue_draw\n";
text += " a lv2:Feature .\n";
text += "\n";

// -------------------------------------------------------------------
// Plugins

Expand Down Expand Up @@ -271,6 +284,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc,
text += "@prefix atom: <" LV2_ATOM_PREFIX "> .\n";
text += "@prefix doap: <http://usefulinc.com/ns/doap#> .\n";
text += "@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n";
text += "@prefix idpy: <http://harrisonconsoles.com/lv2/inlinedisplay#> .\n";
text += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n";
text += "@prefix opts: <" LV2_OPTIONS_PREFIX "> .\n";
text += "@prefix patch: <" LV2_PATCH_PREFIX "> .\n";
Expand All @@ -291,28 +305,31 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc,
switch (pluginDesc->category)
{
case NATIVE_PLUGIN_CATEGORY_SYNTH:
text += " a lv2:InstrumentPlugin, lv2:Plugin ;\n";
text += " a lv2:InstrumentPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_DELAY:
text += " a lv2:DelayPlugin, lv2:Plugin ;\n";
text += " a lv2:DelayPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_EQ:
text += " a lv2:EQPlugin, lv2:Plugin ;\n";
text += " a lv2:EQPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_FILTER:
text += " a lv2:FilterPlugin, lv2:Plugin ;\n";
text += " a lv2:FilterPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_DYNAMICS:
text += " a lv2:DynamicsPlugin, lv2:Plugin ;\n";
text += " a lv2:DynamicsPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_MODULATOR:
text += " a lv2:ModulatorPlugin, lv2:Plugin ;\n";
text += " a lv2:ModulatorPlugin, lv2:Plugin, doap:Project ;\n";
break;
case NATIVE_PLUGIN_CATEGORY_UTILITY:
text += " a lv2:UtilityPlugin, lv2:Plugin ;\n";
text += " a lv2:UtilityPlugin, lv2:Plugin, doap:Project ;\n";
break;
default:
text += " a lv2:Plugin ;\n";
if (pluginDesc->midiIns >= 1 && pluginDesc->midiOuts >= 1 && pluginDesc->audioIns + pluginDesc->audioOuts == 0)
text += " a lv2:MIDIPlugin, lv2:Plugin, doap:Project ;\n";
else
text += " a lv2:Plugin, doap:Project ;\n";
break;
}

Expand All @@ -325,7 +342,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc,
if (pluginDesc->hints & NATIVE_PLUGIN_IS_RTSAFE)
text += " lv2:optionalFeature <" LV2_CORE__hardRTCapable "> ;\n";
if (pluginDesc->hints & NATIVE_PLUGIN_HAS_INLINE_DISPLAY)
text += " lv2:optionalFeature <" LV2_INLINEDISPLAY__queue_draw "> ;\n";
text += " lv2:optionalFeature idpy:queue_draw ;\n";
if ((pluginDesc->hints & NATIVE_PLUGIN_USES_STATE) || (pluginDesc->hints & NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE))
text += " lv2:optionalFeature <" LV2_STATE__threadSafeRestore "> ;\n";
text += "\n";
Expand Down Expand Up @@ -358,7 +375,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc,
text += " lv2:extensionData <" LV2_WORKER__interface "> ;\n";

if (pluginDesc->hints & NATIVE_PLUGIN_HAS_INLINE_DISPLAY)
text += " lv2:extensionData <" LV2_INLINEDISPLAY__interface "> ;\n";
text += " lv2:extensionData idpy:interface ;\n";

text += "\n";

Expand Down

0 comments on commit e2d1ab6

Please sign in to comment.