Pdef can be used as a global storage for event patterns. Here a way is provided by which these definitions can be used as an instrument that consists of several events (a phrase), such as a cloud of short grains. Furthermore, this scheme can be applied recursively, so that structures like a cloud of clouds can be constructed.
When the event type
\phrase is passed in, the event looks for a pattern in
Pdef.all if it can find a definition.
When passing a function to Pdef it creates a PlazyEnvirN internally. Its function is evaluated in the context of the input event (see PlazyEnvirN) which should return a pattern or a stream. Note that this doesn't allow the usual access of the outer environment from within the function.