2 #include <Process/Execution/ProcessComponent.hpp>
3 #include <Process/GenericProcessFactory.hpp>
4 #include <Process/Process.hpp>
5 #include <Process/ProcessMetadata.hpp>
6 #include <Process/Script/ScriptEditor.hpp>
8 #include <Scenario/Commands/ScriptEditCommand.hpp>
10 #include <Control/DefaultEffectItem.hpp>
11 #include <Effect/EffectFactory.hpp>
12 #include <JitCpp/EditScript.hpp>
14 #include <ossia/dataflow/execution_state.hpp>
15 #include <ossia/dataflow/graph_node.hpp>
16 #include <ossia/dataflow/node_process.hpp>
25 , Jit::BytebeatModel,
"608beeb7-e5c2-40a5-bd1a-aa7aec80f864",
"Jit",
"Bytebeat",
26 Process::ProcessCategory::Script,
"Audio/Generators",
"Run bytebeat code",
27 "ossia score", QStringList{}, {}, {}, QUrl(
"https://ossia.io/score-docs/processes/bytebeat.html#what-is-bytebeat"), Process::ProcessFlags::SupportsAll)
31 using BytebeatFunction = void(
double* input,
int size,
int time);
32 using BytebeatCompiler = Driver;
33 using BytebeatFactory = std::function<BytebeatFunction>;
37 friend class JitUpdateUI;
38 SCORE_SERIALIZE_FRIENDS
39 PROCESS_METADATA_IMPL(BytebeatModel)
41 W_OBJECT(BytebeatModel)
46 ~BytebeatModel()
override;
53 const QString& script() const noexcept {
return m_text; }
55 void scriptChanged(
const QString& txt) W_SIGNAL(scriptChanged, txt);
57 static constexpr
bool hasExternalUI() noexcept {
return true; }
59 bool validate(
const QString& txt)
const noexcept;
61 QString prettyName() const noexcept override;
62 void programChanged() W_SIGNAL(programChanged);
64 BytebeatFactory factory;
66 void errorMessage(
int line, const QString& e) W_SIGNAL(errorMessage, line, e);
68 PROPERTY(QString, script READ script WRITE setScript NOTIFY scriptChanged)
70 QString effect() const noexcept override;
71 void loadPreset(const
Process::Preset& preset) override;
72 Process::Preset savePreset() const noexcept override;
74 [[nodiscard]]
Process::ScriptChangeResult reload();
76 std::unique_ptr<BytebeatCompiler> m_compiler;
84 EffectProcessFactory_T<Jit::BytebeatModel>::customConstructionData() const noexcept;
88 EffectProcessFactory_T<Jit::BytebeatModel>::descriptor(QString d) const noexcept;
96 static constexpr
const char* language =
"C++";
108 COMPONENT_METADATA(
"dc4f88ae-ca36-4330-b0e7-8093a1793521")
111 static constexpr
bool is_unique =
true;
124 SCORE_COMMAND_DECL(CommandFactoryName(),
EditBytebeat,
"Edit a bytebeat")
136 using Jit::EditBytebeat::EditBytebeat;
Definition: DataStreamVisitor.hpp:202
Definition: Process/Execution/ProcessComponent.hpp:119
Definition: JSONVisitor.hpp:423
Definition: Bytebeat.hpp:107
Definition: Bytebeat.hpp:123
Definition: DefaultEffectItem.hpp:26
Definition: EffectFactory.hpp:66
Definition: EffectFactory.hpp:14
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ScriptEditor.hpp:42
Definition: ScriptEditCommand.hpp:18
The id_base_t class.
Definition: Identifier.hpp:57
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ExecutionContext.hpp:76
Definition: Process/Execution/ProcessComponent.hpp:89
Definition: Bytebeat.hpp:95
Definition: ScriptProcess.hpp:14
Definition: TimeValue.hpp:21
Definition: PropertyCommand.hpp:112