open-audiovisual
Search GitHub

Web MIDI controller

No controller? Use this page

This page is a MIDI controller. Its faders, knobs, XY pad and pads send real MIDI messages through a virtual MIDI cable on your computer (the IAC Driver on a Mac, loopMIDI on Windows) into TouchDesigner or anything else that listens to MIDI. Every move shows what was sent and the channel name TouchDesigner will show for it.

  1. Mac: turn the IAC Driver on (Audio MIDI Setup → Window → Show MIDI Studio → IAC Driver → Device is online). Windows: install loopMIDI and add a port.
  2. Open this page in Chrome or Edge on that computer and press Connect MIDI output. The first time, the browser asks to use MIDI devices: allow it.
  3. Pick the output, the same port TouchDesigner's MIDI In listens to.
  4. Move a fader, hit a pad: TouchDesigner's MIDI In CHOP shows ch1ctrl20 and ch1n36.
MIDI output
Stuck notes

Not connected yet. Try the controls: the messages appear beside them, and leave once you connect.

Change the CC and note numbers

Your numbers stay in this browser. A link can carry them too: ?ch=1&cc=20,21,22,23&xy=74,71&note=36.

What each control sends

TouchDesigner's MIDI In CHOP opens a channel with this name. The names assume 1 Based Index is off (it is off in the lesson files that go with this page). With it on, the number in the name is off by one.

ControlMIDI messageTD channelValue
Fader 1CC 20 · ch 1ch1ctrl200–127
Fader 2CC 21 · ch 1ch1ctrl210–127
Knob 1CC 22 · ch 1ch1ctrl220–127
Knob 2CC 23 · ch 1ch1ctrl230–127
XY acrossCC 74 · ch 1ch1ctrl740–127
XY upCC 71 · ch 1ch1ctrl710–127
Pad 1Note on 36 · ch 1ch1n36above 0 while held (the velocity), 0 when let go
Pad 2Note on 37 · ch 1ch1n37above 0 while held (the velocity), 0 when let go
Pad 3Note on 38 · ch 1ch1n38above 0 while held (the velocity), 0 when let go
Pad 4Note on 39 · ch 1ch1n39above 0 while held (the velocity), 0 when let go
Pad 5Note on 40 · ch 1ch1n40above 0 while held (the velocity), 0 when let go
Pad 6Note on 41 · ch 1ch1n41above 0 while held (the velocity), 0 when let go
Pad 7Note on 42 · ch 1ch1n42above 0 while held (the velocity), 0 when let go
Pad 8Note on 43 · ch 1ch1n43above 0 while held (the velocity), 0 when let go

Wiring it in TouchDesigner

  1. Dialogs → MIDI Device Mapper → Create New Mapping. Set its In Device to the port you picked on this page (IAC Driver or loopMIDI) and note its ID.
  2. Add a MIDI In CHOP and set its Device ID to that ID.
  3. Move a fader here: the CHOP grows ch1ctrl20, 0 to 127. A Math CHOP from range 0–127 to range 0–1 makes it ready for size, brightness or colour.
  4. Hit a pad: a channel like ch1n36 appears, above 0 while held and back to 0 when let go. Good for a flash or a switch.

Measured on TouchDesigner 2025.33230 on a Mac, through the IAC Driver. Nothing comes back from TouchDesigner to this page.

Which computer, which browser

Mac
The IAC Driver is built in. In Audio MIDI Setup open the MIDI Studio, double-click IAC Driver, tick Device is online, and add ports if you need more than one. Chrome lists the device and port names run together, for example IAC DriverPort2 (the port is Bus 1 unless you renamed it).
Windows
Install loopMIDI (free, by Tobias Erichsen) and press + to add a port. This page sends into it; TouchDesigner listens to the same port.
Browsers
Chrome and Edge have Web MIDI. Safari (Mac, iPhone, iPad) has none: the controls move but no MIDI leaves. Firefox has it behind a site permission add-on (not tested here). The page must come from https or localhost, and the browser asks once.
Phones
A phone has no virtual MIDI cable, so this page cannot send MIDI from one. For a phone as a controller, see Phones and iPads as controllers: the phone sends over a relay to a page on the computer.