From 705df2703fbb991b3609e1a5c91d92a5c2213925 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 31 Oct 2024 02:10:16 -0400 Subject: [PATCH] Eject the CLAP features as AUv2 tags (#325) --- src/detail/auv2/build-helper/build-helper.cpp | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/detail/auv2/build-helper/build-helper.cpp b/src/detail/auv2/build-helper/build-helper.cpp index b623a00d..23a42c9a 100644 --- a/src/detail/auv2/build-helper/build-helper.cpp +++ b/src/detail/auv2/build-helper/build-helper.cpp @@ -18,6 +18,7 @@ struct auInfo { std::string name, vers, type, subt, manu, manunm, clapid, desc, clapname, bundlevers; bool explicitMode{false}; + std::vector tags; const std::string factoryBase{"wrapAsAUV2_inst"}; @@ -78,8 +79,24 @@ struct auInfo << " \n" << " temporary-exception.files.all.read-write\n" << " \n" - << " \n" - << " \n"; + << " \n"; + + if (!tags.empty()) + { + of << " tags\n" + << " \n"; + for (auto tag : tags) // purposefully take a copy so we can mutate case + { + if (tag[0] >= 'a' && tag[0] <= 'z') + { + // Upper case the first char + tag[0] = std::toupper(tag[0]); + } + of << " " << tag << "\n"; + } + of << " \n"; + } + of << " \n"; } }; @@ -154,6 +171,13 @@ bool buildUnitsFromClap(const std::string &clapfile, const std::string &clapname u.type = "aumu"; } + auto fp = clapPlug->features; + while (*fp) + { + u.tags.push_back(*fp); + ++fp; + } + if (loader._pluginFactoryAUv2Info) { clap_plugin_info_as_auv2_t v2inf;