Node in Max

by Julian Rubisch, 2019-02-11javascriptmaxcreative-coding
01 Watch YouTube Videos
07:36

When I first heard that Max is getting a NodeJS integration, I thought to myself, what endless possibilities. I'm not the greatest supporter of the JavaScript language and the environment it lives in, but hey, the premise of re-using other software I had written in Max was just too tempting. That said, when it finally came out I was a little stunned not to find a more detailed introduction in how to set up a project with NPM, install modules etc. Maybe I didn't search intensely enough, but at least there wasn't something screaming at me: "TRY THIS". So well, while everybody else is freaking out about MC, here's my first take on Node in Max, a little script that allows you to play arbitrary YouTube videos in a `[jit.movie]`. When I asked on Twitter what could be a nice starter project, the answer I got was "People will go nuts if NodeJS lets you open youtube tutos". So I just did it.

  Go to video
02 Static D3JS
04:14

I love d3js for data visualizations, I mean, who doesn't? Sometimes, though, it'd be nice to obtain an SVG without having to embed the relevant code in a website, run it in a browser and copy-paste the result. With an npm package called d3-node, this is possible, with a few limitations. We'll wrap this in a node.script and use it to render PNG files to be used in a Max patch.

  Go to video
03 SocketIO Client
09:51

A neat fact about node.script is that it gives us access to a bunch of Web APIs that are easy to implement using nodejs. The official Node4Max examples include one about creating and running a WebSocket server; I'm going to show you the opposite, how to make Max behave like a WebSocket client.

  Go to video
04 MQTT Subscriber
09:56

MQTT is short for _Message Queueing Telemetry Transport_, and is a machine-to-machine communication protocol for the transmission in environments of high latencies and flaky networks. Why is that interesting? Because MQTT is the standard protocol for IoT applications, the Internet of Things' heartbeat so to speak. Chances are, if you have any smart home or sensor devices at home, they already transmit or offer MQTT at some endpoint, so here is an opportunity for a wide range of sensor and actor integrations which can be a great source for various artworks.

  Go to video
05 Live Coding REPL
08:26

An exploration of how an efficient live coding shell could be set up with node4max. NodeJS already has a lot of the requirements covered, so we're going to take a deeper look at this.

  Go to video
© 2018 Znibble~Powered by Contentful
Privacy Policy NewsletterImprint