|December 21st, 2012|
|sound, music, vsl1818, tech [html]|
The code is on github.
audio interface connects to the laptop via a usb cable, and the laptop
runs VSL. A
python program I wrote runs on the laptop and speaks to the VSL over
the protocol it usually uses to talk to the remote control app that
runs on an ipad. This python program is also a webserver, and clients
can connect to
http://laptop-ip:8000/ it and use an html
channels the user has open, and any changes the user makes are sent to
the python program (and from there to VSL and then to the audio
interface). One downside in using this for dances is that if I have
my laptop providing wifi and musicians are adjusting their monitor
mixes via smartphone then the musicians can't be both connected to the
internet (over cell data) and to my laptop (over private wifi) at the
Below are more details than you probably want on the protocol that the VSL speaks with its remote and that I've co-opted for my own sinister purposes.
There's a udp protocol where the remote can find out about potential VSLs to connect to (and apparently vice-versa). It involves ports 7070 and 7071 and message-categories 1 and 10 (see below). I didn't do anything with this protocol because in my setup the VSL is always open and is running on the same computer.
The container format for a message looks like
signature: 4 bytes message_len: 4 bytes message: message_len bytesIt's all little endian and the signature is always 0xaa550011 (or '11 00 55 aa' in the order it comes over the network).
Each message begins with a header that gives some version information and says what kind of message it is:
unknown1: 4 bytes unknown2: 4 bytes category: 2 bytes unknown3: 2 bytesThe three unknowns are 0x01020103, 1234, and 10 respectively. They're probably something to do with versioning, but I don't know what they are. I leave them alone. The category indicates what the rest of the message is.
Category 5 messages have information on levels. They are:
channel1: 1 byte channel2: 1 byte ... channel128: 1 byteThe first eight bytes are channels 1-8 and give prefader input levels. I didn't look farther than this because I don't intend to use these. They're sent really often, maybe 20 times a second.
Category 4 mesages have information on the names of channels. Their format is:
unknown1: 2 bytes channel_id: 2 bytes channel_name: 48 bytesI don't know what unknown1 is, but it's always 0. The channel_id is an integer and the channel_name is a null-terminated string giving a human-readable name for that channel.
I tried sending one of these messages back to VSL to name the channels (because you can't change their names in the app) but it didn't do anything. Which is too bad; I'd really like to be able to name input channels.
Category 3 messages are what you send to VSL when you connect. They look like:
mac: 32 bytes device: 32 bytesBoth are null terminated strings. The mac is just the computer's mac adress, in ascii, like
C8:BC:C8:1B:9F:0A. The device is what you think you're connecting to. So in this case,
Category 2 messages have information on how a control is set. These are used both initially to transfer the state of the board and then to send updates as they come in. Format:
control_id: 2 bytes value: 8 bytes channel_id_str: 32 bytesFiguring out what control_id was what I needed to do experimentally, but what I know now is:
3000 master 1 master pan 3005 aux 3-4 16 pan 3-4 3007 aux 5-6 17 pan 5-6 3009 aux 7-8 18 pan 7-8 3013 A 3014 B 3052 mute 62 phase reverse 3021 high pass 3063 postThere are more controls, including ones for all the complex effects (eq, compression) but for now I only care about these.
The value is a double precision floating point number, always between
0 and 1. Some channels are binary settings (mute, phare reverse,
post) and for those it's always exactly 0 or 1. The channel_id_str is
a null-terminated string, and it looks like
first number, 3 in this case, matches up with the channel_id we saw in
the category 4 messages. I don't know what the other numbers are.
If you want to update a setting, all you have to do is send the appropriate category 2 message back to VSL.
It seems like a reasonably nice and well designed protocol.