PHSuse (PHelpSynthUse) defines Pbind(s) for using synth values of a HS
Part of: miSCellaneous
Inherits from: Object
Defines Pbind(s) which, when played, can use values of a synth derived from HS's synth definition. Playing a PHSuse is just an option for using an already playing help synth of a HS, which requires PHS first. See Working with HS and HSpar, paragraph "Working Scheme".
See also: Working with HS and HSpar, HS, PHS, PHSplayer, PHSusePlayer
Some Important Issues
Creation / Class Methods
*new (helpSynth, dur1, pbindData1, ... , durN, pbindDataN)
Creates a new PHSuse object.
helpSynth - A HS object.
dur i - Duration value or pattern / stream of durations for corresponding Pbind(s).
pbindData i - A collection of Pbind pairs or a collection of Pbind pair collections,
defining possibly several Pbinds with same event timing.
Status control
play(clock, quant)
A PHSusePlayer object is instantiated and started using the TempoClock clock.
The Quant object quant lets the player step into the quantization as soon as possible,
with respect to the necessary latency. The PHSusePlayer can be stopped and resumed with options.
Examples
(
s = Server.local;
s.boot;
)
// two Pbinds getting values for pitches from a single HS
h = HS(s, { |freq = 0.5, dev = 10, center = 65| LFDNoise3.kr(freq, dev, center) });
// define Pbinds via PHS and PHSuse separately,
// choose Quant object that allows synchronization
(
u = PHS(h, nil, // default help synth args
0.15, [ \midinote, Pkey(\val) + [-5, 0], \amp, 0.065 ]);
v = PHSuse(h, 0.15,
[ \midinote, 130 - Pkey(\val) + [0, 5] /* mirror at center frequency */,
\amp, Pwrand([0.03, 0.07], [0.7, 0.3], inf) ]);
c = TempoClock(1);
q = Quant(0.3);
)
// start first player
x = u.play(c,q);
// "stepping in" with second player at (with respect to latency) next possible time on grid
y = v.play(c,q);
// stop x, help synth still playing, producing values for y
x.stop;
// define and play another PHSuse
(
w = PHSuse(h, 0.15,
[ \midinote, 130 - Pkey(\val) + [0, 5] + Pwhite(7.0, 10.0) /* mirror at center frequency + random add */,
\amp, Pwrand([0.03, 0.07], [0.7, 0.3], inf) ]);
z = w.play(c,q);
)
// resume x
x.play(c,q);
// freeing the PHSplayer also stops all "related" PHSusePlayers and frees the HS
x.free;