/72-edo-keyboard

A 72-EDO polyphonic keyboard that sends note and pitch bend info via OSC

Primary LanguageHTML

72-EDO Polyphonic Keyboard

72-note equal-tempered octave keyboard for Windows touch devices (i.e., Surface). Theoretically works on any touch device that can run Chrome and SuperCollider – you'll just need to manually run Node and sclang or create your own shell scripts (or try cross-platform PowerShell).

Runs in Chrome. Uses osc.js and SuperCollider to route Reaper-specific OSC messages (note on, note off, pitch bend). Uses multiple channels to allow polyphonic pitch bends.

You can modify capture-osc-xxx.scd or use your own SuperCollider code to do whatever you want with the incoming OSC messages (/72edo/noteOn, /72edo/noteOff, /72edo/pitchBend).

Installation and Configuration

From the command line:

  1. Run npm install
  2. In the web folder, run npm install
  3. Install forever: npm install -g forever
  4. Install SuperCollider
  5. Add sclang.exe to your PATH: $Env:Path += ";C:\Program Files\SuperCollider-3.10.2" (Confirm the path to SuperCollider on your machine). You can add this to your profile
  6. Enable touch events in Chrome: Go to chrome://flags/#touch-events and select "Enabled" for Touch Events API
  7. For Reaper (or other DAW) output: If you're not using an MPE compatible virtual instrument, setup a project with 10 virtual instruments, each accepting an individual MIDI channel from 2-11. Make sure that instrument pitch bend range is set to 1. See below for OSC configuration in Reaper.
  8. Enable script execution in PowerShell (as Administrator, run Set-ExecutionPolicy RemoteSigned)

Starting

Navigate to project directory in PowerShell and execute .\init.ps1. Or, if you want SuperCollider to synthesize the sound internally, close any open SuperCollider instances, run .\init.ps1 internal, and wait for server boot confirmation ("Shared memory server interface initialized") in the terminal.

A tab should open in Chrome with the keyboard GUI.

Stopping

From the same PowerShell window, hit ctrl-C to stop sclang, then execute .\quit.ps1

Accidently closed initial PowerShell window?

  1. Open a new one and navigate to project directory
  2. Execute Stop-Process -Name sclang
  3. Execute .\quit.ps1

Configure Reaper to Receive OSC

The IP and Port used in capture-osc-reaper.scd are 192.168.0.20 and 8000, respectively. You will either want to configure your host to listen via this IP / Port combination, or change the first line of capture-osc-reaper.scd to reflect your host's configuration. These instructions on how to configure Reaper are as clear as any. Just make sure to enter the appropriate values for IP and Port.

Customizing

The init.ps1 script accepts an optional argument determining which .scd document is executed. You can add any number of SuperCollider documents with file names in the form of capture-osc-[name].scd and execute them with .\init.ps1 [name].

Additionally, the PowerShell scripts (init.ps1 and quit.ps1) are quite simple and easily converted to Bash scripts. Or, one could optionally run the lines in them (with little modification) manually from the terminal.