Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

node-max

Jumping off point for debugging max JS patches w/ node.

Basics

Inspired by a conversation on the llllllll forum, a few starter files to help jump-start using node.js to debug and test your Max/MSP Javascript bits.

Included here are:

  • max.js - a sample file with a few maxisms (a stand-in for your real code) that defines a nodule module exporting functions to test drive.
  • driver.js - the driver. This defines a sandbox from which you test drive functions exported by the module defined in the max.js file.

Getting Started

Preliminaries

This assumes you've got node.js installed and some environment in which you can debug node apps. (The Node.js Applications with VS Code tutorial is great if you want to give vscode a whirl.)

The Recipe

  1. grab the sources (git clone https://github.com/pq/node-max.git).
  2. copy driver.js into your project directory.
  3. update the JS file(s) you want to test to define modules that export functions of interest.
  4. import these modules into driver.js (e.g., update require('./max') to specify your module and repeat as needed).
  5. add a call to one of your functions to the sandbox area of driver.js (e.g., like max.bang() in the template).
  6. set a breakpoint.
  7. create a launch.json configuration file that specifies driver.js as its program (maybe like "program": "${workspaceRoot}/driver.js").
  8. run!

Next Steps

This is basically a lark. If it ends up being useful, I'll add more bits (more Max functions in particular). If you have interest, feel free to file an issue or better still, submit a pull request!

About

Jumping off point for debugging max JS patches w/ node.

Resources

Releases

No releases published

Packages

No packages published