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",
31using BytebeatFunction = void(
double* input,
int size,
int time);
32using BytebeatCompiler = Driver;
33using 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 bool validate(
const QString& txt)
const noexcept;
59 QString prettyName() const noexcept override;
60 void programChanged() W_SIGNAL(programChanged);
62 BytebeatFactory factory;
64 void errorMessage(
int line, const QString& e) W_SIGNAL(errorMessage, line, e);
66 PROPERTY(QString, script READ script WRITE setScript NOTIFY scriptChanged)
68 QString effect() const noexcept override;
69 void loadPreset(const
Process::Preset& preset) override;
70 Process::Preset savePreset() const noexcept override;
72 [[nodiscard]]
Process::ScriptChangeResult reload();
74 std::unique_ptr<BytebeatCompiler> m_compiler;
82EffectProcessFactory_T<Jit::BytebeatModel>::customConstructionData() const noexcept;
86EffectProcessFactory_T<Jit::BytebeatModel>::descriptor(QString d) const noexcept;
89Process::Descriptor EffectProcessFactory_T<Jit::BytebeatModel>::descriptor(
90 const
Process::ProcessModel& d) const noexcept;
98 static constexpr const char* language =
"C++";
109 COMPONENT_METADATA(
"dc4f88ae-ca36-4330-b0e7-8093a1793521")
112 static constexpr bool is_unique =
true;
125 SCORE_COMMAND_DECL(CommandFactoryName(),
EditBytebeat,
"Edit a bytebeat")
137 using Jit::EditBytebeat::EditBytebeat;
Definition DataStreamVisitor.hpp:202
Definition Process/Execution/ProcessComponent.hpp:123
Definition JSONVisitor.hpp:423
Definition Bytebeat.hpp:108
Definition Bytebeat.hpp:124
Definition EffectFactory.hpp:86
Definition EffectFactory.hpp:14
The Process class.
Definition score-lib-process/Process/Process.hpp:62
Definition ScriptEditor.hpp:49
Definition ScriptEditCommand.hpp:16
The id_base_t class.
Definition Identifier.hpp:59
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
@ ScriptEditingSupported
The process is based on user-editable source code (JS, Faust, etc.)
Definition ProcessFlags.hpp:70
Base toolkit upon which the software is built.
Definition Application.cpp:111
Definition ExecutionContext.hpp:196
Definition Process/Execution/ProcessComponent.hpp:93
Definition Bytebeat.hpp:97
Definition ScriptProcess.hpp:14
Definition TimeValue.hpp:21
Definition PropertyCommand.hpp:112