Websocket Programming

I seem obsessed with this web-based control of Ardour as is presented when Websockets is enabled in the Control Surfaces dialog. On entering the page at port 3818 and selecting the “Protocol” link, we get something similar to this:


How does Ardour expose these properties to the outside world? What other properties and/or methods are available? Can the “transport_time” be set programatically? I see in the code behind the “Transport” link that there is a getter but no setter. Is that property read-only? Is there any documentation describing the interface Ardour exposes? I ask because I am interested in expanding on the transport feature of this websocket implementation. I’m an old-school programmer but I can find my way around code fairly comfortably at this level.

PS What is the “transport_bbt” property referring to?

Our websocket support is really OSC-over-websocket (rather than, as it usually would be, OSC-over-UDP).

The full scope of controlling/interacting with Ardour via OSC is documented here:

“BBT” means “bars|beats|ticks” - a way to denote musical times.

1 Like

I did a simple test by copying the directories from /opt/Ardour-8.1.0/share/web_surfaces/builtin to /home/user/.config/ardour8/web_surfaces. And it appears at http://localhost:3818/ as shown in the screenshot.

For example, in the case of transport toogle record, from javascript a message is sent (line 42 of shared/base/compoent.js/ ):

this.channel.send(new Message(node, addr, val));

With the data :

  • node → transport_record
  • addr → Array[]
  • valr → Array[false]

which appears to be the call to a function defined at https://github.com/Ardour/ardour/blob/master/libs/surfaces/websockets/transport.h

void set_record(bool);

This doesn’t really sound like OSC to me, although I may be confused.

In the websockers documentation it is indicated (https://manual.ardour.org/using-control-surfaces/websockets-server/)):

The experimental status means that this control surface is not feature-complete and might have bugs.

I don’t speak English, sorry to Google for the translation.

1 Like

Excellent! I didn’t see this. Thank you. Now I know that what I want to do would require some modifications to the websockets C++ code and then recompilation of that code. Modding the code isn’t a problem but the recompile is probably not something I would be comfortable doing.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.