Skip to content
altstrument

OPZ.js

Tool for OP-Z (Teenage Engineering)

JavaScript library that decodes MIDI received from an OP-Z into track, action, velocity and value, covering keys, dials with colour and page, pitch bend and transport. Works with Web MIDI or node-midi. Published on npm as opzjs, with demo pages built on it.

by Nathan Willson

DormantSource: openMIT
Top-down view of the OP-Z, a long dark grey unit with four large ringed encoders in green, blue, yellow and red at the right and rows of small round buttons across the rest of the panel
Photo: Teenage Engineering, manufacturer product image, via teenage.engineering
Distribution
Build from source yourself
Source
github.com https://github.com/nbw/opz
Homepage
opz.nathanwillson.com https://opz.nathanwillson.com

Description

The decode function takes the raw bytes of a message and returns which of the device's tracks sent it, whether it was a key, dial or pitch bend, and a value such as a note name or dial position. The README tables list the track names, the controls that send no MIDI and the burst of notes sent when stop is pressed during playback. Browser and Node examples are included. The author's site lists four demo pages made with it, a Tetris game, shapes, a sinusoid and a sketch pad, controlled from the device. It only receives and decodes; it does not write to the OP-Z.

Install notes

Install from npm with npm install opzjs, or include dist/opz.js in a page. Turn MIDI out on in the device's settings first.

Version history

OPZ.js version history
VersionDate
v1.0.12020-11-25
v1.0.02020-11-16

Back to OP-Z