2 #include <Library/LibraryInterface.hpp>
3 #include <Library/ProcessesItemModel.hpp>
4 #include <Vst3/ApplicationPlugin.hpp>
5 #include <Vst3/EffectModel.hpp>
7 #include <score/tools/Bind.hpp>
15 SCORE_CONCRETE(
"1d6ca523-628b-431a-9f70-87df92a63551")
17 void registerVSTClass(
19 const VST3::Hosting::ClassInfo& cls)
23 auto name = QString::fromStdString(cls.name());
24 auto vendor = QString::fromStdString(cls.vendor());
25 auto desc = QString::fromStdString(cls.version());
26 auto uid = QString::fromStdString(cls.ID().toString());
31 if(parent.author.isEmpty())
32 parent.author = vendor;
33 if(vst.classInfo.size() == 1)
34 parent.customData = uid;
35 Library::addToLibrary(parent, std::move(classdata));
43 QModelIndex node = model.find(key);
44 if(node == QModelIndex{})
53 auto reset_plugs = [
this, &plug, &parent] {
54 for(
const auto& vst : plug.vst_infos)
60 const int numClasses = vst.classInfo.size();
64 auto& node = Library::addToLibrary(parent, std::move(parent_data));
66 for(
const auto& cls : vst.classInfo)
68 registerVSTClass(node, vst, cls);
73 registerVSTClass(parent, vst, vst.classInfo[0]);
85 con(plug, &vst3::ApplicationPlugin::vstChanged,
this,
86 [&plug, &model, node, &parent, reset_plugs] {
87 model.beginRemoveRows(node, 0, parent.childCount());
89 model.endRemoveRows();
92 for(
const auto& vst : plug.vst_infos)
97 model.beginInsertRows(node, 0, k - 1);
99 model.endInsertRows();
Definition: LibraryInterface.hpp:22
Definition: ProcessesItemModel.hpp:45
Definition: score-plugin-vst3/Vst3/ApplicationPlugin.hpp:86
Definition: score-plugin-vst3/Vst3/Library.hpp:14
Definition: ProcessesItemModel.hpp:32
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15
T & applicationPlugin() const
Access a specific application plug-in instance.
Definition: GUIApplicationContext.hpp:69
Definition: score-plugin-vst3/Vst3/ApplicationPlugin.hpp:22