SuperCollider CLASSES

Pselect

Select values from a pattern

Description

Returns values for which the function returns true. The value is passed to the function.

Class Methods

*new (func, pattern)

From superclass: FuncFilterPattern

Arguments:

func

A Function. Receives values from pattern.

pattern

A Pattern.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

-asStream

-embedInStream (inval)

Examples

(
var a, b;
a = Pselect({ arg item; item != 2 }, Pseq(#[1, 2, 3],inf));
x = a.asStream;
9.do({ x.next.postln; });
)

The message select returns a Pselect when passed to a pattern.

(
var a, b;
a = Pseq(#[1, 2, 3],inf).select({ arg item; item != 2 });
a.postln;
x = a.asStream;
9.do({ x.next.postln; });
)