Classes | JITLib > Patterns | Live Coding

EventPatternProxy : TaskProxy : PatternProxy : Pattern : AbstractFunction : Object

event stream reference
Source: Pdef.sc
Subclasses: Pdef


Keeps a reference to a stream that can be replaced while in use.

Class Methods


From superclass: PatternProxy

create a new instance with a pattern (the source). The pattern should be an event pattern (see Pdef)


From superclass: TaskProxy

a default source, if none is given. the default is a Pbind with resting notes of 1.0 beat duration.


EventPatternProxy.defaultQuant = value

set the default quantization value for the class.

Inherited class methods

Undocumented class methods



Instance Methods


.source = obj

From superclass: PatternProxy

set the source (a pattern). If a quantization is given, schedule this change to the next beat ( pattern_(..) is equivalent)


From superclass: PatternProxy

set the source to nil and stop playing


.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 = val

From superclass: PatternProxy

get or set the quantization value. can be an array [quant, phase, offset, outset]


.fadeTime = value

when the synthdefs that are used contain an \amp control, the patterns are replaced by crossfading the previous with the new over this time (in beats)


.envir = dict

From superclass: PatternProxy

provide a default event for the Pdef. It is used to filter the incoming stream before it is passed to the source pattern. This is similar to NodeProxy: -nodeMap. When set for the first time, the pattern is rebuilt.

.set( ... args)

From superclass: PatternProxy

set arguments in the default event. If there is none, it is created and the pattern is rebuilt.

a) using as stream reference

.embedInStream(inval, embed: true, default)

Given a Stream like e.g. Routine, yield all values from the pattern in the proxy before continuing. One pattern proxy can be used to produce values for any number of independent streams.



The inval is an Event and is passed into all substreams. It can be used to control how they behave from the outside.


See Object: -streamArg for explanation.


Replacement for nil outputs of the source pattern. One use case is -endless.

b) using as EventStreamPlayer

.play(argClock, protoEvent, quant, doReset: false)

starts the EventPatternProxy and creates a player. if you want to play multiple instances, use -fork.



play on a certain clock, e.g. a TempoClock. If nil uses this instance's -clock, which in turn defaults to TempoClock.default.


an event to be used as a first input to the chain


can be an array of [quant, phase, offset, outset], or an instance of Quant.


if set to true, play will restart the stream if already running (a Boolean).


From superclass: TaskProxy

stops the player


From superclass: TaskProxy

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


From superclass: TaskProxy

.resume(clock, quant)

From superclass: TaskProxy


From superclass: PatternProxy

perform player method


From superclass: TaskProxy

returns true if Pdef is running. if a Pdef 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

.buildForProxy(proxy, channelOffset: 0)

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

.constrainStream(stream, newStream, inval, cleanup)

.fork(argClock, quant, protoEvent)


.outset = val

.playOnce(argClock, protoEvent, quant)


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


a) embedding EventPatternProxy in streams

b) playing EventPatternProxy