Node for Max

Node for Max lets you write custom applications using the Node JavaScript framework, and then control and communicate with those applications from Max. Using Node for Max allows you to run a web server, access your computer’s operating system, communicate with remote data services and make use of the vast resources of the npm package community.

Node For Max is primarily managed through a single Max object: node.script.

The node.script object requires an argument that corresponds to either the name of a JavaScript file or the name of a folder containing an npm package.

When the node.script object receives a script start message, it will start a Node process defined by the file or package folder specified by the argument.

Once the process is started, messages to the inlet of node.script will be passed to the Node process. Messages from the Node process can be received from the left outlet of node.script.

Basic Concepts

  • Each node.script object in your Max patch can run a single process.
  • Each program run in a node.script object runs as a separate process from all other processes in other node.script objects.
  • A program run in a node.script object must be explicitly started with a script start message before it can accept input/commands.
  • Automatically send a message when the program is ready by listening for a “started” notification from node.script.

Contents

You can find examples of the node.script object at work in the help file: node.script.maxhelp

There is a range of content available to either get you started with Node For Max, learn more about basic concepts or get inspired by projects other users have been using it for:

See Also

Name Description
node.script
js Execute Javascript