SuperCollider CLASSES


base class for environment redirects
Inherits from: Object
Subclasses: LazyEnvir


Environment that redirects access (put) and assignment (at). It is used as a base class for redirecting Environments. For example uses, see LazyEnvir and ProxySpace.

Class Methods

*new (envir)

Create new environment redirect, if envir is given, it is used as a basis.

replacing Environment class methods

EnvironmentRedirect implements some of the interface of Environment



*make (function)

*use (function)

Inherited class methods

Undocumented class methods

*newFrom (aCollection)

Instance Methods


-envir = argEnvir

return or replace the source environment

e =;
e.put(\x, 9);
e.envir; // look into the envir itself: for a LazyEnvir it contains Maybe as placeholders

redirecting objects

Overriding these methods, one can redirect where objects go when they are assigned to the space. This is done for example in LazyEnvir and ProxySpace.

-at (key)

-put (key, obj)

-localPut (key, obj)

-removeAt (key)


-dispatch = disp

A function or object that is called when the environment is modified. The key and the changed object are passed as arguments.

e =;
e.dispatch = { |key, val| [key, val].postln };
e.put(\x, 9);

replacing Environment instance methods

EnvironmentRedirect implements some of the interface of Environment, which it can replace where needed.



-make (function)

-use (function)

-do (function)


-keysValuesDo (function)

-keysValuesArrayDo (argArray, function)

-findKeyForValue (val)

-sortedKeysValuesDo (function)



-know = flag

-doesNotUnderstand (selector ... args)

Inherited instance methods

Undocumented instance methods

-add (anAssociation)

-doFunctionPerform (selector, args)

-linkDoc (doc, pushNow: true)

-putAll ( ... dictionaries)

-unlinkDoc (doc, popNow: false)


EnvironmentRedirect and its subclasses can be used to dispatch assignment over a network. To do this, a dispatch function can be supplied - see Public in JITLibExtensions quark.