HS with VarGui:
Filter:
miSCellaneous_lib/Tutorials (extension) | Libraries > miSCellaneous > HS and HSpar | Libraries > miSCellaneous > GUI | Streams-Patterns-Events > HS and HSpar

HS with VarGui
ExtensionExtension

using HS / HSpar with VarGui

Description

It is recommended to get familiar with the concepts of the HS / PHS and HSpar / PHSpar classes before combining them with VarGui, see Guide_to_HS_and_HSpar for an overview.

Alternative control setups with event patterns and VarGui examples are discussed in Event_patterns_and_LFOs.

Differences to other control setups with event patterns and VarGui

Instances of HS and PHS are hybrid objects in the sense that their functionality is not interchangeable with that of some (one might think at a first glance) related objects (Synths and Pbinds). A HS contains a SynthDef but will also hold Synths derived thereof. A PHS holds Pbind pairs but, when played, instantiates two EventStreamPlayers to be synchronized, also taking control over the used HS. A played PHSpar even controls a third player switching between running control synths.

On the other hand VarGui is already prepared to accept synths / synth definitions and pbinds / eventstream players / tasks functions / tasks for generating synth and stream players. For plugging these concepts together it seems practical to use objects (resp. introduce adapting ones) that fit into what's already there. This can be achieved by two methods:

  1. .newPaused, applicable to PHS / PHSpar makes the used HS / HSpar generate a new paused Synth (or possibly several in case of PHSpar). Synths are returned by the method and can be passed to VarGui, which automatically detects their derivation from HS / HSpar and adapts gui functionality.
  2. .asTask, applicable to PHS / PHSpar and PHSuse / PHSparUse returns a wrapper Task for compound players of the PHS family. Playing and stopping the wrapper Task invokes playing and stopping behaviour of the underlying compound players, per default also taking control over playing and stopping the help synth(s).

An alternative approach to link HS and HSpar with VarGui is shown in Ex.3.

 

Ex.1a: HS / PHS

 

Ex.1b: HS / PHS and PHSuse

 

Ex.2a: HSpar / PHSpar

 

Ex.2b: HSpar / PHSpar and PHSparUse

 

Ex.2c: HSpar / PHSpar and PHSparUse with switch pattern

 

Ex.3: Help Synths not passed explicitely

This is an alternative approach if syncing control synths and streams is not important - whereas resetting control synths becomes an option.