You are on page 1of 32

A

INDUSTRIAL TRAINING REPORT


PIANO PALYER

For the award of the degree of


BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING
By
SOURAB GARG
(20010603048)

SCHOOL OF COMPUTER SCIENCE & ENGINEERING


DEPARTMENT OF BACHELOR OF TECHNOLOGY
GOVT. P.G. COLLEGE DHARAMSHALA

HIMACHAL PRADESH TECHNICAL UNIVERSITY


HAMIRPUR

SESSION 2020-24
PIANO PLAYER
A
PROJECT REPORT
Submitted in partial fulfillment of the Requirements
For the award of Bachelor of Technology in Computer Science and Engineering

HIMACHAL PRADESH TECHNICAL UNIVERSITY


HAMIRPUR (H.P.)- INDIA

INDUSTRIAL TRAINING REPORT

Submitted by
Sourab Garg (SEM-V)
Roll No. 20010603048
Under the Guidance of
Internal Guide Head Of Department
Dr. Satish Sood Dr. Pawan Thakur

SCHOOL OF COMPUTER SCIENCE & ENGINEERING


DEPARTMENT OF B. TECH (CSE)
GOVT. P.G. COLLEGE DHARAMSHALA
HIMACHAL PRADESH
SESSION 2020-24
GOVT. P.G. COLLEGE DHARAMSHALA
SCHOOL OF COMPUTER SCIENCE & ENGINEERING
BACHELOR OF TECHNOLOGY
HIMACHAL PRADESH TECHNICAL UNIVERSITY
HAMIRPUR (H.P.)

CERTIFICATE
2020-2024

This is to certify that the work embodied in this dissertation entitled “PIANO
PLAYER” has been satisfactorily completed by Mr. SOURAB GARG
(20010603048). It is a bonafide piece of work, carried out under my guidance in the
Bachelor of Technology, Govt. P.G. College, and Dharamshala for the
partial fulfillment of the Bachelor of Technology in Computer Science and
Engineering degree during the academic year 2020-24.

Internal Guide: Head of Department:


Dr. Satish Sood Dr. Pawan Thakur
Department of B. Tech (C.S. E) Department of B. Tech (C.S.E)
Govt. P.G College Dharamshala Govt. P.G College Dharamshala
GOVT. P.G. COLLEGE DHARAMSHALA
SCHOOL OF COMPUTER SCIENCE & ENGINEERING
BACHELOR OF TECHNOLOGY
HIMACHAL PRADESH TECHNICAL UNIVERSITY
HAMIRPUR (H.P.)

APPROVAL CERTIFICATE
GOVT. P.G. COLLEGE DHARAMSHALA
SCHOOL OF COMPUTER SCIENCE & ENINEERING
BACHELOR OF TECHNOLOGY
HIMACHAL PRADESH TECHNICAL UNIVERSITY
HAMIRPUR (H.P.)

DECLARATION
2020-2024

I, Sourab Garg (20010603048), a student of Bachelor of Technology (CSE), Govt. P.G.


College, Dharamshala hereby declare that the work presented in this Minor Project is
outcome of my own work, is bonafide, correct to the best of my knowledge and this work
has been carried out taking care of Software Ethics. The work presented does not infringe
any patented work and has not been submitted to any University for the award of any degree
or any professional diploma.

SOURAB GARG
B. Tech (Sem-V)
(20010603048)
ACKNOWLEDGEMENT
I would like to express my greatest appreciation to the all individuals who have helped and
supported me throughout the project. I am thankful to my teacher Dr. Satish Sood ongoing
support during the project, from initial advice, and encouragement, which led to the final
report of this project. I would also like to thank Dr. Pawan Thakur who was always there
for assistance.
A special acknowledgment goes to my classmates who helped me in completing the project
by exchanging interesting ideas and sharing their experiences.
I wish to thank my parents as well for their undivided support and interest who inspired me
and encouraged me to go my own way, without whom I would be unable to complete my
project.
At the end, I want to thank my friends who displayed appreciation to my work and
motivated me to continue my work.
Abstract:

The virtual piano I made is a 11 keyed piano keyboard implemented to make it an easy and
compact solution.

There are two ways to play this piano - one is ideal for devices with physical keyboards
(desktops, laptops, etc.) and the other way is ideal for devices with touch screens (smart
phones, tablets, etc.). The virtual piano keyboard is a python application, so it can run on
almost all devices (Windows, Mac, android, etc.).

Light weight techniques are used in the development of this virtual piano to prevent it from
being resource-hungry.

This project is an attempt to combine functionalities of piano into user-friendly application.


However, I would like to make it clear that no claim is being made that this can replace a
professional music production software.
Table of Content:

Sr. No. Content Page No.

1. Introduction 1-2

1.1. Background and Motivation

2. System Requirements 3

3. System Analysis 4-6

3.1. Control Flow Diagram


3.2. Data Flow Diagram

4. System Design and Coding 7-11

4.1. Setting up frame


4.2. Adding label
4.3. Adding buttons
4.4. Assigning audio files
4.5. Binding keys

5. Testing 12-14

6. Result 15

7. Future Scope 16

8. References 17
INTRODUCTION
1. Introduction:
A piano is a keyboard musical instrument invented by Bartolomeo Cristofori around the
year 1700 in Italy. There are many types of pianos available, the categorization can be done
based on factors such as number of keys, digital/analog, size etc.

The project I made is a 11 keyed piano keyboard which can be played on almost any
modern and old days device without any special hardware or system specifications
requirements.
This application is directed towards those who have a side hobby of playing piano but they
are unable to do so due to some particular reason. Some of these reasons are lack of
willingness to handle a physical object, investment required to buy an actual piano
keyboard.

1
1.1. Background and motivation:
Musical instruments have long been a major source of entertainment in our culture.
With all the advancements in DSP (Digital Signal Processing) and electronics in the
recent years, generating music electronically has never been easier. Yet many
musicians still train with and prefer to play the physical instruments. With my
project, I hope to advance the creation of music further into the digital realm while
still drawing upon skills learned via traditional instruments.

I have picked the Piano as my choice of instrument to digitize. The Piano is widely
played by music students and musicians. In this project I add two sides of
digitization: keyboard and mouse or touch screen. This, Virtual piano allows us to
fiddle with the digital sound output, while taking input from user.

2
SYSTEM REQUIREMENTS
2. System Requirements:
This piano player is made by using light weight technologies so user not need a
high-end specification, any low-end device with given specification can run it very
smoothly.

Processor • Minimum: 600 MHz Pentium Processor


• Recommended: 1 GHz Pentium
processor recommended

RAM • Minimum: 256 MB


• Recommended: 1GB

Hard Disk • Minimum: 2GB of available space required on


_____installation drive, and 1 GB of available space required
on system drive.
• Recommended: 74x3GB

CD or DVD Drive • Optional

Display • Minimum: 800 x 600 256 colors


• Recommended: 1024 x 768 High Color -16-bit

Software • Python (2.3 or above)

Hardware • Video (VGA or higher resolution, 800 x 600 or higher


ddddd resolution).
• Pointing Device (Microsoft Mouse or Compatible)
• Keyboard

3
SYSTEM ANALYSIS
3. System Analysis:

System analysis is the process of studying a system or its parts in order to identify its
objectives, result and how to achieve those. It is a problem-solving technique that
improves the system and ensures that all the components of the system work efficiently
to accomplish their purpose.

Basically, there are three major components in every system, namely input, processing
and output. Which are described using Control Flow and Data Flow Diagram.

3.1. Control Flow Diagram:

Control Flow Diagram is the graphical representation of control flow or computation


during the execution of program or application.

User
(Input)

Call
Functions
According
to Input

Output
(Play Audio)

4
Here, this control flow diagram represents three different steps:

1. Take input from user by pressing different buttons.


2. Call for audio files stored in computer’s storage.
3. Play different audio files according to user’s input.

3.2. Data Flow Diagram:

It illustrates what kinds of data will be input and output from the system, where the
data will come from and go to, and where the data will be stored.

A DFD is often an elaboration of a context diagram to show some of the detail of the
system that was first illustrated through the context diagram.

Input
(Keyboard/ Buttons:
Mouse) • A
• B Functions:
• BB • PlayF
• CS • PlayC
• ----- • PlayFS
• ---- • ----
• ----
• ----
Audio Files: • ------
• A.wav
• C.wav
• FS.wav
• -------
Output
(Audio Form)

5
In previous Data Flow Diagram, it performs following steps:

1. Take Input from user which can be either from mouse and keyboard or together
at same time.
2. User will press certain buttons according to his own desire.
3. Pressed button will call its linked function.
4. Then the function will call the audio files defined to it, which are stored in
computer’s storage.
5. At last, he/user will hear the audio as output.

6
SYSTEM DESIGN
AND CODING
4.1. Setting up Frame:

Frame is the first thing that you see when you open our application. Everything that I add
is added inside this frame.
Here, I use Tkinter to set my frame’s background, size, title and its revisability.

Coding:

Output:

7
4.2. Adding Label:

In this project to create label I also use Tkinter (Python’s GUI package), and set label’s
position, font size, font type, background and also add padding onto the label.

Coding:

Output:

8
4.3. Adding Buttons:

To create buttons in my project I again use Tkinter (Python’s GUI package) and set its
position in term of rows and column, set its padding, font, background color, foreground
color and action(command) that it will perform. That is to call different ‘play’ functions
and play different sounds.

Coding:

Output:

At this stage, buttons will perform no operations /action on its provocation.

9
4.4. Assigning Audio Files:

Firstly, I create different functions and assign all audio files to all functions using
Playsound and link its action to its designated button using ‘command’ parameter in
buttons.

Coding:

Output:

There will no change in appearance to previous step but now it can get output in certain
audio as assigned to its designated buttons.

10
4.5. Binding Keys:

At this stage user can only play piano with mouse. To take inputs from keyboard I use
‘bind’ method with Tkinter, to assign different functions with ‘lambda’ (for fast calling
and execution of functions) to all buttons and also add key text to different buttons
according to its audio files, to know which key will provoke which button.
• Note: Key binding is case sensitive so check your ‘Caps Lock’ key before using
this virtual piano.

Coding:

Output:

11
Testing
Testing:

Software testing is any activity aimed at evaluating an attribute or capability of a


program or system and determining that it meets its required results. Although crucial
to software quality and widely deployed by programmers and testers, software testing
still remains an art, due to limited understanding of the principles of software. The
difficulty in software testing systems from the complexity of software: we cannot
completely test a program with moderate complexity. Testing is more than just
debugging. The purpose of testing can be quality assurance, verification and validation
or reliability estimation. Testing can be used as a generic metric as well. Correctness
testing and reliability testing are two major areas of testing. Software testing is a trade-
off between budget, time and quality.

Testing Objectives:
The main objective of testing is to uncover a host of errors, systematically and with
minimum effort and time. Stating formally, we can say,
Testing is a process of executing a program with the intent of finding an error.
A successful test is one that uncovers an as-yet-undiscovered error.
A good test case is one that has a high probability of finding error if it exists.
The tests are inadequate to detect possibly present errors.
The software more or less confirms to the quality and reliability standards.

Unit Testing
Unit Testing It is a type of software testing in which a small piece of code is tested to see
if the code works as expected. The name is derived from the fact that tests are done on a
unit-by-unit basis. The goal of Unit testing is to help reduce the cost of bug fixes, as this
way, bugs or errors in the code level are identified early in the development lifecycle. The
cost of fixing bugs rises exponentially as it progresses into the later stages of the Software
12
Development Lifecycle, which makes unit testing a critical element and money-saving for
the company.

Traditionally, unit testing was not considered part of the QA team’s responsibility, as it is
mostly performed during the development phase of an application or a product and is
typically performed by the software developer.

(Unit Testing)

13
Debugging And Code Improvement:

It is a systematic process of spotting and fixing the number of bugs, or defects, in a piece
of software so that the software is behaving as expected. Debugging is harder for
complex systems in particular when various subsystems are tightly coupled as changes
in one system or interface may cause bugs to emerge in another.

Debugging is a developer activity and effective debugging is very important before


testing begins to increase the quality of the system. Debugging will not give confidence
that the system meets its requirements completely but testing gives confidence.

Code improvement is the most formal type of review, which is a kind of static testing to
avoid the defect multiplication at a later stage.

• The main purpose of code inspection is to find defects and it can also spot any process
improvement if any.

• An inspection report lists the findings, which include metrics that can be used to aid
improvements to the process as well as correcting defects in the document under review.

• Preparation before the meeting is essential, which includes reading of any source
documents to ensure consistency.

• Inspections are often led by a trained moderator, who is not the author of the code.

• The inspection process is the most formal type of review based on rules and checklists
and makes use of entry and exit criteria.

• It usually involves peer examination of the code and each one has a defined set of
roles.

• After the meeting, a formal follow-up process is used to ensure that corrective action
is completed in a timely manner.

14
OUTPUT
Final Output:
After completion of testing, debugging, adding all buttons and key bindings anyone can
play this virtual piano at very ease either with mouse, touch screen or with different
keyboard’s keys to paly different keys of piano.

15
FUTURE SCOPE
Future Scope:

There is always a room for improvements and updation to increase its functionality and
usability. In future some additional features can be added into current software some of
which are suggested below:

• Add other various instruments (Guitar, Drum, Flute, Sound Pad etc.) into same
application to extend its usability.

• Add a teaching tutorial(learning) mode that can teach any newbie player to teach
him how to play that certain instrument or impure it’s skills to further extend.

*Conceptual Output*

In Learning (Tutorial) mode anyone can select any song from menu bar according to
his choice and piano’s keys will glow according to that song to increase player’s skills.

• It can also play a major role to those people or children who are not financially able
to buy instruments in real world. They will only need any window, mac and android
device with any low-end specification and can be run smoothly with free of cost.
16
References

➢ https://www.geeksforgeeks.org/

➢ https://www.tutorialspoint.com/index.htm

➢ https://www.youtube.com/

➢ https://stackoverflow.com/

17

You might also like