SuperCollider CLASSES (extension)

TreeSnapshotView

A GUI for a TreeSnapshot
Source: /home/egor/.local/share/SuperCollider/downloaded-quarks/NodeSnapshot/NodeSnapshot.sc
Inherits from: Singleton : Object

Description

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.

NOTE: TreeSnapshotView uses the M+ font series: http://mplus-fonts.osdn.jp/mplus-outline-fonts/index-en.html

It will work without these installed, but layout and affordances may be incorrect.

 view

Returns:

The top-level View object (may be nil if it has not been constructed yet)

 front

Bring TreeSnapshotView to the front. Construct a view if it has not yet been created.

 update

Update a TreeSnapshotView with a TreeSnapshot

Arguments:

newSnapshot

A TreeSnapshot

 autoUpdate

Turn on/off automatic updating of the view.

Arguments:

up

Boolean, to turn autoupdate on or off.

server

A Server or Group to snapshot.

Class Methods

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

-autoUpdate (up: true, server)

-drawBorder (v, color)

-front

-makeNew

-makeSynthBody (sv)

-makeSynthControl (sv, controlName, value)

-makeSynthControls (sv, cols: 6)

-makeSynthHeader (sv)

-makeSynthOutput (sv, output)

-makeSynthOutputs (synth)

-makeViewGroup (group)

-makeViewNode (node ... args)

-makeViewSynth (synth)

-populateViewGroup (gsv)

-separateSynths

-update (newSnapshot)

-view

-viewMap

-viewsInUse

Examples

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;
    };
}
)