SynthDefAutogui:
Filter:
Classes (extension) | GUI | Convenience

SynthDefAutogui
ExtensionExtension

Automatic GUI creation for SynthDefs and Synths
Location: NOT INSTALLED!

Description

SynthDefAutogui creates a GUI to control and monitor a running Synth, or to play and test a SynthDef, with no previous planning needed.

Its main usage is through two convenience methods added to SynthDef and Synth:

It can also be instantiated explicitly by name — see examples below.

How it works

Control information is retrieved in the following order:

  1. The SynthDef object itself, if passed directly (as when using SynthDef:autogui).
  2. SynthDefStorage, a dictionary populated by an overridden build method each time a SynthDef is compiled.
  3. SynthDescLib, the standard SuperCollider SynthDef registry (populated on .add).

When using SynthDefAutogui(\name) directly, the SynthDef must have been previously added with .add.

The GUI provides, for each arg:

Additional controls:

Class Methods

.new

Create a SynthDefAutogui.

Arguments:

name

Name of the SynthDef to inspect.

aSynth

A running Synth to attach the GUI to. If nil, a new Synth is created from the named SynthDef.

rate

Rate of the bus shown by the embedded Stethoscope. Default: \audio.

target

See SynthDef. Default: nil.

args

See SynthDef. Default: nil.

addAction

See SynthDef. Default: \addToTail.

closeOnCmdPeriod

Boolean. Whether CmdPeriod closes the window. Default: true.

freeOnClose

Boolean. Whether closing the window frees the synth. Default: true.

window

An external Window to draw into. Default: nil (creates its own window).

step

Base pixel dimension used to scale the entire GUI. Default: 50.

hOff

Horizontal offset in pixels. Useful when embedding in an external window. Default: 0.

vOff

Vertical offset in pixels. Useful when embedding in an external window. Default: 0.

scopeOn

Boolean. Whether to show a Stethoscope scope. When false, the layout is tightened. Default: true.

specs

A Dictionary mapping argument names (as Symbols) to ControlSpecs. For any arg not present in the dict, defaults are: minval = 0, maxval = (default * 2).max(1), linear mapping. Default: nil.

onInit

Boolean. If true, the GUI is built immediately on instantiation. Default: true.

Inherited class methods

Instance Methods

.autogui

Build and display the GUI. Separated from init for flexibility (use with onInit: false).

.startMonitor

Start the monitoring Task, which polls the Synth's control values and updates the GUI.

.stopMonitor

Stop the monitoring Task.

Inherited instance methods

Examples