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 <Bytebeat/BytebeatCodegen.hpp>
16#include <ossia/dataflow/execution_state.hpp>
17#include <ossia/dataflow/graph_node.hpp>
18#include <ossia/dataflow/node_process.hpp>
27 , Jit::BytebeatModel,
"608beeb7-e5c2-40a5-bd1a-aa7aec80f864",
"Jit",
"Bytebeat",
28 Process::ProcessCategory::Script,
"Audio/Generators",
"Run bytebeat code",
33using BytebeatCompiler = Driver;
38 std::shared_ptr<BytebeatCompiler> compiler;
39 Bytebeat::Function* function{};
45 friend class JitUpdateUI;
46 SCORE_SERIALIZE_FRIENDS
47 PROCESS_METADATA_IMPL(BytebeatModel)
49 W_OBJECT(BytebeatModel)
54 ~BytebeatModel()
override;
61 const QString& script() const noexcept {
return m_text; }
63 void scriptChanged(
const QString& txt) E_SIGNAL(SCORE_PLUGIN_JIT_TEST_EXPORT, scriptChanged, txt);
65 bool validate(
const QString& txt)
const noexcept;
68 Bytebeat::Language language() const noexcept;
69 Bytebeat::OutputMode outputMode() const noexcept;
70 int rate() const noexcept;
72 QString prettyName() const noexcept override;
73 void programChanged() E_SIGNAL(SCORE_PLUGIN_JIT_TEST_EXPORT, programChanged);
75 std::shared_ptr<const BytebeatProgram> program;
77 void errorMessage(
int line, const QString& e) E_SIGNAL(SCORE_PLUGIN_JIT_TEST_EXPORT, errorMessage, line, e);
79 PROPERTY(QString, script READ script WRITE setScript NOTIFY scriptChanged)
81 QString effect() const noexcept override;
82 void loadPreset(const
Process::Preset& preset) override;
83 Process::Preset savePreset() const noexcept override;
86 [[nodiscard]]
Process::ScriptChangeResult reload();
88 bool m_loadingPreset{};
96EffectProcessFactory_T<Jit::BytebeatModel>::customConstructionData() const noexcept;
100EffectProcessFactory_T<Jit::BytebeatModel>::descriptor(QString d) const noexcept;
103Process::Descriptor EffectProcessFactory_T<Jit::BytebeatModel>::descriptor(
104 const
Process::ProcessModel& d) const noexcept;
112 static constexpr const char* language =
"C++";
123 COMPONENT_METADATA(
"dc4f88ae-ca36-4330-b0e7-8093a1793521")
126 static constexpr bool is_unique =
true;
139 SCORE_COMMAND_DECL(CommandFactoryName(),
EditBytebeat,
"Edit a bytebeat")
151 using Jit::EditBytebeat::EditBytebeat;
Definition DataStreamVisitor.hpp:202
Definition Process/Execution/ProcessComponent.hpp:131
Definition JSONVisitor.hpp:423
Definition Bytebeat.hpp:122
Definition Bytebeat.hpp:138
Definition EffectFactory.hpp:86
Definition EffectFactory.hpp:14
The Process class.
Definition score-lib-process/Process/Process.hpp:82
Definition ScriptEditor.hpp:54
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:83
Definition ExecutionContext.hpp:208
Definition Process/Execution/ProcessComponent.hpp:101
Definition Bytebeat.hpp:111
Definition ScriptProcess.hpp:14
Definition TimeValue.hpp:21
Definition PropertyCommand.hpp:112