ExtensionSynthDefAutogui 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.
Control information is retrieved in the following order:
SynthDef:autogui).build method each time a SynthDef is compiled..add).When using SynthDefAutogui(\name) directly, the SynthDef must have been previously added with .add.
The GUI provides, for each arg:
Additional controls:
synth.get() for each arg and updating the GUIscopeOn: false)Create a SynthDefAutogui.
| 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: |
| target |
See SynthDef. Default: nil. |
| args |
See SynthDef. Default: nil. |
| addAction |
See SynthDef. Default: |
| closeOnCmdPeriod |
Boolean. Whether CmdPeriod closes the window. Default: |
| freeOnClose |
Boolean. Whether closing the window frees the synth. Default: |
| window |
An external Window to draw into. Default: nil (creates its own window). |
| step |
Base pixel dimension used to scale the entire GUI. Default: |
| hOff |
Horizontal offset in pixels. Useful when embedding in an external window. Default: |
| vOff |
Vertical offset in pixels. Useful when embedding in an external window. Default: |
| scopeOn |
Boolean. Whether to show a Stethoscope scope. When false, the layout is tightened. Default: |
| 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: |
Build and display the GUI. Separated from init for flexibility (use with onInit: false).
Start the monitoring Task, which polls the Synth's control values and updates the GUI.
Stop the monitoring Task.