md-module record types and additional accessors
MMOD: Input Nodes
Returns the subnode with the given SUBNODE-ID.
Returns the inode instance with the given INSTANCE-ID, or a newly created, empty inode if the referenced inode instance does not exist.
Returns the value of the field at FIELD-INDEX in ROW of
block-instance. Returns null if the requested ROW does not exist.
The internal representation of an MDAL module is a pair containing
mdef as the first element, and the global module node as the
second element, so
(mdef . global-node). libmdal provides the
mmod-global-node for dealing with the
elements of a module.
The structure of
global-node mirrors that of the MDAL module
s-expression, with the following changes:
- The GLOBAL node is explicit.
- Each node is represented as an element in an alist, where the key is the node ID, and the value (remainder) is an alist of node instances.
- Each node instance is represented as an element in an alist, where the
key is the instance ID, the first value of the remainder is the node
instance name (or
#fif none was given), and the rest of the remainder is the actual node instance value, depending on the node type.
- In block node instances, all rows are expanded to a list containing the
values for each block field subnode. Unset (empty) fields are
null(the empty list).
mod accessor functions
Generate a function that takes an inode as parameter, and returns the subnode or node instance matching the given path P, which must be a string in the form "instance-id/node-id...". For example,
will return a procedure that, when called with the global node as argument, will return the node CH1 in instance 0 of the PATTERN node, assuming that the node exists and is defined in the module's engine definition.
Given the contents of a block instance, return the contents such that
empty fields are replaced with the last set value.