Neutronself-contained node & npm sketchbook

Neutron is self-contained node & npm application made for quick prototyping and teaching.

It borrows ideas from Processing and tries to create similar novice and artist friendly environment.

Neutron is based on Electron, so you get everything that Chrome and Node can give you! (1)

(1) native packages are sadly not supported right now, Neutron ships with ones I use for workshops often: node-serialport, johnny-five and node-midi.

Detailed info is on github, you can also download it straight from there.

I've also made a longer write-up about ideas and process behind building this: building neutron

Neutron is a self-contained node & npm application made for quick prototyping and teaching.

To make Neutron work a bit more like Processing, I've decided to expose a simple wrapper around Electron functions, this allows me not only to get the window size, but move it around the screen, get displays, access mouse position outside of a window, and more.

Neutron was born out of two main needs:

Neutron is based on Electron basically a programmable Chrome window with require() support. This gives us best of both worlds: file system access with require('fs'), full node support, and a window which can render HTML. Neutron wraps this functionality in easy to use application.

On start, Neutron asks to load a JavaScript file, this can be done either by dragging it on the window, or clicking to open file select. This simple UI is build with React, probably overkill in this situation, but this allowed me to quickly move forward.

After that we focused on connecting this to P5 using serial data (and Neutron), to finally connect it to Tone.js.

I also got a chance to test Neutron in the wild I've added syntax based error checking and better support for Windows, which wouldn't have happened if I didn't seen the problems students had while using it.

Second day was a re-introduction to P5 (running inside of Neutron), and connecting it with Arduino through serial interface. Third day was all about sound (with Tone.js), and coming up with interactions around music and sensors.

Szymon Kaliski © 2021