VarGui allows combined control of Synths, Pbinds / EventStreamPlayers and Tasks in one GUI. Many of its options though may not be relevant for most usages, also control specs were to be given directly (changed with v0.5). Shortcut build methods take advantage of SynthDef controlspec metadata, if defined (or global ControlSpecs), and autogenerate Pbinds for sequencing. Controls and Pbinds can be customized with options. Main tools are the methods sVarGui ( synth ), pVarGui ( pattern ) and compound builders spVarGui / psVarGui. Methods sVarGui / pVarGui, applied to a single Symbol / String, produce a VarGui for one or more Synth(s) or Pbind(s) based on the referred single SynthDef ( Ex.1a, Ex.1b, Ex.2a, Ex.2b ). Both methods also apply to collections of SynthDef Symbols / Strings ( Ex.3a, Ex.3b ), whereas spVarGui and psVarGui, builders of mixed Synth / Pbind VarGuis, expect collections of two items which may be Symbols / Strings or collections of Symbols / Strings ( Ex.3c ). Examples are using Patterns from dynamic scope PLx_suite for conveniently refering to environmental variables.
SynthDef with defined controlspec metadata. The specs can be stored as ControlSpecs or Arrays, may also be Symbols / Strings refering to the global dictionary of Specs (Spec.specs). It's only convention to store specs under the key \specs, it can be anything else, and nothing prevents you from storing more than one dictionary of ControlSpecs per SynthDef - the VarGui shortcut methods have a metaKey arg (default: \specs) which determines where to lookup in the metadata dictionary.
Controlling Pbinds / EventStreamPlayers with VarGui is based on (a) the setting of environmental variables and (b) the proper definition of Pbinds with Patterns of PLx_suite or Patterns with functional code ( Event_patterns_and_Functions ) so that EventStreamPlayers get the updated variable values in the following events.
Basic example of a Pbind to get envir values:
Especially when based on a SynthDef with a large number of args writing a Pbind can be lengthy, moreover redundant if there are many pbind pairs of the form
The pVarGui method is going the opposite way: Pbind pairs get this most simple form for all args with metadata or global ControlSpecs defined, though it's possible to exclude keys and add respectively replace customized pairs before and after the automatically generated ones. All you need is a SynthDef that is suited for Pbind sequencing (known to SynthDescLib by being added, properly defined Envelopes).
Automatic Pbind generation in VarGui shortcut builds is especially saving typing if SynthDefs have a lot of args and controlspec metadata defined.
To control Synths or Pbinds / EventStreamPlayers derived from more than one SynthDef sVarGui and pVarGui can be applied to collections.
Shortcut methods also take Functions, that should return args in a valid form. This can be used for defining controls in different ranges in combination with num. See examples above.
SequenceableCollection: -sVarGui
SequenceableCollection: -pVarGui
SequenceableCollection: -spVarGui
SequenceableCollection: -psVarGui
In most cases you won't need this, except for reloading customized sequencing VarGuis ( 6 ). For special arrangements methods for making specdata and Pbinds of appropriate Pfuncs can be used for customizing control with direct VarGui instantiation. These methods take args in the same way as sVarGui and pVarGui.
A VarGui's slider state can be saved via save button and dialog. Loading is straightforward with Synths. You just have to give the correct path and synth arg (which maybe has to be an array).
VarGui only saves slider states, not the Pbind structure (would open a can of worms). So if you had a customized Pbind in the original setup you'd have to pass an appropriate Pbind together with load. This can also be a Pbind other than in the original setup. But if you want to restore you can nearly copy the input of the original cutomization into the pbindmaker method pfuncPbinds ( 5b ).