We’ve been spending a bit of time lately, talking about the Node for Max (N4M) feature, and it really has captured some attention. One of the things that Max users are used to is having access to plenty of example content; it’s one of the primary ways that Max users learn the techniques that make any feature hum.
To that end, we’ve collected a few of the Getting Started questions that we’ve been getting about examples, and decided to provide a bit of a Q&A-format introduction to the available content.
Q: Where do I find Node for Max content? I checked the examples folder, and I don’t see anything there!
Frankly, we’ve been seeing a lot of users also using Github as a repository for their Max-based work as well, so it’s not going to be foreign to everyone!
Q: So where do I find this Github repository?
There are actually three repositories, each with a different purpose. Let’s take a look at each one:
The Core Examples: https://github.com/Cycling74/n4m-core-examples
This repository is the location of the most basic examples, and is authored and maintained by Cycling ‘74. This is the starting place for people that are new to either NodeJS or Node for Max, and provides examples of good beginners’ patches and use of the API.
This repo will be constantly under revision, and we will continue to add content based on user or developer requests.
The N4M Examples: https://github.com/Cycling74/n4m-examples
N4M Examples is also maintained by Cycling ‘74, but attempts to show complete (but limited in scope) projects using N4M. It extends the use of NodeJS to do some ‘real world’ functions, including the creation of a simple web server, interacting with a third-party API, uploading files to your patch and using a music theory library for building chords.
These examples make extensive use of npm libraries, which is a staple in the world of Node programming. It’s a great place to explore if you are ready to take on a bigger project, or if you want an idea of where this thing can go!
The N4M Community Repo: https://github.com/Cycling74/n4m-community
One of the most exciting things about the N4M community is the speed at which people have been creating and sharing their work. We want to honor this work by supporting this community repo, which will contain links to projects, templates, hints and examples from the entire community. This is a constantly growing collection of work, and can be a great place to check out how people are approaching N4M, or what is already available!
The list of projects is pretty interesting, ranging from YouTube video streaming to skeleton tracking using the PoseNet library, and you will bet to see other N4M developers in full-tilt action.
Q: There’s a lot there, and I’m a total newbie with Github - and Node for Max. How do I get started?
If you are just getting started with N4M, you should go to those Core Examples and get the whole repo. If you are an experienced user of the Git version control software, you’ll want to clone the repo. However, if you aren’t into Git, you can click on the download button to get a zip file with the repo contents.
Once you have that, run the Max patch in each of the folders play around with some basic N4m projects.
If you want to learn more about how Node and Max talk to each other, you can dig into the N4M API Reference, all of the repos listed above, and check out the N4M recipes to dive in deep!
Do you feel like there is something important that we missed? Or did you find an error in one of the projects? Go to the Core Examples repo and use the issue tracker to create a new issue to let use know.
Q: Hey, it’s cool that you are providing some beginner information, but I’m on the other end of the spectrum. I have a project (or something else) that I want to share - how do I get it added to the Repo?
This is awesome - thanks for being part of the community!
If you are trying to update an existing project in either the Core Examples or N4M Examples you should create a Pull Request with your changes. We are monitoring Pull Requests, and will be happy to work with you to merge your contribution.
Do you want your project, code, blog article or video to be part of the N4M Community repo? You will need to make sure that your work is in a publicly accessible location (personal Github repo, public website or other web server), then update the n4m-community repo’s README.md file to contain a link to your work. Then issue a Pull Request with the changed README to get things moving.
As an alternative, or if you are nervous about updating the file, create a new issue in the n4m-community issue tracker and we’ll be more than happy to help get things linked.