23 #include <type_traits>
31 class SCLangSubprocess;
33 class SendReplyController;
56 static bool IsRunning() {
return subprocess !=
nullptr; }
102 static void SendOSC(
const std::string& path);
103 static void SendOSC(
const std::string& path, std::string tag, ...);
104 static void SendOSCCustom(
const std::string& path,
const lo::Message& m);
108 template <
typename... Q,
typename... Rest>
110 template <
typename... Q>
114 template <
typename... Rest>
134 static std::unique_ptr<SCLangSubprocess> subprocess;
135 static std::set<std::string> installed_templates;
136 static bool osc_debug;
137 static std::unique_ptr<OSC> osc;
138 static void SendReplyCatcher(
int synth_id,
int reply_id,
float value);
139 static void ProcessMIDIInput(lo::Message);
140 static std::map<std::pair<int,int>, std::weak_ptr<SendReplyController>> sendreply_map;
141 static int sendreply_id;
144 template <
typename... T>
149 template <
typename... Q,
typename... Rest>
151 static_assert(
is_nonempty<Q...>::value,
"If you wish to use SendOSCWithReply with no return types, use SendOSCWithEmptyReply instead.");
154 r.Return( UnpackLOMessage<Q...>(msg,0) );
158 template <
typename... Q>
160 static_assert(
is_nonempty<Q...>::value,
"If you wish to use SendOSCWithReply with no return types, use SendOSCWithEmptyReply instead.");
163 r.Return( UnpackLOMessage<Q...>(msg,0) );
167 template <
typename... Rest>
static LateReturn InstallTemplate(const std::shared_ptr< ModuleTemplate > templ)
static Signal< bool, std::string > on_start_completed
Definition: SCLang.hpp:73
static void SetOSCDebug(bool enabled)
static Signal< std::string > on_line_received
Definition: SCLang.hpp:70
static Signal< bool > on_server_started
Definition: SCLang.hpp:76
static void DebugQueryInstalled()
static void QueryAllNodes()
static void SendOSCCustom(const std::string &path, const lo::Message &m)
static LateReturn< Q...> SendOSCWithReply(const std::string &path, Rest...args)
Definition: SCLang.hpp:150
const Relay & Return(Types...args) const
Definition: LateReturn.hpp:437
static bool ready
Definition: SCLang.hpp:132
static LateReturn< lo::Message > SendOSCWithLOReply(const std::string &path)
static LateReturn< lo::Message > SendOSCCustomWithLOReply(const std::string &path, const lo::Message &m)
Definition: LateReturn.hpp:37
static void SendOSC(const std::string &path)
static bool WasInstalled(const std::string &id)
static LateReturn SendOSCWithEmptyReply(const std::string &path, Rest...args)
Definition: SCLang.hpp:168
static void PollSubprocess()
Definition: SCLang.hpp:45
static Signal< MidiMessage > on_midi_message_received
Definition: SCLang.hpp:97
static Signal< int, std::string > on_start_progress
Definition: SCLang.hpp:80
Definition: SCLang.hpp:145
Definition: SCLang.hpp:36
static int RegisterSendReply(int synth_id, std::weak_ptr< SendReplyController >)
SCLang(std::string t)
Definition: SCLang.hpp:37
Definition: Alertable.hpp:26
static bool IsRunning()
Definition: SCLang.hpp:56
Definition: LateReturn.hpp:35
static void UnregisterSendReply(int synth_id, int reply_id)
static void SendInstruction(std::string instr)
Definition: Exception.hpp:29
static LateReturn< Q...> SendOSCCustomWithReply(const std::string &path, const lo::Message &m)
Definition: SCLang.hpp:159