-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommunication Policy
62 lines (47 loc) · 1.55 KB
/
Communication Policy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Client -> Server
1.
On Connection:
Confirm Client version is up to date at the server
Pass the ID
2.
Disconnection:
ID
3.
Maintaining state and connection:
* Periodic polling of the client that will return:
- Current scene
* If not connected will remove the client from the list
4.
Change the scene Midi-program -> server -> client
* Some kind of unique/special midi message can be used to
trigger this.
* List of available scenes
5.
Per Scene Message
[ 5 , client_id , scene_id , scene_msg_type , data ]
Client -> Server
Scene outputs may be defined by reactions to the graphical display.
eg. Server->Client sends specific midi note,
this creates an interactive button the user can choose to press or not.
Therefore, it does not make sense to use generalised client HydraMessages,
but send a byte array
Example Scene Policy
FountainScene
- Touch Screen Down
[ 5 , client_id , 1 , 1 , x y coordinates ( 4 * 2 bytes ) ] 12 bytes
- Touch Screen Up
[ 5 , 1 , 2 , x y coordinates ( 4 * 2 bytes ) ] 12 bytes
- Touch Screen Movement -> Volume control
[ 5 , 1 , 3 , x y coordinates ( 4 * 2 bytes ) ] 12 bytes
- Rotation -> PitchBend
[ 5 , 1 , 4 , rotation_matrix ( 4 * 16 bytes ) ] 68 bytes
Server -> Client
Midi Messages
- Scene Specific Messages
- Send state to new client
- Choose client from which we will start receiving messages
- Scene change message
Server Messages
- Connection confirmation
- Periodic connection status // Not important yet
- Server shutdown