Skip to content

Commit

Permalink
documentation links
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGenillier committed Aug 22, 2024
1 parent 7e580ac commit f04b5b3
Show file tree
Hide file tree
Showing 30 changed files with 51 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/plugins/score-lib-process/Process/ProcessMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <score/tools/std/Optional.hpp>

#include <QStringList>
#include <QUrl>

#include <cinttypes>

Expand Down Expand Up @@ -42,6 +43,7 @@ struct Descriptor
QStringList tags;
std::optional<std::vector<Process::PortType>> inlets;
std::optional<std::vector<Process::PortType>> outlets;
QUrl documentationLink;
};
class Descriptor_k;
}
Expand All @@ -50,7 +52,7 @@ class Descriptor_k;

#define PROCESS_METADATA( \
Export, Model, Uuid, ObjectKey, PrettyName, CategoryEnum, Category, Desc, Author, \
Tags, InputSpec, OutputSpec, Flags) \
Tags, InputSpec, OutputSpec, DocumentationLink, Flags) \
MODEL_METADATA(Export, Process::ProcessModel, Model, Uuid, ObjectKey, PrettyName) \
CATEGORY_METADATA(Export, Model, Category) \
TAGS_METADATA(Export, Model, Tags) \
Expand All @@ -62,7 +64,7 @@ class Descriptor_k;
{ \
static const ::Process::Descriptor k{PrettyName, CategoryEnum, Category, \
Desc, Author, Tags, \
InputSpec, OutputSpec}; \
InputSpec, OutputSpec, DocumentationLink};\
return k; \
} \
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ PROCESS_METADATA(
Process::ProcessCategory::Automation, "Automations", "Automation on a single value",
"ossia score", (QStringList{"Curve", "Automation"}), {},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl("https://ossia.io/score-docs/in-depth/automations.html"),
Process::ProcessFlags::SupportsTemporal)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ PROCESS_METADATA(
"Color gradient. Operates in Lab color space.", "ossia score",
(QStringList{"Curve", "Automation", "Color"}), {},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl("https://ossia.io/score-docs/processes/gradient.html#color-automation"),
Process::ProcessFlags::SupportsTemporal)
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ PROCESS_METADATA(
(QStringList{}), // Tags
{}, // Inputs
{}, // Outputs
QUrl("https://ossia.io/score-docs/processes/controlsurface.html#control-surface-process"), // DocumentationLink
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::ControlSurface)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-gfx/Gfx/Filter/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ PROCESS_METADATA(
(QStringList{"shader", "gfx"}), // Tags
{}, // Inputs
{}, // Outputs
QUrl("https://isf.video"),
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::ControlSurface // Flags
)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-gfx/Gfx/Images/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ PROCESS_METADATA(
(QStringList{"gfx", "image"}), // Tags
{}, // Inputs
{}, // Outputs
QUrl("https://ossia.io/score-docs/processes/image.html#image-process"),
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::ControlSurface // Flags
)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-gfx/Gfx/Text/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ PROCESS_METADATA(
(QStringList{"gfx", "text"}), // Tags
{}, // Inputs
{}, // Outputs
QUrl(""),
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::ControlSurface // Flags
)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-gfx/Gfx/Video/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PROCESS_METADATA(
(QStringList{"gfx", "video"}), // Tags
{}, // Inputs
{}, // Outputs
QUrl("https://ossia.io/score-docs/processes/video.html#video"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot
| Process::ProcessFlags::HandlesLooping // Flags
)
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-jit/Bytebeat/Bytebeat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BytebeatModel;
PROCESS_METADATA(
, Jit::BytebeatModel, "608beeb7-e5c2-40a5-bd1a-aa7aec80f864", "Jit", "Bytebeat",
Process::ProcessCategory::Script, "Audio/Generators", "Run bytebeat code",
"ossia score", QStringList{}, {}, {}, Process::ProcessFlags::SupportsAll)
"ossia score", QStringList{}, {}, {}, QUrl("https://ossia.io/score-docs/processes/bytebeat.html#what-is-bytebeat"), Process::ProcessFlags::SupportsAll)
namespace Jit
{
struct Driver;
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/score-plugin-jit/JitCpp/AvndJit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ struct Driver;
PROCESS_METADATA(
, AvndJit::Model, "193686f2-1f3b-45ce-9251-2e79ca06933b", "Jit", "Avendish",
Process::ProcessCategory::Script, "Script", "Avendish compilation process",
"ossia score", QStringList{}, {}, {}, Process::ProcessFlags::SupportsAll)
"ossia score", QStringList{}, {}, {},
QUrl("https://ossia.io/score-docs/development/plugins/plugins-with-avendish.html#avendish-documentation"),
Process::ProcessFlags::SupportsAll)
namespace AvndJit
{
using NodeCompiler = Jit::Driver;
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/score-plugin-jit/JitCpp/JitModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class JitEffectModel;
PROCESS_METADATA(
, Jit::JitEffectModel, "0a3b49d6-4ce7-4668-aec3-9505b6ee1a60", "Jit", "JIT",
Process::ProcessCategory::Script, "Script", "JIT compilation process", "ossia score",
QStringList{}, {}, {}, Process::ProcessFlags::SupportsAll)
QStringList{}, {}, {},
QUrl("https://ossia.io/score-docs/processes/cpp_jit.html#c-jit"),
Process::ProcessFlags::SupportsAll)
namespace Jit
{
struct Driver;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-jit/Texgen/Texgen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ PROCESS_METADATA(
, Jit::TexgenModel, "b9a20181-2925-4ade-925e-a2fd05fcbf9b", "Jit",
"Texture generator", Process::ProcessCategory::Script, "Visuals",
"Generate a texture", "ossia score", QStringList{}, {}, {},
QUrl("https://ossia.io/score-docs/processes/texgen.html#texture-generator"),
Process::ProcessFlags::SupportsAll)
namespace Jit
{
Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-js/JS/JSProcessMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ PROCESS_METADATA(
"Javascript", Process::ProcessCategory::Script, "Script",
"Javascript code. See the documentation at https://ossia.io.", "ossia score",
(QStringList{"Script", "JS"}), {}, {},
QUrl("https://ossia.io/score-docs/processes/javascript.html#javascript-support"),
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::PutInNewSlot
| Process::ProcessFlags::ControlSurface)
15 changes: 15 additions & 0 deletions src/plugins/score-plugin-library/Library/ProcessWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class InfoWidget final : public QScrollArea
m_description.setWordWrap(true);
lay->addWidget(&m_tags);
m_tags.setWordWrap(true);
lay->addWidget(&m_documentationLink);
setVisible(false);
}

Expand All @@ -51,6 +52,7 @@ class InfoWidget final : public QScrollArea
m_description.setText(QString{});
m_io.setText(QString{});
m_tags.setText(QString{});
m_documentationLink.clear();

if(d)
{
Expand Down Expand Up @@ -95,6 +97,18 @@ class InfoWidget final : public QScrollArea
{
m_tags.setText(tr("Tags: ") + desc.tags.join(", "));
}

if(!desc.documentationLink.isEmpty())
{
QString linkText = "Explore the documentation";
QString iconPath = ":/icons/undock_on.png";
QString iconHtml = "<img src=\"" + iconPath + "\" width=\"16\" height=\"16\" style=\"vertical-align:middle;\" />";
QString fullLink = "<a href=\"" + desc.documentationLink.toString() + "\">" + linkText + " " + iconHtml + "</a>";
m_documentationLink.setTextFormat(Qt::RichText);
m_documentationLink.setText(fullLink);
m_documentationLink.setOpenExternalLinks(true);
}

return;
}
}
Expand All @@ -107,6 +121,7 @@ class InfoWidget final : public QScrollArea
QLabel m_description;
QLabel m_author;
QLabel m_tags;
QLabel m_documentationLink;
};

ProcessWidget::ProcessWidget(const score::GUIApplicationContext& ctx, QWidget* parent)
Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-lv2/LV2/EffectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Model;
PROCESS_METADATA(
, LV2::Model, "fd5243ba-70b5-4164-b44a-ecb0dcdc0494", "LV2", "LV2",
Process::ProcessCategory::Other, "Plugins", "LV2 plug-in", "ossia score", {}, {}, {},
QUrl("https://ossia.io/score-docs/processes/audio-plugins.html#common-formats-vst-vst3-lv2-jsfx"),
Process::ProcessFlags::ExternalEffect)
DESCRIPTION_METADATA(, LV2::Model, "LV2")
namespace LV2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ PROCESS_METADATA(
"ossia score", (QStringList{"Curve", "Mapping"}),
{std::vector<Process::PortType>{Process::PortType::Message}},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl("https://ossia.io/score-docs/processes/2Dspline.html#generating-a-curve"),
Process::ProcessFlags::SupportsLasting)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-media/Media/Merger/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ PROCESS_METADATA(
"Merge multiple audio inputs into a single audio output", "ossia score", {},
{std::vector<Process::PortType>{Process::PortType::Audio}},
{std::vector<Process::PortType>{Process::PortType::Audio}},
QUrl("https://ossia.io/score-docs/processes/audio-utilities.html#stereo-merger"),
Process::ProcessFlags::SupportsLasting)

UNDO_NAME_METADATA(EMPTY_MACRO, Media::Merger::Model, "Stereo Merger")
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PROCESS_METADATA(
, Media::Metro::Model, "7a20cee3-87da-42a5-9483-975aa33a7a65", "Metro", "Metronome",
Process::ProcessCategory::Generator, "Audio/Utilities",
"Generates sound according to the current beat", "ossia score", {}, {},
{std::vector<Process::PortType>{Process::PortType::Audio}},
{std::vector<Process::PortType>{Process::PortType::Audio}}, QUrl("https://ossia.io/score-docs/processes/audio-utilities.html#metronome"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot)

UNDO_NAME_METADATA(EMPTY_MACRO, Media::Metro::Model, "Metronom")
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ PROCESS_METADATA(
, Media::Sound::ProcessModel, "63174570-d608-44bf-a9cb-e6f5a11f73cc", "Sound",
"Sound file", Process::ProcessCategory::MediaSource, "Audio", "Reads a sound file",
"ossia score", {}, {}, {std::vector<Process::PortType>{Process::PortType::Audio}},
QUrl("https://ossia.io/score-docs/processes/soundfile.html#sound-file-process"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot
| Process::ProcessFlags::HandlesLooping)

Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-media/Media/Step/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PROCESS_METADATA(
"Step sequencer", Process::ProcessCategory::Generator, "Control/Generators",
"Generates messages rhytmically on a given scale", "ossia score", {}, {},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl("https://ossia.io/score-docs/processes/step.html#step-sequencer"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot
| Process::ProcessFlags::ControlSurface)

Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-midi/Midi/MidiProcessMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ PROCESS_METADATA(
"Midi", "Piano roll", Process::ProcessCategory::MediaSource, "Midi",
"MIDI note playback", "ossia score", {}, {},
{std::vector<Process::PortType>{Process::PortType::Midi}},
QUrl("https://ossia.io/score-docs/processes/piano-roll.html#piano-roll"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ PROCESS_METADATA(
"49047204-5c1e-4b54-9f43-2b583f664b2e", "Pattern", "Pattern sequencer",
Process::ProcessCategory::MediaSource, "Midi", "", "ossia score", {}, {},
{std::vector<Process::PortType>{Process::PortType::Midi}},
QUrl("https://ossia.io/score-docs/processes/patternist.html#midi-pattern-sequencer"),
Process::ProcessFlags::SupportsLasting | Process::ProcessFlags::PutInNewSlot)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-nodal/Nodal/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ PROCESS_METADATA(
(QStringList{}), // Tags
{}, // Inputs
{}, // Outputs
QUrl(""), // Documentation link (if existing)
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-pd/Pd/PdMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ PROCESS_METADATA(
, Pd::ProcessModel, "7b3b18ea-311b-40f9-b04e-60ec1fe05786", "PureData", "PureData",
Process::ProcessCategory::Script, "Plugins", "Embed PureData in score",
"ossia and the Pd team", {}, {}, {},
QUrl("https://ossia.io/score-docs/processes/puredata.html#pure-data-support"),
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::PutInNewSlot
| Process::ProcessFlags::ControlSurface)
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ PROCESS_METADATA(
Process::ProcessCategory::Automation, "Automations",
"Tempo curve - only one per interval", "ossia score",
(QStringList{"Curve", "Automation"}), {}, {},
QUrl("https://ossia.io/score-docs/processes/tempo.html#tempo"),
Process::ProcessFlags::SupportsTemporal)

namespace Scenario
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ PROCESS_METADATA(
"de035912-5b03-49a8-bc4d-b2cba68e21d9", "Scenario", "Scenario",
Process::ProcessCategory::Structure, "Structure", "Temporal structure",
"ossia score", {}, {}, {},
QUrl("https://ossia.io/score-docs/processes/scenario.html#scenario"),
Process::ProcessFlags::SupportsTemporal | Process::ProcessFlags::PutInNewSlot)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-spline/Spline/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ PROCESS_METADATA(
"Automation following a 2D curve", "ossia score",
(QStringList{"Curve", "Automation", "2D"}), {},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl("https://ossia.io/score-docs/processes/2Dspline.html#2d-spline-x-y-automation"),
Process::ProcessFlags::SupportsLasting)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ PROCESS_METADATA(
"Automation following a 3D curve", "ossia score",
(QStringList{"Curve", "Automation", "3D"}), {},
{std::vector<Process::PortType>{Process::PortType::Message}},
QUrl(""),
Process::ProcessFlags::SupportsLasting)
1 change: 1 addition & 0 deletions src/plugins/score-plugin-vst/Vst/EffectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PROCESS_METADATA(
, vst::Model, "BE8E6BD3-75F2-4102-8895-8A4EB4EA545A", "VST", "VST",
Process::ProcessCategory::Other, "Plugins", "VST plug-in",
"VST is a trademark of Steinberg Media Technologies GmbH", {}, {}, {},
QUrl("https://ossia.io/score-docs/processes/audio-plugins.html#controlling-vst-parameters"),
Process::ProcessFlags::ExternalEffect)
UUID_METADATA(, Process::Port, vst::ControlInlet, "e523bc44-8599-4a04-94c1-04ce0d1a692a")
DESCRIPTION_METADATA(, vst::Model, "")
Expand Down
1 change: 1 addition & 0 deletions src/plugins/score-plugin-vst3/Vst3/EffectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ PROCESS_METADATA(
, vst3::Model, "4cc30435-3237-4e94-a79e-1c2bd6b724a1", "VST 3", "VST 3",
Process::ProcessCategory::Other, "Plugins", "VST 3 plug-in",
"VST is a trademark of Steinberg Media Technologies GmbH", {}, {}, {},
QUrl("https://ossia.io/score-docs/processes/audio-plugins.html#common-formats-vst-vst3-lv2-jsfx"),
Process::ProcessFlags::ExternalEffect)
UUID_METADATA(
, Process::Port, vst3::ControlInlet, "82b24dd8-fbc0-43a6-adfa-7bb29ca48660")
Expand Down

0 comments on commit f04b5b3

Please sign in to comment.