When two projects are very similar, you might prefer to use the project inheritance mechanism described below over themes.
There is a special project option called :inheritance
. This
option must be a list of project names (strings). The inheritance of a
project defines a list of projects from which to inherit options.
One important note: inherited projects might have their own
:inheritance
option set to other projects in turn. In other
words, the project inheritance can be more than one level deep. Just as
for themes traversal, when Patcher tries to retrieve an option and this
option is not available directly, the inheritance tree is traversed
depth first.
Because inherited projects can inherit from projects, a bogus setting
might lead to an infinite loop (a cycle in a project graph). To prevent
this, the patcher-max-inheritance-depth
user option is provided.
It represents the expected maximum project inheritance level and
defaults to 8.
The :inheritance
project option is somewhat special in the sense
that it can't appear in a theme. We will encounter other exceptions
later in this manual.