To be used in connection with PHS / PHSuse to play event patterns using synth values. Holds a singular synth definition, keeps track of OSC traffic when PHS / PHSuse are played. For using several help synths in parallel or setting controllers of a singular help synth see HSpar and related.
Creates a new HS object.
server |
Must be running server. |
ugenFunc |
Function that defines the synth. |
demandLatency |
Latency of help synth in seconds. Default value 0.15. |
respondLatency |
Time in seconds, given to the response to be received by the client on time. Default value 0.15. |
postOSC |
Boolean for posting of (server to client) OSC messages. Defaults to false. |
granularity |
Time grains per second, quantization for bookkeeping. Defaults to 200. |
inputCheck |
Boolean for checking input data. Defaults to true. |
A PHS, like a Pbind, defines event stream behaviour, only durations are given separately. Here values are demanded just by one stream with constant duration, but more than one duration pattern per HS and more than one Pbind per duration pattern may be defined - see the PHS help file for examples.
The play method of a PHS creates a PHSplayer which plays a synth from HS's synth definition, synth values are accessible within the PHS definition by the variable ~val
, e.g. by Pkey(\val)
. If HS's synthdef has no args, this must be specified in the PHS by nil
or []
.
Set or get latency of help synth in seconds. Defaults to 0.15.
Set or get time (in seconds) given to the response to be received by the client on time. Defaults to 0.15.
Set or get the flag that defines whether OSC messages should be posted or not. Boolean. Defaults to false.
Set or get the (Integer) number of time grains per second, denoting the quantization for bookkeeping. Defaults to 200.
Set or get the flag that defines whether input data should be checked. Boolean. Defaults to true.
Make HS ready to poll values from a synth, demanded by possibly more than one stream. Therefore num trigger synths are run, ready to receive triggers for sending help synth values back to client, but a synth from HS's ugenFunc definition is not yet playing after that. If PHS / PHSuse are played there is no need to call listen explicitely.
num |
Integer. Number of trigger synths. |
latency |
Float. Latency in seconds. |
Play a synth derived from HS's ugenFunc definition. HS must already be listening. If PHS / PHSuse are played there is no need to call play explicitely.
args |
Synth args. |
latency |
Float. Latency in seconds. |
Cleanup OSC bookkeeping.
Free the playing help synth and cleanup OSC bookkeeping.
Free the listening trigger synths.
Deallocate the bus.
Free all related PHSplayers / PHSusePlayers, then stop, sleep and busFree.