Code Monkey home page Code Monkey logo

node-max's Introduction

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!

node-max's People

Contributors

pq avatar

Stargazers

Diogo Cocharro avatar Rein van der Woerd avatar Ricardo Matias avatar 2bit avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.