hey scientific,
The example you mention shows how to control bela's scsynth from your laptop.
Here's another take, using bela's sclang to evaluate the code, so state/objects are living in bela's memory.
// bela remote: forwarding code evaluation to bela's sclang
// 1. this should be in bela's main.scd (or custom startup file):
OSCdef('eval1',{|msg| msg[1].asString.interpret.value.post }, 'eval');
// 2. run this locally in scide (eg. laptop)
this.preProcessor = {|code| NetAddr("bela.local", 57120).sendMsg("/eval", code) };
// check bela ide (http://bela.local) for posting
s.queryAllNodes;
// a safe version of the OSCdef, for untrusted networks
OSCdef('eval1',{|msg|
var code = msg[1].asString;
(code.contains("unixCmd") || code.contains("systemCmd")).not.if({ code.interpret.value.post })
}, 'eval');
• to get back to scide, you need to recompile (reload) sc's class library (command-shift-l)
• the OSCdef above allows valid sclang code coming from anything that can send OSC messages (not just scide)