TaskProxy:
Filter:
Classes | JITLib > Patterns | Live Coding

TaskProxy : PatternProxy : Pattern : AbstractFunction : Object

event stream reference
Source: Pdef.sc
Subclasses: EventPatternProxy, Tdef

Description

Keeps a reference to a task (time pattern) that can be replaced while playing. It plays on when the old stream ended and a new stream is set and schedules the changes to the beat.

Class Methods

TaskProxy.new(source)

From superclass: PatternProxy

create a new instance with a function (the source). the source should be a routine function (see Tdef) or a pattern of time values.

TaskProxy.default

a default source, if none is given. the default is a loop that does nothing with a 1.0 beat wait time.

TaskProxy.defaultQuant

TaskProxy.defaultQuant = value

set the default quantization value for the class. (default: 1.0). can be a pair [quant, offset]

Inherited class methods

Instance Methods

.source

.source = obj

From superclass: PatternProxy

set the source. If a quantization is given, schedule this change to the next beat the object is a routine function, which is evaluated in a protected way, so that failure will notify the proxy that it has stopped. The object can also be a pattern of time values.

.clear

From superclass: PatternProxy

set the source to nil

.clock

.clock = value

From superclass: PatternProxy

get or set the instance's default clock, used by -play if no other clock is specified. Defaults to TempoClock.default.

.quant

.quant = val

From superclass: PatternProxy

get or set the quantization value. can be a pair [quant, offset]

.condition

.condition = value

From superclass: PatternProxy

provide a condition under which the pattern is switched when a new one is inserted. the stream value and a count is passed into the function. the methods count_(n) simply counts up to n and switches the pattern then

.reset

From superclass: PatternProxy

switch the pattern immediately. (stuck conditions can be subverted by this)

.envir

.envir = value

From superclass: PatternProxy

provide a default environment for the proxy. If given, it is used as an environment for the routine function. When set for the first time, the routine pattern is rebuilt.

.set( ... args)

From superclass: PatternProxy

set arguments in the environment. If there is none, it is created and the routine pattern is rebuilt.

.endless(default)

From superclass: PatternProxy

returns a Prout that plays the proxy endlessly, replacing nil with a default value (1 s. wait time). This allows to create streams that idle on until a new pattern is inserted.

a) using it as stream reference

.source

.source = obj

From superclass: PatternProxy

set the routine function / pattern (internally done by *new(key, obj)

.embedInStream(inval, embed: true, default)

From superclass: PatternProxy

just like any stream, embeds itself in stream

b) using it as EventStreamPlayer

.play(argClock, doReset: false, quant)

starts the TaskProxy and creates a player. if you want to play multiple instances, use .playOnce(clock, protoEvent, quant)

Arguments:

argClock

which clock to use. if nil then use this instance's -clock, which in turn defaults to TempoClock.default.

doReset

A Boolean

quant

can be an array of [quant, phase]

.stop

stops the player

.player

the current player (if the TaskProxy is simply used in other streams this is nil)

.pause

.resume(clock, quant)

.reset

From superclass: PatternProxy

perform player method

.isPlaying

returns true if TaskProxy is running. if a TaskProxy is playing and its stream ends, it will schedule a stream for playing as soon as a new one is assigned to it.

Inherited instance methods

Undocumented instance methods

.align(argQuant)

.asProtected

.buildForProxy(proxy, channelOffset: 0)

From extension in /usr/local/share/SuperCollider/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc

.canPause

.constrainStream(stream, newStream)

.convertFunction(func)

.fork(clock, quant, event)

.hasEnded

.hasEnvir

.hasPlayer

.hasSource

.isActive

.isEventPattern

.isPaused

.playOnce(argClock, doReset: false, quant)

.playQuant

.playQuant = value

.proxyControlClass

From extension in /usr/local/share/SuperCollider/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc

.wakeUp

Examples

a) using TaskProxy as a player

b) embedding TaskProxy into other Tasks / Routines