Illusion : A Smart Music Player

— Now a day’s music players are one of those applications that is always present in any user’s mobile phone. For most users, listening to music is a distressing and feel good activity. For many, listening to music is a fun activity, many use it to just relax, many use it for gym, exercise and running to boost their energy levels. Also, it is proven that listening to right kind of music at right time can shoot human emotions by changing human psychology and hence can make humans feel better and more relaxed. It was observed that most of the music players in India just recommend songs based on the user’s behaviour or similarity between songs. It becomes annoying whenever the user has to change the playlist and current music a number of times, which most probably does not suit the user’s current mood, current activity, type of song user wants to listen at a particular moment of time, based on the environment, time, activity, etc. So, “Illusion” is a smart music player application, that will detect any user’s current heart rate data and his/her current activity status and thus music player will figure out the list of songs that can be played to better suit the user at any moment of time, automatically.


I. INTRODUCTION
Most of the people around the world uses music player. Also, the demand for better music player is rising day by day, which is one of the booming markets in every country. Unfortunately, most of the products of music player applications recommend songs based on the user's preference given explicitly or similarity between different music's. Many a times this makes the user to change the current music track a number of times to suit his/her current emotional status, activity status and environment, which can create irritation for any user. Illusion, is a smart music player that recommend songs automatically based on the user's current heart rate and the current activity level that the user is performing at any particular moment of time. Also, feedback and behaviour of the user for every music can be used to recommend music that will be more precise based on the conditions of the user and the music. Apart from this the objective of the smart music player is to enhance the mood of the user from a bad state where the user could be in stressed out, anger, crying, feeling bad, depressed state etc., to a more good state where the user feels good and hence become happy, just with the help of some tweaks in user's psychology unknowingly, which will be done by our application.
II. RELATED WORK One of the works was the creation of music recommendation system that recommends music based on the user behaviour. This work was conducted by students of computer science at University of Miami, USA [1]. Their goal was to recommend song that would favour the user based on the act that the user take on the current music played on the music player. Also, it checks for the freshness of songs so that songs feel fresh to user's ear every time.The advantages of this system is that the approach which is used in this paper considered genre, recording year, freshness, favor and time pattern as factors to recommend songs. The evaluation results demonstrate that the approach is effective. The disadvantages of this system is that it is not considering any human inputs like heartbeat or motion data which proves to be useful for detecting human emotions. With the use of such factors accuracy gradually increases.
Another work includes the creation of music player which recognizes the user emotion based on just the voice of the user and recommend songs accordingly. The advantages of this system is that the it is using voice based song recommendation approach and has an overall accuracy of 81.57% although the disadvantages could be that it could have used more inputs for detecting emotions instead of just voice signals i.e. heart rate data and accelerometer data. The work was done by students of Electronics and Telecommunication Department of Fr. CRIT, Mumbai, India [2].
Next work was given by the students of Information Technology, King Mongkut's Institute of Technology, Bangkok, Thailand [3]. The work was Emotion Based Music Player. Here the music was recommended by the music player solely based on the emotions that was felt by user and the prediction of user's current emotional state was taken by the user's heart rate and by facial recognition.The advantages of this system is that the experimental results present that detecting the happy emotion is the most precise with around 98%. The disadvantages of this system are that emotion detection based on facial image recognition is susceptible to many disturbances and facial expression analysis suffers from face oval partial cover, location of the camera, lower quality, insufficient or uneven illumination. The accuracy results proves to be indefinitely low as the accuracy of the sad mood detection is the lowest with 40%. The song database has lesser song data too.
Two more similar work was done by students from US and professors from Germany and South Korea [4] [5], where the music was recommended by the music player to the user based on the activity that the user was performing at any moment of time. The advantages of this system is that it has good accuracy results. The deep residual bidirectional gated recurrent neural network (DRBGRNN) with data augmentation has the best activity recognition rate of 98.4%The disadvantages of this system is that it is only recommending music based on accelerometer data which detects user activity whereas emotions play an important role too. B. System Design and Implementation 1. System Overview The system overview of the proposed application is presented in Fig. 1. The mobile application will collect users heart rate from smart band connected to application via bluetooth, then the application will collect accelerometer data from mobile accelerometer so as to detect user's activity level. The data will be pushed to server, processed and then the application will suggest songs that will suit user's current status from the database where, even the music is classified into categories to match the user's activity level.

Working Model
This application requires hardwares such as mobile accelerometer and smart band. The smart band is required to be connected to the android application using bluetooth. The application is then used to collect the heart rate data from smart band and then the accelerometer data from mobile accelerometer. The data thus collected is then pushed to the server for the necessary processing. On the server side, based on the heart rate data and accelerometer data collected from the application, it is then processed to find the activity level of the user. Then based on heart rate and activity level of user, a playlist is being generated from the database that suits and matches the heart rate as well as activity level of the user, based on research studies. The database consist of approximately 850 songs. Each songs in the database has been classified into three music tempo category based on the tempo of the overall music. The activity of the user is determined by the accelerometer data obtained from mobile accelerometer. 3. Implementation GUI Design : The GUI basically is a music player system that is designed based on android application. It will contain basic features like play button, next button, previous button as well as activity button that will start collecting the user's accelerometer data and heart rate data from accelerometer device and smart band respectively. Music will be played using the GUI play bar.
Database Creation : The database consist of various types of songs consisting of Hindi, English, lyrics based as well as instrumental based songs. Our database contains music files in .mp3 as well as ".ogg" file formats. The main component of the database will be the "music data" file, which will contain information regarding path at which all music files are stored, music names and tempo associated with each music files. These data then later be used by the application server to predict relevant music files that needs to be given to the user, based on their current heart rate as well as current activity level.
Extraction Of Data : Relevant data that needs to be fetched before any processing starts, will be implemented in this module. Two very important data sets that need to be fetched are accelerometer data and heart rate data. Accelerometer data consist of body/linear accelerometer data (x-, y-, zcoordinates), gravity accelerometer data (x-, y-, z-coordinates) and gyroscope data (x-, y-, z-coordinates). Heart rate data will consist of a number which will denote the current heart rate of the user, at any moment of time.
Model Creation : Model for predicting user's activity level needs to be build. This model thus then be used to predict user activity level based on the data retrieved from android application. The data received will be processed first to extract relevant information out of the raw data and thus further will be applied to this model to predict user's activity level. Deep neural network can be used to create the model. created by our approach gives us an accuracy of 95.91% while training and this is then saved for later use.
Activity Prediction : The accelerometer data (that is linear accelerometer data, gravity accelerometer data and gyroscope data) that is received from android application at the server end is then processed to create a excel file. This excel file is then used by our program/algorithm to generate 261 features out of the 9 received features. These new features are then applied to the activity prediction model created earlier to predict the user's activity level. The user's activity level is classified into three categories that is low, moderate and high activity level. The activity level thus generated after processing is then stored in a text file for further processing.
Final Implementation : In this phase various other small tasks will be achieved, that will be remaining for proper completion of the project. Some of these tasks could be establishing connection between front end application and the back end server, collecting as well as sending relevant data to and from mobile application to server, playing music files, creating api's for different buttons such as play button, next button, previous button etc.
IV. RESULTS AND ANALYSIS The GUI was designed and tested successfully. Application consisted of four buttons where the functionalities of buttons were to get heart rate data and accelerometer data, base URL field area where user can specify the server's IP address, first song button which will send all the extracted data to the server and thus will receive the first song and the last button fetches the next songs within the playlist created at server. Database for music tempo was generated and was stored in a text file for further processing. The file consisted of path of the database and details of music such as name of music file and its tempo. Extraction of certain data like accelerometer data (that is linear accelerometer, gravity accelerometer and gyroscope) and heart rate data was performed successfully and was displayed temporarily for analysis purpose. The model for predicting user's activity level was created successfully, attaining an accuracy of 95.91%. Then the testing of model was performed by taking 9 features of accelerometer data and calculating 261 features out of it. These features were then given to the model and the activity status was predicted and was stored in a text file. Heart rate was categorized into 3 levels that is low, normal and high. Data from android application was received successfully and the results are stored in text file for further processing. All the testing and results were observed and final implementation of overall system was performed and thus the music was played accordingly.

V. CONCLUSION
We propose a smart music player which will be implemented as an Android application. This application aims to suggest songs based on emotion of the user at any moment, activity of the user at that moment, preference set by that user and previous behaviour of the user based on songs, timing, circumstances etc. The main functions of the application would be finding users current mood, users current activity, users current explicit preference that is sensitivity of song preferred by user and based on the users implicit preference that is users past behaviour which includes active play times, passive play times, skip time, forgetting curve etc. for songs, recommend relevant songs which would be relevant for the user at that moment of time. Also, the main objective of the application is to improve user's mood with the help of the concept of Pattern Break in Psychology.

ACKNOWLEDGEMENT
We would like to thank our guide Mr. Atul Kachare, Head of the Computer Engineering Department for always providing us with their valuable guidance and suggestions. We would also like to thank the panel of examiners for their valuable input during all the stages of the presentations and for their time and effort they put to assess our work. Without the help and assistance of the people mentioned above the successful completion of the project would not have been possible. Through the course and whole of our life, I would thank my family who has always supported me in my growth.