I would like to programmatically parse and search the node tree for specific synths.
s.queryAllNodes
This will print the node tree in the post window, but I am having trouble capturing that reply as a string. Any help in this matter is appreciated!
shiihs
September 19, 2019, 3:20pm
2
My suggestion would be to look at the implementation of queryAllNodes in Server.sc
Apparently it sends an OSC message “/g_dumpTree” to the local server (or “/g_queryTree” for remote server) and then receives the reply via an OSCfunc waiting for a “’/g_queryTree.reply’” OSC message.
scztt
September 20, 2019, 2:38pm
3
Take a look at the NodeSnapshot quark - it does this exact thing.
Xon
September 21, 2019, 10:43pm
4
Hello,
By trying the example in the help of TreeSnapshotView, I’ve got several errors.
Don’t know why exactly…
SC 3.10.3
ERROR: Message ‘server’ not understood.
RECEIVER:
Instance of TreeSnapshot { (0x12677cba8, gc=48, fmt=00, flg=00, set=03)
instance variables [5]
server : instance of Server (0x1219dc6b8, size=30, set=5)
msg : instance of Array (0x126172168, size=26, set=5)
nodes : instance of List (0x1219d94f8, size=1, set=2)
root : instance of GroupSnapshot (0x126372e28, size=4, set=2)
drawFunc : nil
}
ARGS:
PROTECTED CALL STACK:
Meta_MethodError:new 0x1224c3e80
arg this = DoesNotUnderstandError
arg what = nil
arg receiver = TreeSnapshot
Group: 0
Group: 1
Group: 1009
Synth(1010): buzzs
out: 0.0
amp: 0.10000000149012
freq: 146.83238220215
filter: 1.0
Synth(1008): safeClips
limit: 1.0
Meta_DoesNotUnderstandError:new 0x1224c5e40
arg this = DoesNotUnderstandError
arg receiver = TreeSnapshot
Group: 0
Group: 1
Group: 1009
Synth(1010): buzzs
out: 0.0
amp: 0.10000000149012
freq: 146.83238220215
filter: 1.0
Synth(1008): safeClips
limit: 1.0
arg selector = server
arg args = [ ]
Object:doesNotUnderstand 0x121e01c80
arg this = TreeSnapshot
…
Thanks,
Christophe
scztt
September 24, 2019, 8:33pm
5
I just pushed a fix for this, the help should be working now - thanks for the heads up!
You’ll need to do something like this (and recompile) to get the newest:
Quark("https://github.com/scztt/NodeSnapshot.quark.git").update
Xon
September 25, 2019, 10:06pm
6
Many thanks, Scott.
Just for the info, I could not update the Quark via :
Quark(“GitHub - scztt/NodeSnapshot.quark ”).update;
WARNING: Quark NodeSnapshot.quark was not installed using git, cannot update.
but it is ok with :
Quark(“NodeSnapshot”).update;
Quark ‘NodeSnapshot’ updated to version: 0.3.2 tag: tags/0.3.2 refspec: tags/0.3.2
Christophe