2#include <Process/Execution/ProcessComponent.hpp>
3#include <Process/GenericProcessFactory.hpp>
4#include <Process/Process.hpp>
6#include <Control/DefaultEffectItem.hpp>
7#include <Effect/EffectFactory.hpp>
8#include <LV2/Context.hpp>
9#include <Process/Preset.hpp>
11#include <ossia/dataflow/node_process.hpp>
15#include <lilv/lilvmm.hpp>
17#include <score_plugin_lv2_export.h>
28SCORE_PLUGIN_LV2_EXPORT
void clearPluginCache();
33SCORE_PLUGIN_LV2_TEST_EXPORT std::optional<Lilv::Plugin>
34find_lv2_plugin(Lilv::World& world, QString path);
37 , LV2::Model,
"fd5243ba-70b5-4164-b44a-ecb0dcdc0494",
"LV2",
"LV2",
38 Process::ProcessCategory::Other,
"Plugins",
"LV2 plug-in",
"ossia score", {}, {}, {},
39 QUrl(
"https://ossia.io/score-docs/processes/audio-plugins.html#common-formats-vst-vst3-lv2-jsfx"),
40 Process::ProcessFlags::ExternalEffect)
41DESCRIPTION_METADATA(, LV2::Model,
"LV2")
47 SCORE_SERIALIZE_FRIENDS
49 PROCESS_METADATA_IMPL(Model)
54 template <
typename Impl>
55 Model(Impl& vis, QObject* parent)
56 : ProcessModel{vis, parent}
61 QString effect() const noexcept
override {
return m_effectPath; }
63 void setEffect(
const QString& s) { m_effectPath = s; }
65 QString prettyName() const noexcept override;
67 bool hasExternalUI() const noexcept;
69 void loadPreset(const
Process::Preset& preset) override;
71 bool presetChangesPorts(const
Process::Preset&) const noexcept
override
76 std::vector<
Process::Preset> builtinPresets() const noexcept override;
78 const LilvPlugin* plugin{};
82 std::size_t m_controlInStart{};
83 std::size_t m_controlOutStart{};
84 mutable moodycamel::ReaderWriterQueue<Message> ui_events;
85 mutable moodycamel::ReaderWriterQueue<Message> plugin_events;
88 mutable std::atomic_bool uiListening{
false};
89 mutable moodycamel::ReaderWriterQueue<Message>
92 ossia::hash_map<uint32_t, std::pair<Process::ControlInlet*, bool>> control_map;
94 mutable float portValueForState{};
95 ossia::hash_map<uint32_t, Process::ControlOutlet*> control_out_map;
97 ossia::hash_set<uint32_t> sample_rate_ports;
100 float toPlugin(uint32_t port_index,
float v)
const noexcept;
101 float fromPlugin(uint32_t port_index,
float v)
const noexcept;
105 QString m_effectPath;
108 ossia::float_vector fInControls, fOutControls;
111class LV2EffectComponent final
114 W_OBJECT(LV2EffectComponent)
115 COMPONENT_METADATA(
"57f50003-a179-424a-80b1-b9394d73a84a")
118 static constexpr
bool is_unique = true;
120 LV2EffectComponent(LV2::Model& proc, const
Execution::Context& ctx, QObject* parent);
122 void lazy_init() override;
125 writeAtomToUi(uint32_t port_index, uint32_t type, uint32_t size, const
void* body);
126 void writeAtomToUi(uint32_t port_index, const LV2_Atom& atom);
130 QTimer* m_grow_timer{};
131 int m_pool_sample_rate{};
132 std::size_t m_pool_pushed{};
133 std::size_t m_pool_max_requested{};
135 void growVoicePoolTick();
142QString EffectProcessFactory_T<LV2::Model>::customConstructionData() const noexcept;
Definition Process/Execution/ProcessComponent.hpp:131
Definition EffectFactory.hpp:14
The Process class.
Definition score-lib-process/Process/Process.hpp:82
The id_base_t class.
Definition Identifier.hpp:59
Components used for the execution of a score.
Definition PortTap.cpp:24
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Definition Process/Execution/ProcessComponent.hpp:101
Definition Context.hpp:198
Definition Context.hpp:61
Definition TimeValue.hpp:21