CtoS = Client to server
StoC = Server to client

String = 2 bytes string length, then string bytes



CtoS) Login:
	1 byte: 0x00 : Login command id
	String: username
	String: password

StoC) LoginResult:
	1 byte: 0x00 : Login result message id
	1 byte:
		0x00 = success
		0x01 = failure



CtoS) Start Listening: //if already listening then move to next player
	1 byte: 0x01 : Start listening id

StoC) Player playing:
	1 byte: 0x01
	String player nickname



CtoS) Stop Listening:
	1 byte: 0x02 : Stop listening id

StoC) Stop Listening: //indicating that there is noone to listen to or other error
	1 byte: 0x02 : Stop listening id



CtoS) Playing:
	1 byte: 0x03 : Playing message id
	1 byte: instrument ID
		0 = Sine + ADSR
		1 = Plucked string
		2 = Trombone
		3 = Clarinet
	//music data
	2 byte: number of music actions
	n byte: [music actions]

StoC) Playing:
	--//--//--

music actions:
1) Note on actions / note change actions
	1 byte: 0x00 : id
	4 bytes: u32 : timestamp in milliseconds
	1 byte: volume
	4 bytes: frequency : float

2) Note off actions
	1 byte: 0x01
	4 bytes: u32 : timestamp in milliseconds



//register request has to be sent when not logged in
CtoS) Register:
	1 byte: 0x04 : id
	String: desired username
	String: password

StoC) Register result:
	1 byte: 0x04 : id
	1 byte: ersult code:
		0 = success
		1 = username already exists
		2 = username contains forbidden characters
		3 = some error


