mattbierner / theremin-x

Code used to power the Theremin-X project

Home Page:https://blog.mattbierner.com/theremin-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Theremin-X Source

Code that powered the Theremin-X Project.

Warning: this code was basically written to be run once. It did that, and I'm just posting it up on Github in case anyone else wants to see how it was done. It's not pretty and is probably not be a good starting point for similar projects.

Running

The node scripts are written in TypeScript and use the noble library for bluetooth.

To build and run:

$ npm install
$ npm run compile
$ npm run start

This starts the script listing on the default midi input ports. It will automatically discover nearby supported vibrators and drive them using there theremin midi input.

Ctrl+c to stop the script.

Hardware

Theremin

The script in this repo samples the pitch and volume of a theremin as Midi input. Some basic config options for midi connecting are found in src/config.ts. The mapping from midi input values to vibration strength is found in scr/sampler.ts. The current values are optimized for an Moog Etherwave theremin and may need tweaking for best results.

If dealing with a non-midi enabled theremin, such as the professionally one used in the video, consider using Midi Merlin.

Toys

The following vibrators should connect automatically:

Should be easy to hook up other bluetooth toys as well provided they have open APIs.

About

Code used to power the Theremin-X project

https://blog.mattbierner.com/theremin-x


Languages

Language:TypeScript 100.0%