HS:
Filter:
miSCellaneous_lib/Classes (extension) | Libraries > miSCellaneous > HS and HSpar | Streams-Patterns-Events > HS and HSpar

HS
ExtensionExtension

object for use of synth values in the language by event patterns

Description

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.

Class Methods

.new

Creates a new HS object.

Arguments:

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.

Discussion:

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 [].

Instance Methods

.demandLatency

Set or get latency of help synth in seconds. Defaults to 0.15.

.respondLatency

Set or get time (in seconds) given to the response to be received by the client on time. Defaults to 0.15.

.postOSC

Set or get the flag that defines whether OSC messages should be posted or not. Boolean. Defaults to false.

.granularity

Set or get the (Integer) number of time grains per second, denoting the quantization for bookkeeping. Defaults to 200.

.inputCheck

Set or get the flag that defines whether input data should be checked. Boolean. Defaults to true.

.listen

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.

Arguments:

num

Integer. Number of trigger synths.

latency

Float. Latency in seconds.

.play

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.

Arguments:

args

Synth args.

latency

Float. Latency in seconds.

.clearBookkeeping

Cleanup OSC bookkeeping.

.stop

Free the playing help synth and cleanup OSC bookkeeping.

.sleep

Free the listening trigger synths.

.busFree

Deallocate the bus.

.free

Free all related PHSplayers / PHSusePlayers, then stop, sleep and busFree.

NOTE: stop and free will normally be called by the respective player methods, see PHSplayer.

Examples