VP(int) -- VoicerProxy -- prNew

A Voicer GUI is not actually connected directly to its model (which is the Voicer itself). In normal use, it silently creates a VoicerProxy object. This enables you to reuse the Voicer GUI for a different Voicer, simply by changing the target of the proxy.

The example GUI design creates an array of empty Voicer GUIs that can be used for different Voicers, or process parameters, at different times in a performance. The proxies are stored in the VP class. At any time, you can chuck a VC into the VP and the display will update automatically.

You can also chuck BPs into VPs:

// set the BP's event to use the Voicer object directly

BP(\abc) => VC(\synth);

// set the BP's event to use the VoicerProxy

// the proxy relays method calls to its current voicer

// so you can change the sound of the process by changing the proxy

VC(\synth) => VP(0);

BP(\abc) => VC(\synth);

Because VP requires explicit creation using prNew, you must initialize the VP like this before use.

VoicerProxy.new => VP.prNew(0);

There is a short form to instantiate a Voicer and place it into a proxy:

Fact(\ghost) => VP(0);

// equivalent to:

Fact(\ghost) => VC(\ghost) => VP(0);

Typical code fragment to generate a panel of reusable Voicer GUIs. You only have to do this once when loading up for a live set!

~masterLayout = MultiPageLayout("chucking demo").front;

// voicerproxies -- creating this gui is time sensitive

Routine({

6.do({ |i|

VoicerProxy.new => VP.prNew(i);

3.do({ VP(i).v.addControlProxy(nil, true) });

VP(i).v.gui(~voicerFlow);

0.2.wait;

~voicerFlow.recursiveResize;

0.2.wait;

});

}).play(AppClock);