The following standardised library for handling argument setup is being implemented using the new #include mechanism.
Note : the nature of argument and attribute handling requires
The following standardised library for handling inlet and outlet setup is being implemented using the new #include mechanism.
One thing that became clear was that the amount of comments et.c. added significantly to the size of an included file. As a result, I decided to provide a method for removing this overhead, in the form of a 'cleaned' include file, stripped of comments and extraneous whitespace. A 'clean' include file would be file-suffixed '.h.js', and the 'full' version, used for code maintenance would retain the '.js' suffix. The original include code was modified to use a 'clean' include file first, if present, or, in its absence, the 'full' version.
The revised requirements for an include file are thus:
The use of this mechanism is as follows
This code should have been fairly straightforward, but issues with line-end characters caused a certain amount of
headscratching. The current code, which grabs lines one at a time, might be slower, but it more forgiving
of EOL issues. The implementation reads all the included module code into a single buffer then
One of the first stages was sidestepping the very limited coding envirinment included in MAX (a very primitive text editor) in favour of the Komodo IDE, and use of the command
which causes MAX/MSP to reload a js or jsui object when it has been modified. This combination
meant that I could edit documents in a fully-fledged IDE, with minimal overhead.
The following functionality was developed to allow a consistent approach to MAX/MSP IO from a js/jsui object:
(*)not fully implemented as yet
The following public functions have been or will be implemented in the template as 'hardcoded' methods, or stubs, providing handling of a standardised MAX message set.
(hardcoded public functions)
(stubs for public functions)
The following private functions are implemented in the template as 'hardcoded' methods, or stubs, to support the implementation of the standardised MAX message set.
(hardcoded private functions)
(stubs for private functions)
Some of these methods are implemented using 'eval', which is known to be inefficient.
All of this usage of eval currently occurs at the initialisation stage, but a method for avoiding repeated calls to
eval is required. This may be resoved by my intention to try and implement