Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
RECOGNITION SYSTEM
Project Report
Completed in the year 2015-16 is approved as a partial fulfillment of the requirements for the
degree of BACHELOR OF ENGINEERING in INFORMATION TECHNOLOGY, and is a
record of Bonafide work carried out successfully under our guidance.
Guide(s)
Examiners
ACKNOWLEDGEMENT
We would like to officially acknowledge and thank all those people who have contributed to this
project in variety of ways.
We are immensely grateful to our principal Dr. V. N. Shet and HOD of Information Technology
Prof. Anant Naik who assured us every support from the college.
We would like to thank our internal guide and project coordinator Prof. Mario Pinto and Co-
Guide Prof. Floyd D’Silva for providing us with excellent guidance, direction and constant
support for successfully performing this project.
We would like to thank Mr. Rohan Naik, Sound Designer and Composer, at Parvatibai Chowgule
College of Arts and Science Tiger Recording Studio, who helped us in recording and generating
uncompressed wave files for all 12 chords.
Our sincere gratitude to various books, papers and websites that have been source material for this
project.
Besides we are also grateful to all our friends and well-wishers that provided us with lots of
support.
Lastly, we are grateful to whole of the Information Technology staff for providing us with the lab
facilities and cooperation for our project.
Abstract
ABSTRACT
Learning to play a Guitar is a difficult task, one that requires a great deal of time and patience. In
an effort to ease the strain of this process, our software package has been designed and developed
in order to assist amateur guitarist while they are learning to play their instrument.
The Software package achieves this by monitoring the waveform of the chord being played and
provided the user with feedback. The algorithm and design choices of this application are described
in detail, with special attention paid to the chord recognition algorithm itself.
The Pickup will be used in place of Noise Detection Algorithms. Using FFT and Cross Correlation
Algorithms for Sampling and Matching in the later stage. Python will be used over Matlab to
CONTENTS
Acknowledgement …………………………………………………………………………..(i)
Abstract……………………………………………………………………………………...(ii)
List of Figures……………………………………………………………………………….(v)
List of Tables………………………………………………………………………………..(vi)
List of Abbreviations……………………………………………………………………….(vii)
1. INTRODUCTION (14)………………………………………………………………….1
2. LITERATURE REVIEW……………………………………………………………….4
2.1 Background
2.2 Analysis of Papers
2.3 Approaches to Project
2.4 Algorithms and Solutions
2.6 Applications of Project
iii
Contents
4. DESIGN…………………………………………………………………………………..16
5. IMPLEMENTATION……………………………………………………………….……21
6. CONCLUSION……………………………………………………………………………30
7. FUTURE SCOPE……………………………………………………………………...…31
8. BIBLIOGRAPHY………………………………………………………………….…….32
iv
List of Figures
LIST OF FIGURES
Fig. 1.1 3
v
List of Tables
vi
List of Abbreviations
ABBREVIATION EXPANSION
vii
Chapter 1
CHAPTER 1
INTRODUCTION
While the professional music industry has been blessed with a huge amount of
technological innovation, casual musicians have largely been ignored for years.
One reason for this is perhaps that instrument such as the guitar cannot be
represented digitally. The effort required to learn the guitar on your own will be a
huge and difficult task. Also the time required to learn all chord and prefect them
is a lot. Due to this, the learning curve decreases. So we are developing an
application that will help user to learn guitar and various chords on his own at a
better efficiency.
Later he or she will be able to view their performance which will be displayed on
the screen.
1.2.2 Scope of the Project
This system will provide a User Interface in which you can select any chord which
you want to practice. Once you select the chord, the finger notation and sample
audio file (.wav) along with its waveform corresponding to the selected chord will
be displayed on the Interface. The Application will also include runtime recording
of the chord played by the user.
The User will be able to self-evaluate his performance which will be displayed on
the monitor screen. This system will basically help the learner to get familiarized
with the various chords of the guitar and help them to play it better and improve
their performance.
The Application will also include sub-part, where the system will take in data
through the line-in of the computer related to the chord played on the guitar. The
guitar will have a pickup, and this pickup through a plug-in chord will be connected
to a 3.5mm jack.
The Raw Data from the pickup will be stored in the system. Further, we will apply
data sampling with respect to time on this waveform. Even sampling with respect
to string will be done. The Fast Fourier Transform (FFT) for this chord will be
generated in the system. This will be matched with the FFT of the actual chord
present in the database. If the match is positive then it will indicate the result on the
User Interface.
Chapter 2
CHAPTER 2
LITERATURE REVIEW
2.1 BACKGROUND
2.1.2 Pickup
A pickup device is a transducer that captures mechanical vibrations from stringed
instruments such as the electric guitar, electric bass guitar, Chapman Stick,
or electric violin, and converts them to an electrical signal that
is amplified, recorded, or broadcast. The output voltage of magnetic pickups varies
between 100 mV rms to over 1 V rms for some of the higher output types. A hard
strum on all 6 guitar strings can produce a larger output voltage swing, typically
peak voltages of +/− 5 volts for single coil pickups and +/− 10 volt peaks on dual
coil pickups. Some high-output pickups achieve this by employing very strong
magnets, thus creating more flux and thereby more output.
This can be detrimental to the final sound because the magnet's pull on the strings
can cause problems with intonation as well as damp the strings and reduce
sustain. Other high-output pickups have more turns of wire to increase the voltage
generated by the string's movement. However, this also increases the pickup's
output resistance/impedance, which can affect high frequencies if the pickup is not
isolated by a buffer amplifier or a DI unit.
2.1.3 Dataset
We will generate a dataset for each string in each fret. There are 6 different strings
in guitar that are E, B, G, D, A E numbered from 1-6. There are all together 22 frets.
The sound of each string played on each fret is different from each other. For
example, if we consider G String then we have to create 22 different dataset in each
fret. So all together we will have to create dataset for each string on each fret of 2
seconds. And also we will have to create dataset for each open string.
Fig 2.3: C Chord Waveform Fig 2.4: C Chord Finger Notation
This dataset will be used to generate a chord. String 1 Fret 1, String 2 open, String
3 open, String 4 fret 2, String 5 fret 3 and String 6 open this will form a C Chord.
We will also have a dataset for finger notations, sample audio files for each chord
and each string with a waveform.
.
Some musicians are able to listen to a piece of music, and identify which notes are
present in it immediately. By examining the spectrum resulting from performing a
Fourier transformation on a chord’s waveform, it is possible to perform the same
task algorithmically. Figure 3.4 demonstrates this, and it is this concept which
forms the foundation of this entire project.
Figure 2.6: Two separate notes, and the waveform that results from them playing
simultaneously.
Figure 2.7: The Fourier transform of the combined waveform shown in 2.5
Remember, they don’t just work on sounds; they work on any continuous signal
(images, radio waves, seismographic data, etc.). An FFT of a time domain signal
takes the samples and gives us a new set of numbers representing the frequencies,
amplitudes, and phases of the sine waves that make up the sound we’ve analyzed.
The Process for converting time domain to frequency domain is called the “Fourier
Transform”. If you want to go the opposite way, and convert frequency domain into
time domain, to use the “Inverse Fourier Transform”.
Every wave has one or more frequencies and amplitudes in it. An Example is a
sound wave. If someone speaks, whistles, plays an instrument, etc., to generate a
sound wave, then any sample of that sound wave has a set of frequencies with
amplitude that describe that wave.
The equation for the Discrete Fourier Transform is:
Where F (n) is the amplitude at the frequency, n, and N is the number of discrete
samples taken. X (k) is the time wave that is converted to a frequency spectrum by
the DFT.
• This application can be used by user to learn and improve his performance in
playing a guitar.
• This application makes use of a basic acoustic guitar and a user friendly interface
which makes the process of guitar learning easier and fun.
• This software can be made commercial so that it can be used by all users all around
the world.
• This project makes use of pickup which removes the unwanted noise from the
signal making it much efficient and clear.
• Since most users use windows operating system platform, our application can be
used widely by all the windows operating system users.
Chapter 3
CHAPTER 3
We are creating a CSharp Windows Form Application which will produce a User
Interface. Visual Studio also supports python language.
Python tools for Visual Studio provides completely free python support within
Visual Studio. It provides Cpython, PyPy, and more. Third party libraries are the
fastest way to solve our problems. Use our pip, PyPI and virtual environment
support to manage your projects and dependencies.
The User related data such as login id, email id, password and also user personal
details will be stored in the database. The Main Dataset of all the chords will be
stored in a folder and the link of those files will be stored in the database. So that
we can access whenever we want. Later stage we will add the dataset on ftp server
so that anytime we can access it from anywhere.
3.2.4 Amplifier
An Amplifier (Amp) is an electronic device that will increase the power of a signal.
An Amplifier modulates the output of the power supply to make the output signal
stronger than the input signal. The Pickup will be connected to the amplifier which
will give a clear and amplified sound of the chord played. This will be given as an
input through a 3.5mm jack to the Computer System.
CHAPTER 4
DESIGN
There are two types of guitars. One is Acoustic and Electric Guitar. Our Application
is for Acoustic Guitar Only. First Acoustic Guitar is connected with a pickup. Some
Guitars have inbuilt pickup so we can use them directly.
The purpose of pickup is to capture the tune of all six strings that are played. The
most important advantage of using pickup is it has inbuilt characteristics for noise
cancellation and interference. This pickup has the output in the form of a connector
that is plugged in the Amplifier.
The output of the Pickup is of low amplitude and hence we require an amplifier to
amplify the input signal. The Signal after amplifying is given as input into the
3.5mm jack of Personal Computer or a Laptop. This completes our full Hardware
Interface.
The Dataset contains the chords that have been recorded in the Recording Studio
which are stored in the database. The Chord that user has selected will be chosen
and then that sample chord from the database will also be selected. Its waveform as
well as a player which can play that chord will be displayed on the interface.
Once the FFT of the wave file that was generated as a user data is completed then
we apply FFT on the chord. Now once we have FFT of both the signals then we
use the Correlation Algorithm on both the signals. If the Signal matches then we
give out a POSITIVE response else it will display as NEGATIVE output.
4.2 DATABASE AND DATASET
4.2.1 Database
We recorded a collection of guitar chords with the sampling rate of 44.1 kHz in
order to have a general purpose database for guitar related audio experiments.
Chords that we recorded are listed in table 4.1.
A
Am
B
Bm
C
Cm
D
Dm
E
Em
F
G
This is basically a C Chord in a wav file. This is a waveform of C Chord that can
be captured from a wav file format. This way we have all the Waveforms of all
Chords that we recorded in the Recording Studio. Since the files are uncompressed
wav files we can extract the waveform from those files using the Waveform
Generator Module.
CHAPTER 5
IMPLEMENTATION
5.1.1 Python
Python is a widely used high-level, general purpose, interpreted, dynamic
programming language. Its design philosophy emphasizes code readability, and its
syntax allows programmers to express concepts in fewer lines of code than would
be possible in languages such as C++ or java. The language provides constructs
intended to enable clear programs on both a small and large scale.
Python interpreters are available for installations on many operating systems,
allowing python code execution on a wide variety of systems. Using third-party
tools, such as Py2exe or Pyinstaller, Python code can be packaged into stand-alone
executable programs for some of the most popular operating systems, allowing the
distribution of Python-based software for use on those environments without
requiring the installation of a Python interpreter.
Cpython, the reference implementation of Python, is free and open-source software
and has a community-based development model, as do nearly all of its alternative
implementations. Cpython is managed by the non-profit Python Software
Foundation.
5.1.2 History
Python was conceived in the late 1980s, and its implementation was started in
December 1989by Guido van Rossum at CWI in the Netherlands as a successor to
the ABC language capable of exception handling and interfacing with the Amoeba
OS. Van Rossum is Python’s principal author, and his continuing central role in
deciding the direction of Python is reflected in the title given to him by the Python
community, benevolent dictator for life.
Python 2.0 was released on 16 October 2000 and had many major new features,
including a cycle-detecting garbage collector and support for Unicode. With this
release the development process was changed and became more transparent and
community-backed.
Python’s standard Library is very extensive, offering a wide range of facilities. The
Library contains built-in modules that provide access to system functionality such
as file I/O that would otherwise be inaccessible to Python programmers, as well as
modules written in Python that provide standardized solutions for many problems
that occur in everyday designed to encourage and enhance the portability of Python
programs by abstracting away platform-specifics into platform-neutral APIs. There
are three libraries that we use in our project, PyAudio, MatPlotLib and NumPy.
5.1.4 Modules
❖ Audio Recorder: Record the tune from the microphone and return the data
as an array of signed shorts. Normalizes the Audio, Trim silence from the start
and the end, and pads with 0.5 seconds of blank sound to make sure VLC can
play without getting chopped off.
❖ Waveform Generator: This will plot the waveform for any given wave file
to give the waveform as output. An example of C Chord Waveform is given.
❖ Audiomatch: This software first stores all the wav files in a database. It has
attributes like name, category. Audiomatch allows users to select audio files
that are then fingerprinted. Audiomatch attempts to match the audio
fingerprints to real-time audio input through a microphone. Software support
.wav files with 16 bits per sample and a sample rate of 41000Hz. Sample time
is the amount of time (in seconds) that the script will sample real-time audio
to fingerprint. Repeat Analysis is the number of times the program will sample
real-time audio, fingerprint it, and scan the fingerprint for the amount of sound
from each sound file that is present in the sample. Frequency Bands is an entry
to limit the frequency bands the program will scan in the real-time sample.
5.1.5 Interface
Audiomatch
Waveform Generator
Fig 5.3: Waveform Generator Module
5.2 RESULTS
Chapter 6
CHAPTER 6
6.1 CONCLUSION
As a partial fulfillment of the requirement for bachelor’s degree in Information Technology
in Goa University, we have carried out following task for the project during the year 2015-
2016.
• In the Initial Stage, the detailed requirements of project were gathered. Based on
this, the related information was collected through Internet and Books. The
Literature Survey on Project was conducted.
• The next phase was identifying the system functionalities. Based on the Analysis
on project, our system was modelled in the form of block diagram.
• The Graphical User Interface for the System was designed which included the
Audio Matching Software and Waveform Generator, both of which were coded in
Python Programming Language.
Chapter 7
CHAPTER 7
BIBLIOGRAPHY
7.2 Books
• Music and Computer Teacher’s Guide by Phil Burk and Larry Polansky.