Article 6C83J SSC Protocol

SSC Protocol

by
jonskeet
from Jon Skeet's coding blog on (#6C83J)

I'm aware that I haven't been writing as many blog posts as I'd hoped to about DigiMixer. I expect the next big post to be a comparison of the various protocols that DigiMixer supports. (I've started a protocols directory in the GitHub repo, but there isn't much there yet.) In the meantime, I wanted to mention a protocol that I just recently integrated... SSC.

SSC stands for Sennheiser Sound Control" - it's based on OSC (Open Sound Control), the binary protocol that I already use for controlling Behringer mixers and the RCF M-18. SSC is very similar to OSC in terms of its structure of path-like addresses to refer to values (e.g. /device/identity/product") but uses JSON as the representation. The addresses are represented via nested objects: to request a value you specify the null literal in the request, whereas to set a value you specify the new value. So for example, a request for a device's product name, serial number and current time might look like this:

{ "device": { "time": null, "identity" { "serial": null, "product": null } }}

Not only is this nice and easy to work with, but it's all documented. For example, the specification for the EW-DX EM 2 radio microphone receiver (which is the device I have) can be downloaded here. I can't tell you how delightful it is to read a well-written specification before starting to write any integration code. There are a few aspects that it doesn't cover in as much detail as I'd like (e.g. errors) but overall, it's a joy.

Obviously a radio microphone receiver isn't actually a mixer - while I could sort of squint and pretend it is (it's got mutes and sound levels, after all) I haven't done that... this is really for integration into At Your Service, so that I can alert the operator if microphone battery levels are running low. Given the relationship between OSC and SSC, however, it made sense to include it in the DigiMixer code base - even with tests for the abstraction I've created over the top. (No, having tests isn't normally noteworthy - but my integration projects normally don't include many tests as the big unknown" is more what the device does rather than how the code behaves.)

Due to a combination of existing code in DigiMixer for handling establish a client/server-like relationship over UDP", the clear documentation, and my previous experience with OSC, I was able to get my new radio mic receiver integrated into At Your Service within a few hours. I'm sure I'll want to tweak it over time - but overall, I'm really pleased at how easy it was to add this. I don't expect to actually display the details to most users, but here they are for diagnostic purposes:

ssc-details.png?w=474

And the status bar with just battery levels:

battery-levels.png?w=474

Onward and upward!

External Content
Source RSS or Atom Feed
Feed Location http://codeblog.jonskeet.uk/feed/
Feed Title Jon Skeet's coding blog
Feed Link https://codeblog.jonskeet.uk/
Reply 0 comments