Sei sulla pagina 1di 37

GUITAR TUTOR USING TONE

RECOGNITION SYSTEM

Project Report

Submitted in fulfillment of the requirements for the degree of

B.E. (Information Technology)


by

RISHAB R BANDEKAR (Seat No: 121106005)


YOGESH JOSHI (Seat No: 131206006)
VARUN MATHUR (Seat No: 121106060)

Guide: Prof. Mario Pinto


Co-Guide: Prof. Richa Jambhale

INFORMATION TECHNOLOGY DEPARTMENT


GOA COLLEGE OF ENGINEERING
(GOVERNMENT OF GOA)
GOA UNIVERSITY
(2015-2016)
DISSERTATION APPROVAL SHEET

The dissertation entitled Project Title by


RISHAB R BANDEKAR (Seat No: 121106005)
YOGESH JOSHI (Seat No: 131206006)
VARUN MATHUR (Seat No: 121106060)

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)

Mr. Mario Pinto Mrs. Richa Jambhale


Guide Co-Guide
Assistant Professor Assistant Professor
Dept of I.T, GEC Dept of I.T, GEC

Dr. Anant J. Naik


Head of Department
Information Technology
Goa College of Engineering
Farmagudi

Examiners

(Internal Examiner) (External Examiner)


Name: Name:
Designation: Designation:
Acknowledgement

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

process our Signal using the libraries provided by python.


Contents

CONTENTS

CHAPTER Page No.

Acknowledgement …………………………………………………………………………..(i)

Abstract……………………………………………………………………………………...(ii)

List of Figures……………………………………………………………………………….(v)

List of Tables………………………………………………………………………………..(vi)

List of Abbreviations……………………………………………………………………….(vii)

1. INTRODUCTION (14)………………………………………………………………….1

1.1. Problem Definition 2


1.2. Introduction to Project 2

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

3. SYSTEM REQUIREMENT AND SPECIFICATION……………………………….15

3.1 Software Requirements


3.2 Hardware Requirements

iii
Contents

4. DESIGN…………………………………………………………………………………..16

4.1 Proposed Approach


4.2 Algorithms
4.3 Data Flow Diagram
4.4 Detail Process Flow

5. IMPLEMENTATION……………………………………………………………….……21

5.1 Implementation Techniques


5.2 Results

6. CONCLUSION……………………………………………………………………………30

7. FUTURE SCOPE……………………………………………………………………...…31

8. BIBLIOGRAPHY………………………………………………………………….…….32

iv
List of Figures

LIST OF FIGURES

Figure (16) Name (16) Page No. (16)

Fig. 1.1 3

v
List of Tables

LIST OF TABLES (20)

Table (16) Title (16) Page No. (16)

vi
List of Abbreviations

LIST OF ABBREVIATIONS (20)

ABBREVIATION EXPANSION

vii
Chapter 1

CHAPTER 1

INTRODUCTION

1.1 PROPOSED WORK

1.1.1 Problem Definition

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.

1.2 INTRODUCTION TO PROJECT

1.2.1 Purpose of the Project


The Purpose of our application is to provide a system where the user will be able
to learn the guitar chords on his own using the software package. This tutor will
help him to perfect his chords and also to evaluate himself.

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.

1.2.3 Proposed System


In this work, the front end of the system will be an application in CSharp which
will provide a user with a dropdown menu for chord selection. After selecting one
chord from the menu the finger notation for that chord and the sample waveform of
that chord will be displayed on the screen. The User can listen to the sample tune
at any time when the application is live.

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.1 Acoustic Guitar

An Acoustic Guitar is a guitar that produces sound acoustically – by transmitting


the vibration of the strings to the air- as opposed to relying on electronic
amplification (see Electric Guitar). The sound waves from the strings of an acoustic
guitar resonate through the guitar’s body, creating sound. This typically involves
the use of a sound board and a sound box to strengthen the vibrations of the strings.

Fig 2.1: Acoustic Guitar

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.

Figure 2.2: Pickup

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.
.

2.2 ANALYSIS OF PAPERS

2.2.1 Seewave Analysis


Author Name: Jerome Sueur.
This document is a very brief introduction to sound analysis principles. It is mainly
written for students starting with bioacoustics. This papers explains various sound
factors such as Sampling, Quantisation, File Format, Amplitude envelope,
Discrete-time Fourier Transform, Fast Fourier Transform, and Cross Correlation.

2.2.2 Python for Audio Signal Processing


Author Names: John Golver, Victor Lazzarini and Joseph Timoney.
This document discusses the use of Python for developing audio signal processing
applications. It provides overview of Python language, NumPy, SciPy packages
which together form a powerful platform for scientific and analytical computing. It
also shows how Python can be used for signal processing which we will be using
for signal matching.

2.3 APPROACHES TO PROJECT


2.3.1 Waterfall Model
We will be using Waterfall Model for our project.
Waterfall Model approach was first SDLC Model to be used widely in Software
Engineering to ensure success of the project. In “Waterfall” approach, the whole
process of software development is divided into separate phases. In Waterfall
model, typically, the outcome of one phase acts as the input for the next phase
sequentially. It is simple and easy to understand and use. It is easy to manage due
to the rigidity of the model. Each phase has specific deliverables and a review
process. Phases are processed and completed one at a time. Also, the process and
results are well documented.

Fig 2.5: Waterfall Model

The sequential phases in waterfall model are:


• Requirement Gathering and analysis: All possible requirements of the
system to be developed are captured in this phase and documented in a
requirement specification doc.
• System Design: The requirement specifications from first phase are studied
in this phase and system design is prepared. System Design helps in
specifying hardware and system requirements and also helps in defining
overall system architecture.
• Implementations: With inputs from system design, the system is first
developed in small programs called units, which are integrated in the next
phase. Each unit is developed and tested for its functionality which is
referred to as Unit Testing.
• Integration and Testing: All the units developed in the implementation
phase are integrated into a system after testing of each unit. Post Integration
the entire system is tested for any faults and failures.
• Deployment of System: Once the functional and non-functional testing is
done, the product is deployed in the customer environment or released into
the market.
• Maintenance: There are some issues which come up in the client
environment. To fix those issues patches are released. Also to enhance the
product some better versions are released. Maintenance is done to deliver
these changes in the customer environment.

2.4 ALGORITHMS AND SOLUTIONS

2.4.1 Fourier Transform


To convert a waveform from its native time domain to the required frequency
domain, a Fourier Transformation algorithm must be used. For a continuous
function of one variable f (t), the Fourier Transform F(f) is defined as
Where ω denotes the frequency value of interest and e denotes the natural exponent.
Thus,

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

2.4.2 Fast Fourier Transform and Discrete Fourier Transform


The most common tools used to perform Fourier analysis and synthesis are called
the fast Fourier transform (FFT) and the inverse fast Fourier transform (IFFT). The
DFT is the actual mathematical transformation that the data go through when
converted from one domain to another (time to frequency).

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:

Eq 2.1: Formula for Calculating DFT of a wave.

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.

Here are key concepts required to understand a DFT:


• The “Sampling rate”, sr. The Sampling rate is the number of samples taken
over a time period. For simplicity we will make the time interval between
samples equal. This is the “sample interval”, is 44100 Hz.
• The Fundamental period T is the period of all the samples taken. This is also
called the “window”.
• The “Fundamental Frequency” is f0 which is 1/T. f0 is the first harmonic,
the second harmonic is 2*f0, the third is 3*f0, etc.
• The number of samples is N.
• The “Nyquist Frequency”, fc, is half the sampling rate. The Nyquist
frequency is the maximum frequency that can be detected for a given
sampling rate. This is because in order to measure a wave you need at least
two sample points to identify it.
• “Euler’s Formula” - .
• The sampled part of the time wave, x (t), should be “typical” of how the
wave behaves over all time that it exists.
• This notation makes handling the exponential easier. This is
sometimes called the “twiddle factor”.
2.4.3 Convolution and Correlation
The cross-correlation is similar in nature to the Convolution of two functions.
The convolution of two functions, x1(t) and x2(t), is defined by:

Eq 2.2: Convolution of Two Signals

Correlation is a measure of similarity between two signals. The general formula


for correlation is

Eq 2.3: Correlation of Two Signals

Cross correlation is the measure of similarity between two different signals.


Consider two signals x1(t) and x2(t). The cross correlation of these two
signals R(τ) is given by

Eq 2.4: Cross – Correlation of Two Signals


2.5 ALGORITHMS AND SOLUTIONS

• 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

SYSTEM REQUIREMENT AND SPECIFICATION

3.1 SOFTWARE REQUIREMENTS

3.1.1 Microsoft Visual Studio 2015


Microsoft Visual Studio is an integrated development environment (IDE) from
Microsoft. It is used to develop computer programs for Microsoft Windows, as well
as web sites, web applications and web services. Visual Studio uses Microsoft
software development platforms such as Windows API, Windows Forms etc. It can
produce both native code and managed code.

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.

3.1.2 Python for Signal Processing


Python is used for developing audio signal processing applications. Overviews of
Python language, NumPy, SciPy and Matplotlib are given, which together form a
powerful platform for scientific computing. Python is an open source programming
language that runs on many platforms including Linux, Mac OS X and windows. It
is widely used and actively developed, has a vast array of code libraries and
development tools, and integrates well with many other programming languages,
frameworks and musical applications.

NumPy adds a homogenous, multidimensional array object to python. It also


provides functions that perform efficient calculations based on array data. SciPy
builds on top of NumPy, providing modules that are dedicated to common issues
in scientific computing, and so it can be compared to MATLAB toolboxes. The
SciPy modules are written in a mixture of pure Python, C and FORTRAN, and are
designed to operate efficiently on NumPy arrays.

3.1.3 Oracle Database


Oracle Database is an object relational database management system produced and
marketed by Oracle Corporation. An Oracle database system- identified by an
alphanumeric system identifier or SID- comprises at least one instance of the
application, along with data storage. An instance- identified persistently by an
instantiation number-comprises a set of operating system processes and memory-
structures that interact with the storage.

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 HARDWARE REQUIREMENTS


3.2.1 Acoustic Guitar
The Acoustic Guitar will be used to play the strings and record the chords. An
acoustic guitar is a guitar that produces sound acoustically by transmitting the
vibration of the strings to the air. The sound waves from the strings of an acoustic
guitar resonate through the guitar’s body, creating sound.

3.2.2 Guitar Pick


A Guitar Pick is a plectrum used for guitars. They are used to strum the chords or
to sound individual notes on a guitar. Picks are usually gripped with two fingers-
thumb and index, and are played with pointed end facing the strings.
3.2.3 Pickup
A Pickup will capture the mechanical vibrations of the acoustic guitar and convert
them to an electric signal that is amplified, recorded or broadcast (displayed). A
Pickup will filter out the unwanted noises from the signal and give a clear, filtered
and amplified sound.

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.

3.2.5 Computer Requirements


The Computer should have these minimum hardware requirements for the software
to work.

• Processor: 1.6GHz or Faster


• Ram: 1Gb (1.5Gb if running on virtual machine)
• Hard Disk Space: Minimum 4Gb
• Video Card: DirectX 9 or higher
• External I/O Ports: 3.5mm Jack
Chapter 4

CHAPTER 4

DESIGN

4.1 DETAIL PROCESS FLOW

4.1.1 Hardware Interface

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.

4.1.2 Software Interface


The Input the PC will be the output of Hardware Interface. The Recording Module
will record the sound wave at Sampling Rate of 44100 Hz and that file will be stored
in .wav format. On this file the FFT Algorithm will be implemented to get the
Amplitude vs Frequency which is Frequency Spectrum.

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

Table 4.1: Chords Recorded as Dataset.

4.2.2 Example of C Chord Waveform

Fig 4.3: C Chord Waveform

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.

4.2.3 Format of Audio Data


Chords and their mistakes were manually annotated and stored as one file in wav
format. The Sampling rate for all the chord instances was 44.1 kHz and the
resolution was kept to be 16 bits and was stored in monophonic form. The audio
data from Pc was taken as wav format through the software provided by the
Recording Studio. The Recording done by the microphones had the sampling rate
of 48 kHz so we down sample them to 44.1 kHz and stored in the database.

4.2.4 Music as a Signal


As a computer scientist, my familiarity with the Fast Fourier Transform (FFT) was
only that it was a cool way to multiply polynomials in O (n log (n)) time. Luckily
it is much cooler for doing signal processing, its canonical usage.

Music, it turns out, is digitally encoded as just a long list of numbers. In an


uncompressed .wav file, there are a lot of these numbers - 44100 per second per
channel. This means a 3 minute long song has almost 16 million samples.

3 min * 60 sec * 44100 samples per sec * 2 channels = 15,876,000 samples

A channel is a separate sequence of samples that a speaker can play. Think of


having two ear buds - this is a "stereo", or two channel, setup. A single channel is
called "mono". Today, modern surround sound systems can support many more
channels. But unless the sound is recorded or mixed with the same number of
channels, the extra speakers are redundant and some speakers will just play the
same stream of samples as other speakers.
Chapter 5

CHAPTER 5

IMPLEMENTATION

5.1 IMPLEMENTATION TECHNIQUES

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 3.0, a major, backwards-incompatible release, was released on 3 December


2008 after a long period of testing. Many of its major features have been back ported
to the backwards-compatible Python 2.6 and 2.7

5.1.3 Python Libraries

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.

❖ PyAudio: PyAudio provides Python bindings for PortAudio, the cross-platform


audio I/O library. With PyAudio, you can easily use Python to play and record
audio on a variety of platforms, such as GNU/Linux, Microsoft Windows, and
Apple Mac OS X. The current version is PyAudio v0.2.9.
❖ Numpy: NumPy is the fundamental package for scientific computing with
Python. It contains among other things:
• A Powerful N-Dimensional Array Object.
• Sophisticated (broadcasting) functions.
• Tools for integrating C/C++ and Fortran Code.
• Useful linear algebra, Fourier Transform and random number
capabilities.
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-
dimensional container of generic data. Arbitrary data-types can be defined. This
allows NumPy to seamlessly and speedily integrate with a wide variety of
databases.

❖ MatPlotLib: MatPlotLib is a python 2D plotting library which produces


publication quality figures in a variety of hardcopy formats and interactive
environments across platforms, MatPlotLib can be used in python scripts, the
python and ipython shell, web application servers, and six graphical user
interface toolkits. MatPlotLib tries to make easy things easy and hard things
possible. You can generate plots, histogram, power spectra, bar charts,
errorcharts, scatterplots, etc, with just a few lines of code.

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.

Fig 5.1: C Chord Waveform using Waveform Generator

❖ 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

Fig 5.2: Audio Matching Software

Waveform Generator
Fig 5.3: Waveform Generator Module

5.2 RESULTS

Chapter 6
CHAPTER 6

CONCLUSION AND FUTURE SCOPE

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 SRS (Software Requirement Specification) was documented.

• Python and its required libraries were studied.

• 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.

• The Audio Matching Software was tested for correct outputs.

6.2 FUTURE SCOPE


6.2.1 Improvisation using Image Processing
Image Processing can be used to check whether the person is holding the fingers
properly on the frat board. This will determine the errors made by the user. It can
be even used to take into consideration the different strumming factors used. Image
processing can also be used on spectrogram.

6.2.2 Real-Time Chord Recognition System


Presently, the user has to select the chord which he wants to learn. This software
can be improved by directly playing the chord and the software will detect which
chord was played and also it will detect if the chord was played correctly or not. So
this will be more user friendly since he doesn’t have to stick to one chord at a time.
Instead he can play any chord randomly.

6.2.3 Making the Software Web Based Application


Since we are using python for signal processing, with some extra efforts in
designing user interface, we can provide the same software online. This will allow
millions of people to learn at the same time and it will reduce the overhead of hard
disk space. The Server must have high processing speed and multiple user access.

Chapter 7
CHAPTER 7

BIBLIOGRAPHY

7.1 Technical Papers


• Python For Audio Signal Processing by John Glover, Victor Lazzarini and Joseph
Timoney.

• Seewave by Jerome Sueur, Museum national d’Histoire naturelle CNRS UMR


7205 OSEB, Paris, France.

• Signal Processing for Melody Transcription by Rodge J. McNab, Lloyd A. Smith


and Ian H. Witten.

7.2 Books
• Music and Computer Teacher’s Guide by Phil Burk and Larry Polansky.

• Digital Signal Processing – A practical approach by Emmanuel C. Ifeachor,


Barrie W. Jervis, Pearson Education Limited.

• Signals and Systems by Rodger E. Zeimer, William H. Tranter and D. Ronald


Fannin.

Potrebbero piacerti anche