Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

1

A
Project Report
On
MUSIC PLAYER USING JAVA
Submitted in partial fulfilment of the requirements
For the Degree Of
Bachelor of Engineering in
Computer Engineering

By
RAHUL KHANDEKAR Roll No.-02
JAY NIKHAL Roll No.-21
SUPRIYA GORE Roll No.-24
AKASH SINGH Roll No.-25
Supervisor
Prof. DINESH BHERE

Technology Personified
Department of Computer Science and Engineering Innovative Engineers' and
Teachers' Education society's
Bharat College of Engineering
Badlapur: - 421504.

1
2

(Affiliated to University of Mumbai)

Technology Personified
Bharat College Of Engineering
(Affiliated to the University Of Mumbai)
Badlapur: - 421504.

CERTIFICATE
This is to certify that, the Project titled

MUSIC PLAYER USING JAVA


Is a bona-fide work work done by
RAHUL KHANDEKAR
JAY NIKHAL
SUPRIYA GORE
AKASH SINGH
And is submitted in he partial full-fillment of the requirement for the degree of

Bachelor in Engineering in Computer Science and Engineering


To the University of Mumbai

_________ ___________________ _________________ __________


(External) (Prof.Dinesh Bhere) (Head Of Department) (Principal)
Deepa Athawale Vishwas Pudale

2
3

ABSTRACT

Music is a part of every person’s life. No matter what your mood is, you
have a song to sustain that mood. If you wish to play your desired songs on
Android devices, you need a music player. So, through this article, we will
try to build our music player app using Android.

The music player app that we will develop in this article would allow the
users to play the songs present on the device. You can download songs on
your device and then use the music player to play those songs. Let’s see
the quite exciting features that you get along with this app.

3
4

Contents
CHAPTER TITLE PAGE NO.

1 Introduction 5

1.1 Problem Definition 6

1.2 Scope of Project 7

2 Methodology 8

3 Experimental Results

3.1 Code and Input 9

3.2 Output and Screenshots 13

4 Conclusion 14

5 References 15

4
5

Introduction

Music players have a very wide field of application ranging from


professional tools at the workplace to the leisurely consumer and to
children who use these devices as toys. They are portable digital music
players that play music as audio files, such as MP3. In addition, most of
these devices allow to store video, pictures, and to receive radio and TV
programs (podcasting). Earphones and external speakers are the typical
output devices delivering sound to the listener. Personal music players
(PMPs) are widely used in conjunction with several headphones of
different styles (insert, supra-aural, vertical, and circumaural).

5
6

Problem Statement and Background

In the modern music scene, more and more audio content is


accompanied by visual aids. Whether through music videos, album
covers, promotional clips, or live lighting and visuals, music and video
are closely linked. Despite this, creating videos to accurately match
music can often be challenging for musicians. Therefore, musicians may
want visuals to accompany the music they create, without having to
design these themselves.

Our project aims to match input audio clips to similar video clips stored
in a database. With this tool, artists can stitch together visuals from
music videos or other visual sources to generate visual
accompaniments for their music.

For technical evaluation, we planned to focus on both validation and


training accuracy of our network. Although training accuracy is not a
good measure of the network’s ability to generalize to other data, it is a
helpful informal metric for quickly evaluating the learning power of
different network architectures. Validation accuracy is a more accurate
measure of the ability to generalize to data that it has never seen before.

6
7

Scope

The music player allows a user to play various media file formats. It can
be used to play audio as well as video files. The music player is a
software project supporting all known media files and has the ability to
play them with ease.

The project features are as follows:

 User may attach Folder to Play add various media files within it.
 User may see track lists and play desired ones accordingly.
 Supports various music formats including .mp3, WMA, WAV etc.
 Interactive GUI
 Consists of Pause/Play/Stop Features
 Consists of a Volume controller
 The system also consists of a sound Equalizer
 It Displays the media playing time with Track Bar so that user may
drag the media play as needed.

7
8

Methodology

This is a very simple app suitable for beginners to learn the concepts.
The following pre-requisites is good enough before starting.

1. Android fundamentals for beginners


2. Install and Set up Android Studio
3. First android app project
4. How to Run your first Android app
5. The following things you will learn in this article:
6. Implementing MediaPlayer class and using its methods like pause,
play and stop.
7. Using external files(images, audios, etc) in our project.
8. Building the interface of our Music Player Android App.

8
9

Program

XML CODE :-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:theme="@style/Theme.AppCompat"
tools:context=".MainActivity">

<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="430dp"
9
10

android:background="@drawable/download"
android:contentDescription="@string/todo" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:background="@color/colorAccent"
android:orientation="horizontal"
android:padding="10dp">
<Button
android:id="@+id/pause"

style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="125dp"
android:layout_height="match_parent"

android:background="@android:drawable/ic_media_pause"
android:onClick="musicpause" />

<Button
android:id="@+id/start"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="125dp"
android:layout_height="match_parent"

android:background="@android:drawable/ic_media_play"
android:onClick="musicplay" />

10
11

<Button
android:id="@+id/stop"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="125dp"
android:layout_height="match_parent"
android:background="@android:drawable/ic_delete"
android:onClick="musicstop" />
</LinearLayout>
</LinearLayout>

JAVA CODE :-
package com.example.music;

import android.media.MediaPlayer;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity


extends AppCompatActivity {

// Instantiating the MediaPlayer class


MediaPlayer music;

@Override
protected void onCreate(

11
12

Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Adding the music file to our


// newly created object music
music = MediaPlayer.create(
this, R.raw.sound);
}

// Playing the music


public void musicplay(View v)
{
music.start();
}

// Pausing the music


public void musicpause(View v)
{
music.pause();
}

// Stopping the music


public void musicstop(View v)
{
music.stop();

12
13

music
= MediaPlayer.create(
this, R.raw.sound);
}
}

OUTPUT

13
14

14
15

Conclusion
Through the development of music player on Android platform, we get a
clear understanding of overall process of the system. The core part of
music player is mainly composed of main interface, playlist, menus, play
setting file browsing and song search.
The design of music player based on Android system requires
elaborate design of the music player framework, by adopting Eclipse 3.5
+ java languge as technical support of this system, with the android plug
-in tools, and combination of android SDK 2.1 version lead to the
comprehensive and smoothly design and development of the mobile
terminal.

15
16

REFERENCES

 https://shsu-ir.tdl.org/shsu-
ir/bitstream/handle/20.500.11875/1164/0781.pdf?sequence
=1

https://ieeexplore.ieee.org/document/6208293/

https://ieeexplore.ieee.org/document/4679917/

16

You might also like