AV controller interfaces

December 10, 2019 — August 1, 2023

lua
machine learning
making things
music
real time
UI

The input-data side for gesture recognition or controller mapping.

In non-musical circles, they call this “physical computing,” “natural user interfaces,” or “tangible computing,” depending on whom they are pitching to for funding this month.

Figure 1

1 Software

  • jean-emmanuel/open-stage-control: Libre and modular OSC / MIDI controller/ General mechanics - Open Stage Control

  • Less a software package than a protocol, OSCQuery attempts to automatically construct GUIs for remote control of AV apps. Flagship useful application is the automatic webapp interface, oscqueryhtml. (This is an example of the reinvention of TCP that I mention when discussing OSC).

  • libmapper bundles together UI signals and provides a discovery protocol; libraries in C right now; also there is python, and some puredata/maxMSP implementation. There is also some query support, much like OSCQuery.

    But if you were doing that, why not use some IoT tools and benefit from greater brainshare?

  • libossia is

    libossia is a modern C++, cross-environment distributed object model for creative coding.

    It allows you to declare the architecture of your creative coding application’s functions as a tree of OSC nodes and parameters. These nodes/parameters can have attributes, which allow you to declare many of their properties, such as their values, types, units, ranges, etc…

    This OSC tree-based architecture (coined “device” in the OSSIA terminology) can then be exposed over the network under several protocols, some of which allow this architecture, and the properties and values of its nodes, to be fully explored and queried. For now, protocols available in the implementations are: plain OSC, OSCquery, Midi - more are part of libossia and will be made available in the future.

    libossia offers bindings and implementations for several environments: PureData, Max/MSP, Python, Unity3D, QML, Faust, SuperCollider.

    It is paired with an app that seems to use this for cross-media control, ossia. See below for a lengthy rant on the theme of why I dislike OSC.

  • The Autobahn project:

    provides open-source implementations of the The WebSocket Protocol and The Web Application Messaging Protocol (WAMP) network protocols.

    WebSocket allows bidirectional real-time messaging on the Web and WAMP adds asynchronous Remote Procedure Calls and Publish & Subscribe on top of WebSocket.

    WAMP is ideal for distributed, multi-client and server applications, such as multi-user database-driven business applications, sensor networks (IoT), instant messaging or MMOGs (massively multi-player online games).

    includes javascript, python and a routing infrastructure called crossbar.

  • Luis Lloret’s OSMID aims to provide a lightweight, portable, easy-to-use tool to convert MIDI to OSC and OSC to MIDI.

  • Mark Francombe’s browser MIDI/OSC converter, MIDI MESSAGE GENERATOR.

  • OSC and python

    • The original, sorta-working thing: pyOSC
    • C-based and easier to use: pyliblo
  • tangible.js is a resource for real-world interfaces plugging into javascript. They intermittently publish useful reviews.

  • There are various Javascript GUI frameworks designed for musical control.

  • Javascript OpenSoundControl bridges

    • osc.js is an Open Sound Control (OSC) library for JavaScript that works in both the browser and Node.js (And is still being maintained unlike many)

    • supercollider.js does this and much more.

    • OSC-JS exists, bridging websockets to OSC, but doesn’t look as maintained as osc.js. Are there others?

    • Yes. Legato.

      legato is a small node.js library written in coffeescript, but that doesn’t really matter. legato is designed to let you create beautifully simple connections between devices and software, regardless of environment.

  • Löve2d. Reasonably comprehensive support for MIDI (Lua)

  • HIDtoOSC

    a human-interface-device (HID) to open-sound-control (OSC) converter for macOS written in Python3. the program can send OSC to any IP and port but by default it will send to 127.0.0.1 (localhost) on port 57120 (supercollider).

2 Interesting hardware

2.1 Soundcard input

Creating a controller from sound.

2.2 Tablet computers

iPad, Android, Windows tablet…

For Windows tablet, xotopad.

For iOS/Android, Touchosc, Lemur…

For anything +Ableton, yeco.

2.3 Sensel morph

A specialised tablet computer, https://morph.sensel.com/

2.4 Roli kit

Roli is a fancy audio company. How is their controller? Lightpad m.

3 Keith McMillen

Keith McMillen Instruments makes robust midi controllers out of some weird rubbery membrane.

I am a fan of the Quneo which is nearly indestructible. The bitwig control script is good.

3.1 Kinect

TBD

4 3d interaction

The classic depth camera is the Kinect. More-open depth-camera: Orbbec3d

Calibration is tricky; Rulr attempts to solve this in an open-source, general way. (Rulr docs). openkinect does Kinect.

TBC.

4.1 myo

myo (discontinued) is a wristband sensor that measures your muscles directly using EMG. Similar: the XTH using MMG — “which captures motion, direction and orientation sensors (integrated in a 9-DoF IMU) and muscle sound (also known as mechanomyogram or MMG)”

4.2 Leapmotion

Infrared hand tracker. In my experience, not really stable enough for on-stage use, (needs better Kalman filtering) but gee it’s small and portable and thus convenient.

4.3 Makeymakey

makeymakey

[Turns] everyday objects into touchpads and combine them with the internet. It’s a simple Invention Kit for Beginners and Experts doing art, engineering, and everything in between

Hmm. I’m not sold on this, as it’s a rather expensive way of getting 1-dimensional controllers out of $2 contact mics, and we could do a lot more with such inputs with meagre effort. Nice if you are short of time and quirk, but not short of money.

4.4 DIY options

4.5 Wiimote

Another tiny and portable controller. Wiimote is almost a normal HID device, but has nasty sharp edges which means that it doesn’t really work out of the box as a music controller. So you avoid them using alternate libraries:

  • wiiuse is a library written in C that connects with several Nintendo Wii remotes. Supports motion sensing, IR tracking, nunchuk, classic controller, Balance Board, and the Guitar Hero 3 controller. Single threaded and nonblocking makes a lightweight and clean API.

  • OS X mapper Darwiinremote.

  • macOS driver wjoy

  • osculator is a commercial product which does this; it’s pretty good.

  • I used to use JunXion, but the creators were defunded

  • libcwiid seems to be Linux-happy? But it’s a naked C library and apparently threading-tricky. Has a python interface.

4.6 webcam

See synestizer.

4.7 Portable wireless routers

Portable router solution for network device control?

5 Accessibility

Human Instruments does good accessible interface work.

6 Protocols

6.1 MIDI

More-or-less working since the 1980s; still the best idea, if you can live with 7-bit scalars as your lingua franca. See MIDI.

6.2 OpenSoundControl

tl;dr No.

A short-lived project from the 1990s to produce a more flexible protocol than MIDI. Insinuated its way into many projects before death, and still haunts them. Because it is more flexible than MIDI, it is sometimes discussed as if it were the apotheosis of protocols, as opposed to a half-baked system which incrementally improves on MIDI in some ways while introducing debilities of its own. Here are the debilities I have encountered:

  1. Stateless protocol designed to support UDP — and therefore it’s one way. No query-and-response here, no clients and servers. One side needs to transmit the other. Then the other one needs to transmit back. These are inherently unrelated. Much paperwork must be done manually to ensure that on each side you are each responding to each other, have not missed anything and are responding to things in the correct order. All of this is stuff that TCP does for free. Therefore I always end up re-inventing TCP if I want to do 2 way communication, much as in most UDP systems Which presumably I do, or I’d be using MIDI.
  2. because of UDP assumption, OSC is bad for transferring large data, e.g. audio, because of UDP packet size limits. Seems unfortunate for an audio application domain.
  3. supports strings but only ASCII strings, so we can’t even work around (2) by transmitting filenames, which are not reliably ASCII on modern computers without onerous workarounds.
  4. supports lots of data types, including nested data trees and time execution, but only a partial subset is implemented by most software apart from, AFAICT, supercollider.
  5. has a, for my purposes, rather unpleasant addressing protocol, where messages can be addressed to paths including wildcards. But the sender may use wildcards, and the receiver may not, which is backwards for the practical use-cases that I personally encounter.
  6. Doesn’t guarantee delivery, due to UDP assumption. When I mention this, supercollider advocates tell me that I CAN in fact use TCP instead. Which I can, but AFAICT only if I am using supercollider, which rather diminishes the force of the “universal ultimate controller protocol for everything” argument.

The upside of all these limitations, people tell me, is that OSC is light enough to implement on microcontrollers. Which is sort of true, in a useless sense, in that the entire protocol is heavy, but one can often implement a limited subset of the protocol on a microcontroller. No two devices I have seen so far implement the same subset, of course, and there is no protocol to communicate which subset is implemented, natch.) If all the microprocessors are implementing a subset anyway, why then must OSC at its most general be crippled? Even the broadest and most general implementation of the specification does not include the most basic comforts of modern networked communication. This confusing theatre where giant modern digital workstations ape tiny embedded controllers in an unhelpful charade of solidarity is not a great use of developer time or processor time.

Rather than providing a universal communication system, it requires us to embark upon a complicated compatibility negotiation, all to gain marginal functionality compared to MIDI. And at the same time, cheap entry-level microcontrollers implement much more mainstream protocols than this (e.g. HTTP). In trying to fulfil the needs of microscopically tiny and/or archaeologically ancient microcontrollers and bigger computers at once, it fails to do either.

If you find yourself thinking OSC is a solution, perhaps you will do better to have big devices using web APIs talk to dumb peripherals using the same protocol, or in a pinch MIDI, or some other IoT protocol, backed by a highly-resourced IoT corporation, rather than a community-less fossilized standard that has been abandonware for more than 2 decades without even the mindshare or support of MIDI.

6.3 HID

How your keyboard talks to your computer. 🏗

6.4 Websockets

🏗

6.5 Sundry bluetooth protocols

🏗