This shows a simple GUI for a given TreeSnapshot. The tree can be periodically updated. SynthSnapshot views are interactive, and can be used to free synths, change controls, and dump debug traces.
TreeSnapshotView is a Singleton, so global instances can be referenced using the constructor: TreeSnapshotView().front; TreeSnapshotView.close();
See the Singleton help file for more details.
It will work without these installed, but layout and affordances may be incorrect.
The top-level View object (may be nil if it has not been constructed yet)
Bring TreeSnapshotView to the front. Construct a view if it has not yet been created.
Turn on/off automatic updating of the view.
up |
Boolean, to turn autoupdate on or off. |
server |
Create a defalt auto-updating TreeSnapshotView for the default server:
( TreeSnapshotView().front.autoUpdate(); )
TreeSnapshotView's will auto-update synths and groups. Note that the controls of synths can be edited . Clicking on a Group header will hide/show children of that group.
( fork { ~group = Group(); 2.wait; SynthDef(\buzz, { |out = 0, freq = 300, amp = 0.1, filter = 1.7| var sig = LFSaw.ar(freq * [1, 3, 5], 0, amp * [1, 0.5, 0.25]).sum; sig = LPF.ar(sig, freq * filter); Out.ar(out, sig); }).add; [50, 53, 58, 46, 60].midicps.do { |f, i| Synth(\buzz, [ \out: 0, \freq, f, \filter: (i / 2) + 1 ], target:~group); 2.wait; }; } )