Commit 96521752 authored by Roman Haefeli's avatar Roman Haefeli
Browse files

Merge branch 'dev'

tpf-client starts real jacktrip clients now.
parents fcbcc587 141e8804
#N canvas 463 43 468 434 10;
#X declare -stdpath ggee;
#X obj 25 42 inlet;
#X obj 253 47 inlet;
#X obj 76 301 outlet;
#X text 119 302 STDOUT;
#X obj 262 353 outlet;
#X text 305 354 EXECSTATUS;
#X text 73 44 COMMAND;
#X text 299 47 SIGHUP;
#X obj 14 9 declare -stdpath ggee;
#X obj 25 193 shell;
#X obj 25 150 list trim;
#X obj 52 344 s \$0.pid;
#X obj 25 318 t b a;
#X msg 25 366 1;
#X obj 25 395 s \$0.state;
#X obj 52 214 sel 0;
#X msg 52 234 0;
#X obj 52 253 s \$0.state;
#X obj 253 68 b;
#X obj 253 257 shell;
#X obj 268 189 r \$0.pid;
#X obj 253 211 f;
#X msg 253 235 kill \$1;
#X obj 262 323 r \$0.state;
#X obj 25 103 spigot 1;
#X obj 100 84 r \$0.state;
#X obj 100 104 ==;
#X obj 298 83 r \$0.state;
#X obj 25 130 list prepend include/command.sh;
#X obj 25 278 route PID;
#X obj 253 160 t b b;
#X msg 322 152 0;
#X obj 253 104 spigot 0;
#X obj 253 141 spigot 1;
#X obj 370 214 sel 0;
#X msg 370 237 1;
#X connect 0 0 24 0;
#X connect 1 0 18 0;
#X connect 9 0 29 0;
#X connect 9 1 15 0;
#X connect 10 0 9 0;
#X connect 12 0 13 0;
#X connect 12 1 11 0;
#X connect 13 0 14 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 18 0 32 0;
#X connect 19 1 34 0;
#X connect 20 0 21 1;
#X connect 21 0 22 0;
#X connect 22 0 19 0;
#X connect 23 0 4 0;
#X connect 24 0 28 0;
#X connect 25 0 26 0;
#X connect 26 0 24 1;
#X connect 27 0 32 1;
#X connect 28 0 10 0;
#X connect 29 0 12 0;
#X connect 29 1 2 0;
#X connect 30 0 21 0;
#X connect 30 1 31 0;
#X connect 31 0 33 1;
#X connect 32 0 33 0;
#X connect 33 0 30 0;
#X connect 34 0 35 0;
#X connect 35 0 33 1;
#!/bin/bash
while read line
do
echo "$line"
done < <($@ 2>&1 & echo "PID $!")
#N canvas 331 281 495 383 10;
#X obj 21 13 inlet;
#X obj 329 82 command;
#X obj 21 33 s \$0.inlet;
#X obj 25 281 outlet;
#X obj 25 261 r \$0.outlet.0;
#X obj 329 29 r \$0.command;
#X obj 368 106 s \$0.running;
#X obj 329 132 s \$0.output;
#X text 126 13 params (default):;
#N canvas 795 481 475 429 params 0;
#X obj 45 21 r \$0.inlet;
#X obj 45 41 route server portoffset numofchannels bitres clientname
;
#X obj 12 164 pack s f f f s;
#X obj 12 137 symbol;
#X msg 12 184 jacktrip -c \$1 -o \$2 -n \$3 -b \$4 --clientname \$5
;
#X obj 12 101 r \$0.start;
#X obj 12 215 s \$0.command;
#X obj 45 75 list;
#X obj 306 68 list;
#X connect 0 0 1 0;
#X connect 1 0 7 0;
#X connect 1 1 2 1;
#X connect 1 2 2 2;
#X connect 1 3 2 3;
#X connect 1 4 8 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 5 0 3 0;
#X connect 7 0 3 1;
#X connect 8 0 2 4;
#X restore 29 140 pd params;
#X obj 128 34 loadbang;
#X msg 147 115 bitres 16;
#X msg 159 74 portoffset 0;
#X msg 151 94 numofchannels 2;
#X msg 137 134 clientname JackTrip;
#X obj 197 161 s \$0.inlet;
#N canvas 284 575 489 358 start/stop 0;
#X obj 9 12 r \$0.inlet;
#X obj 102 74 r \$0.running;
#X obj 9 76 b;
#X obj 56 76 b;
#X obj 9 106 f;
#X obj 56 108 f;
#X obj 9 137 sel 1;
#X obj 56 137 sel 0;
#X obj 9 200 s \$0.stop;
#X obj 79 200 s \$0.start;
#X obj 326 73 r \$0.running;
#X obj 311 93 f;
#X obj 311 113 sel 1;
#X obj 311 133 t b b;
#X obj 311 157 s \$0.stop;
#X obj 311 216 spigot;
#X obj 311 194 r \$0.running;
#X msg 400 189 1;
#X obj 311 236 sel 0;
#X obj 311 256 t b b;
#X msg 386 232 0;
#X obj 311 278 s \$0.start;
#X obj 311 56 b;
#X obj 203 112 print;
#X obj 9 32 route 0 1;
#X obj 70 31 route stop start restart;
#X connect 0 0 24 0;
#X connect 0 0 25 0;
#X connect 1 0 5 1;
#X connect 1 0 4 1;
#X connect 2 0 4 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 7 0;
#X connect 6 0 8 0;
#X connect 7 0 9 0;
#X connect 10 0 11 1;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 13 1 17 0;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 17 0 15 1;
#X connect 18 0 19 0;
#X connect 19 0 21 0;
#X connect 19 1 20 0;
#X connect 20 0 15 1;
#X connect 22 0 11 0;
#X connect 24 0 2 0;
#X connect 24 1 3 0;
#X connect 25 0 2 0;
#X connect 25 1 3 0;
#X connect 25 2 22 0;
#X restore 29 168 pd start/stop;
#N canvas 860 315 632 312 errors 0;
#X obj 11 12 r \$0.output;
#X obj 11 32 route ERROR:;
#X obj 11 52 route Peer;
#X obj 11 92 route Size;
#X obj 11 112 route is;
#X obj 11 132 route :;
#X obj 160 120 route is;
#X obj 160 140 route :;
#X obj 160 100 route Rate;
#X msg 160 175 MISMATCH SAMPLERATE \$1;
#X msg 11 176 MISMATCH BUFFERSIZE \$1;
#X obj 307 133 route is;
#X obj 307 153 route :;
#X obj 307 94 route Bit;
#X obj 307 114 route Resolution;
#X obj 11 72 route Buffer Sampling Audio;
#X msg 307 176 MISMATCH BITRES \$1;
#X obj 440 56 route Unable;
#X obj 440 76 route to;
#X obj 440 96 route connect;
#X obj 440 116 route to;
#X obj 440 136 route JACK;
#X obj 440 156 route server;
#X obj 224 282 s \$0.outlet.1;
#X msg 440 179 JACK NOT RUNNING;
#X connect 0 0 1 0;
#X connect 0 0 17 0;
#X connect 1 0 2 0;
#X connect 2 0 15 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 10 0;
#X connect 6 0 7 0;
#X connect 7 0 9 0;
#X connect 8 0 6 0;
#X connect 9 0 23 0;
#X connect 10 0 23 0;
#X connect 11 0 12 0;
#X connect 12 0 16 0;
#X connect 13 0 14 0;
#X connect 14 0 11 0;
#X connect 15 0 3 0;
#X connect 15 1 8 0;
#X connect 15 2 13 0;
#X connect 16 0 23 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 24 0;
#X connect 24 0 23 0;
#X restore 29 220 pd errors;
#X obj 368 57 r \$0.stop;
#N canvas 331 504 599 419 status 0;
#X obj 32 23 r \$0.output;
#X obj 32 85 route for;
#X obj 32 106 route Peer...;
#X obj 121 82 route Connection;
#X obj 121 102 route for;
#X obj 121 122 route Peer!;
#X obj 32 43 route Waiting Received UDP;
#X obj 236 127 route too;
#X obj 236 147 route long;
#X obj 236 81 route waiting is;
#X obj 282 103 route waited;
#X obj 406 113 r \$0.running;
#X obj 32 186 b;
#X obj 121 188 b;
#X obj 406 133 sel 0 1;
#X msg 32 233 WAITING_FOR_PEER;
#X msg 406 161 STOPPED;
#X msg 465 162 STARTED;
#X msg 148 250 OK;
#X msg 255 284 NO_DATA;
#X obj 207 376 s \$0.outlet.0;
#X obj 275 204 del 100;
#X obj 236 183 t b b b;
#X obj 255 262 spigot 1;
#X msg 236 206 0;
#X obj 275 224 t b b;
#X msg 302 244 1;
#X msg 338 176 stop;
#X connect 0 0 6 0;
#X connect 1 0 2 0;
#X connect 2 0 12 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 13 0;
#X connect 6 0 1 0;
#X connect 6 1 3 0;
#X connect 6 2 9 0;
#X connect 7 0 8 0;
#X connect 8 0 22 0;
#X connect 9 0 7 0;
#X connect 9 1 10 0;
#X connect 10 0 7 0;
#X connect 11 0 14 0;
#X connect 12 0 15 0;
#X connect 13 0 18 0;
#X connect 14 0 16 0;
#X connect 14 0 27 0;
#X connect 14 1 17 0;
#X connect 14 1 27 0;
#X connect 15 0 20 0;
#X connect 16 0 20 0;
#X connect 17 0 20 0;
#X connect 18 0 20 0;
#X connect 19 0 20 0;
#X connect 21 0 25 0;
#X connect 22 0 24 0;
#X connect 22 1 23 0;
#X connect 22 2 21 0;
#X connect 23 0 19 0;
#X connect 24 0 23 1;
#X connect 25 0 18 0;
#X connect 25 1 26 0;
#X connect 26 0 23 1;
#X connect 27 0 21 0;
#X restore 29 196 pd status;
#X msg 159 55 server 195.176.247.53;
#X obj 298 288 outlet;
#X obj 298 268 r \$0.outlet.1;
#X connect 0 0 2 0;
#X connect 1 0 7 0;
#X connect 1 1 6 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 10 0 20 0;
#X connect 10 0 12 0;
#X connect 10 0 13 0;
#X connect 10 0 11 0;
#X connect 10 0 14 0;
#X connect 11 0 15 0;
#X connect 12 0 15 0;
#X connect 13 0 15 0;
#X connect 14 0 15 0;
#X connect 18 0 1 1;
#X connect 20 0 15 0;
#X connect 22 0 21 0;
#N canvas 20 301 608 378 10;
#X obj 20 20 cnv 18 100 18 empty \$0.location.label empty 4 10 0 12
-261689 -62784 0;
#X obj 272 20 cnv 18 248 18 empty \$0.error.label empty 4 10 0 12 -261689
-33289 0;
#N canvas 94 290 450 300 params 0;
#X obj 14 14 r \$1.updated.params;
#X obj 14 55 text size \$1.params;
#X obj 14 75 t a b;
#X obj 14 95 until;
#X obj 14 115 f;
#X obj 14 135 t a a;
#X obj 67 128 + 1;
#X msg 57 98 0;
#X obj 14 168 text get \$1.params;
#X obj 14 207 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 7 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 5 1 6 0;
#X connect 6 0 4 1;
#X connect 7 0 4 1;
#X connect 8 0 9 0;
#X restore 274 115 pd params;
#X obj 367 116 r \$0.portoffset;
#X msg 367 136 portoffset \$1;
#X obj 479 118 r \$0.clientname;
#X msg 479 140 clientname \$1;
#X obj 120 258 jacktrip;
#X obj 120 332 s \$0.status;
#X obj 165 302 s \$0.error;
#X obj 274 138 list trim;
#X msg 240 274 server telematic.zhdk.ch \, portoffset 0 \, numofchannels
2 \, bitrate 16 \, clientname ZURICH;
#X obj 496 310 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 496 330 s \$0.reset;
#X obj 88 95 r \$0.targetstate;
#X obj 88 115 sel 0 1;
#X msg 68 195 stop;
#X obj 128 158 f;
#X obj 128 178 sel 0 1;
#X msg 128 203 start;
#X msg 171 204 restart;
#X obj 68 171 del 0;
#X obj 124 20 hsl 145 18 0 1 0 0 \$0.start.button empty empty -2 -8
0 10 -262144 -1 -1 100 1;
#X obj 121 20 cnv 18 150 18 empty \$0.status.label empty 4 10 0 12
-261689 -33289 0;
#N canvas 655 469 328 336 logic 0;
#N canvas 0 43 327 403 location.label 0;
#X obj 12 335 s \$0.location.label;
#X msg 12 248 label \$1;
#X msg 96 261 color 3 \$1 \$1;
#X msg 96 234 13;
#X msg 131 236 18;
#X obj 12 64 text get \$1.clients;
#X obj 12 84 route bang;
#X msg 12 193 symbol empty;
#X obj 69 103 t a a;
#X msg 69 122 symbol \$2;
#X msg 96 195 \$3;
#X obj 96 213 sel 1 0;
#X obj 12 20 r \$1.refresh.client.display;
#X obj 12 42 f \$2;
#X obj 69 142 t a a;
#X obj 96 165 s \$0.clientname;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 6 1 8 0;
#X connect 7 0 1 0;
#X connect 8 0 9 0;
#X connect 8 1 10 0;
#X connect 9 0 14 0;
#X connect 10 0 11 0;
#X connect 11 0 3 0;
#X connect 11 1 4 0;
#X connect 12 0 13 0;
#X connect 13 0 5 0;
#X connect 14 0 1 0;
#X connect 14 1 15 0;
#X restore 15 17 pd location.label;
#N canvas 250 631 958 422 status.label 0;
#X obj 12 8 r \$1.refresh.mylink.display;
#X obj 12 361 s \$0.status.label;
#X msg 12 328 label \$1;
#X msg 287 324 color \$1 12 12;
#X msg 287 280 3;
#X obj 12 55 text get \$1.clients;
#X obj 12 33 f \$2;
#X obj 12 81 route bang;
#X msg 69 103 \$1;
#X msg 12 298 symbol empty;
#X obj 12 182 t b b;
#X obj 69 144 sel -1;
#X msg 131 209 \$2;
#X obj 131 229 s \$0.portoffset;
#X obj 69 124 text search \$1.mylinks 0;
#X obj 131 190 text get \$1.mylinks;
#X msg 69 239 0;
#X msg 102 239 1;
#X obj 102 168 t b a;
#X obj 399 188 s \$0.status.label;
#X msg 399 159 label \$1;
#X msg 477 153 color \$1 12 12;
#X msg 568 126 3;
#X msg 482 125 5;
#X msg 524 126 6;
#X obj 399 20 r \$0.status;
#X obj 399 40 t a a;
#X obj 468 71 route WAITING_FOR_PEER OK NO_DATA STOPPED STARTED;
#X obj 399 84 symbol;
#X obj 20 281 r \$0.reset;
#X obj 659 134 r \$0.reset;
#X obj 69 263 s \$0.targetstate;
#X connect 0 0 6 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 3 0;
#X connect 5 0 7 0;
#X connect 6 0 5 0;
#X connect 7 0 10 0;
#X connect 7 1 8 0;
#X connect 8 0 14 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 10 1 4 0;
#X connect 10 1 16 0;
#X connect 11 0 16 0;
#X connect 11 1 18 0;
#X connect 12 0 13 0;
#X connect 14 0 11 0;
#X connect 15 0 12 0;
#X connect 16 0 31 0;
#X connect 17 0 31 0;
#X connect 18 0 17 0;
#X connect 18 1 15 0;
#X connect 20 0 19 0;
#X connect 21 0 19 0;
#X connect 22 0 21 0;
#X connect 23 0 21 0;
#X connect 24 0 21 0;
#X connect 25 0 26 0;
#X connect 26 0 28 0;
#X connect 26 1 27 0;
#X connect 27 0 23 0;
#X connect 27 1 24 0;
#X connect 27 2 23 0;
#X connect 27 3 22 0;
#X connect 27 4 22 0;
#X connect 28 0 20 0;
#X connect 29 0 9 0;
#X connect 30 0 22 0;
#X restore 15 45 pd status.label;
#N canvas 134 396 357 308 error.label 0;
#X obj 49 37 r \$0.error;
#X obj 49 57 list;
#X obj 187 55 loadbang;
#X msg 187 75 32;
#X obj 187 95 list tosymbol;
#X obj 49 136 list append;
#X msg 49 156 symbol \$1\$4\$2\$4\$3;
#X msg 49 249 label \$1;
#X obj 49 271 s \$0.error.label;
#X obj 203 152 r \$0.status;
#X obj 203 172 route STARTED;
#X obj 203 192 b;
#X msg 203 212 symbol empty;
#X obj 232 191 r \$0.reset;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 7 0;
#X connect 13 0 12 0;
#X restore 19 85 pd error.label;
#N canvas 0 43 450 300 start.button 0;
#X obj 55 62 r \$0.targetstate;
#X obj 22 85 spigot;
#X obj 22 20 r \$0.start.button;
#X obj 22 40 sel 0;
#X obj 65 41 t a;
#X obj 37 117 r \$0.running;
#X obj 22 144 f;
#X obj 22 166 sel 0 1;
#X msg 22 199 start;
#X msg 63 199 stop;
#X obj 22 236 s \$0.manual.control;
#X connect 0 0 1 1;
#X connect 1 0 6 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X connect 3 1 4 0;
#X connect 4 0 3 1;
#X connect 5 0 6 1;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 9 0;
#X connect 8 0 10 0;
#X connect 9 0 10 0;
#X restore 15 128 pd start.button;
#X obj 13 175 r \$1.connection.state;
#X msg 13 195 0;
#X obj 13 215 s \$0.targetstate;
#N canvas 798 572 370 200 running 0;
#X obj 15 14 r \$0.status;
#X obj 15 38 route WAITING_FOR_PEER OK NO_DATA STOPPED STARTED;
#X msg 15 103 1;
#X msg 52 104 0;
#X obj 15 145 s \$0.running;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 2 0;
#X connect 1 2 2 0;
#X connect 1 3 3 0;
#X connect 1 4 2 0;
#X connect 2 0 4 0;
#X connect 3 0 4 0;
#X restore 17 261 pd running;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X restore 27 63 pd logic;
#X obj 143 134 r \$0.running;
#X obj 29 230 r \$0.manual.control;
#X connect 2 0 10 0;
#X connect 3 0 4 0;
#X connect 4 0 7 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 7 1 9 0;
#X connect 10 0 7 0;
#X connect 11 0 7 0;
#X connect 12 0 13 0;
#X connect 14 0 15 0;
#X connect 15 0 21 0;
#X connect 15 1 17 0;
#X connect 16 0 7 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 18 1 20 0;
#X connect 19 0 7 0;
#X connect 20 0 7 0;
#X connect 21 0 16 0;
#X connect 25 0 17 1;
#X connect 26 0 7 0;
#X coords 0 -1 1 1 500 18 2 20 20;
Abstract
--------
Protocol Version: 1.0
This document describes the protocol used by the TPF (telematic performances format [1]) tool
set which consists of a client part and a server part. An implementation of the server
is always running on telematic.zhdk.ch on TCP port 3025. This document describes how
the client interacts with the server. It serves as a reference to allow for a client
implementation in any programming language that supports OSC (Open Sound Control [2]). Along
with that document comes a client implementation done in Pure Data [3]: tpf-client.pd
Underlying protocol
-------------------
This specification is based on the OSC 1.1 [2] format and uses TCP as transport method. Since
OSC consists of packets and TCP is a stream oriented protocol, SLIP [4] is used as an
encapsulation mechanism to allow OSC packets to be transported over TCP.
About notation style
--------------------
OSC supports a wide range of data types as payload. Since we're dealing only with strings
and integers, we assume any number to be of the type integer and any non-numeric data
to be of type string. To facilitate notation in this document, we omit any type specification
in OSC messages and write only OSC address, optionally followed by payload. An OSC message
with the adress '/some/path/' and 'string' (type string) and '43' (type int) as payload is
written as:
/some/path string 43
A 'C: ' is prepended to denote messages sent by the client, while server messages are
prepended by a 'S: '.
Initialization
--------------
Clients are identified by their socket number, which is assigned by the server.
When the client connects to the server, it requests its own socket number:
C: /s/server/socket
The server responds with:
S: /s/server/socket 4
Once the client knows its socket number, it negotiates the protocol version to ensure
that client and server speak the same language:
C: /s/tpf/protocol/version
S: /s/tpf/protocol/version 1 0
The client is supposed to disconnect with an appropriate error message in case of a
protocol version mismatch.
Once the procol version is agreed upon, the client registers its given name, which
can be any string configured by the user:
C: /s/tpf/register/name ZHdK
S: /s/tpf/register/done
If the server responds with:
S:
[1] https://blog.zhdk.ch/telematic/
[2] http://cnmat.berkeley.edu/system/files/attachments/Nime09OSCfinal.pdf
[3] https://puredata.info/
[4] https://tools.ietf.org/html/rfc1055