## 3 Design of the Impromptu Mobile Social Karaoke System
### Social Music Information Sharing and Audio Streaming  
The system includes a user datagram protocol (UDP) which supports connectionless data transmission for data streaming between mobile devices and the social music cloud. UDP packets capable of fast data transmission were configured for the extemporaneous creation of social music groups and music sharing. The packets consist of a control packet (CP) in charge of information and an opinion packet (OP) in charge of data. The CP contains  
Figure 4: Voice/touch-based user interaction interface. Figure 3: A system for the Mobile Social Karaoke service. commands for group control, and the OP contains music streaming data. The OP is 7-byte data consisting of Course, Type, Error_status, Group, and Command. The Course is the direction in which the packet is transmitted and expresses 0 in the case of the direction from the smartphone (HP) to the server and 1 in the opposite case. The Length represents the length of the CP, and the Type indicates transmission with 0 and responses with 1. The Error_status indicates the status when there is an error during transmission/reception. The Group and Command are utilized for the states of users in the group and for control. The Group is a message type in the form of information that is sent from the device and the server and it represents notification delivery from the device (Group_Info), notification delivery from the server (Group_Server), and group session monitoring information (Group_Monitor). The Group_Info includes the delivery of group access, song start, song ends, and scores, and the Group_Server includes the delivery of notices for the group, song start, request, score request, evaluation score notification, and the notification of song end in group. The Group_Monitor is conducted periodically and it is a notification of the user device's entry into and exit from the session. Tables 1 and 2 describe this CP packet structure in detail. Based on these CP and OP packets, the user devices continuously communicate with the server to control the music sharing state and stream music. As shown in Figure 5, the server exchanges CP with user devices to create a group, and, when a song starts, audio streaming occurs among users in the group. At this moment, the OP is utilized because OP is a packet to store voice data. The voice data are sampled from the singing device and are delivered to other users through the server. One session of a social music group consists of one person who is singing and the rest who are listening to the song. For this, UDP streaming for communication with the server is supported based \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & **Length** & **Remark** \\ \hline Course & 1 & 0: Smart Phone(HP) -? server, 1: server -? HP \\ \hline Length & 2 & Length of control message in bytes (CP length) Byte order \\ \hline Type & 1 & 0: send, 1: reply \\ \hline Error status & 1 & When sending, the setting value is 0, and when responding, If the control message cannot be executed, the specified value is set. \\ \hline Group & 1 & Group message type \\ \hline Command & 1 & Command according to group message \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Structure of UDP CP.