Real Time Staff Notation Generation of Guitar Along With Standard Guitar Tuner
Real Time Staff Notation Generation of Guitar Along With Standard Guitar Tuner
Abstract— Musical instruments have evolved manifolds in like GuitarPro [2] and TablEdit [3] provide a simulation of
the past 50 years. From simple percussion and acoustic guitar‘s fret board. The notes played on the simulated fret
instruments, they have evolved into their electronic board (with the help of mouse clicks) are then used to generate
counterparts. With this evolution and the fact that these the staff notation for the notes played. Also the software tuners
counterparts are in extensive use these days, comes the available in the market are not based on the MIDI number and
need to process these input electric signals using thus our tuner is more accurate than those available.
computers to produce the desired results and outputs. The In section II we present a brief description about staff notation,
input signals can be processed to identify the notes played guitar notes and their MIDI number. Section III gives a
on the instrument, which can then be used to generate a detailed description of the method for generating the staff
musical notation for the notes being played. This paper notation in real time. The method for implementing a standard
gives a detailed description about an application which tuner based on MIDI number is given in section IV.
generates the musical score or staff sheet for the notes
being played on a semi-acoustic guitar connected to the II. THEORY
computer, in real time. The application also implements
a standard tuner based on MIDI (Musical Instrument A. Staff Notation
Digital Interface) number. Staff Notation is a notation used to represent the various
pitches of the same musical note that can be played on an
Keywords-real-time staff notation generation; standard tuner based on
instrument. It is concerned with only recognizing the note
MIDI number; staff notation; musical pitches on a guitar
and its pitch and so is feasible in real time.
I. INTRODUCTION Grand Staff or Great Staff, generated in our application, is
a combination of the upper five lines which are known as the
T HE musical instruments have evolved greatly into their
electronic counterparts. In the past 50 years we have
witnessed basic acoustic guitar evolving into electric and semi-
Treble Staff and the lower five lines known as the Base Staff
along with the middle C (Fig. 1), making it a total of eleven
lines. Notes with lower pitch appear towards the lower portion
acoustic guitar and violin into its electronic counterpart, just
of the notation and as the pitch increases, the notes are
like any other musical instruments. Thus, today these
displayed more towards the upper part of the Great Staff.
instruments are capable of communicating with the computer
using applications thereby leading to an increased possibility
of processing the inputs obtained to get the desired results.
This paper presents a method for generating the staff
notation[1] for the notes being played on a semi-acoustic
guitar in real time, that is, the notation is generated as the
semi-acoustic guitar (connected to the computer) is played.
The paper also provides a method for building a guitar tuner
based on the MIDI number which helps to tune a guitar
according to the standard tuning. (a)
At present, there exist a number of applications for generating
staff notation; but all these applications only provide a
simulation of the musical instruments. Software applications
1
Real Time Staff Notation Generation of Guitar
Along with standard guitar tuner.
2
Himanshu Babbar is with MothersonSumi INfotech Design Limited,
Noida, Uttar Pradesh, India (email: [email protected]).
3
Bhumika Singhal is with Compare Infobase Limited, New Delhi, India
(email: [email protected]).
(b)
978-1-4673-0136-7/11/$26.00 ©2011 IEEE
Fig. 1. Staff Notation: (a) divided into Treble Staff and Bass Staff (b)
musical pitches represented by different lines of the Staff.
B. The Guitar
A guitar consists of six strings and each string is divided
into a number of frets. The fret board (Fig. 2) of standard
guitars consists of 19 or 21 frets each of which represents a
different note.
Fret board
(a)
(b)
Fig. 2 (a) The Guitar (b) Notes played on each fret on a standard tuned guitar.
Fret
E (Low) A D G B E (High)
String
E2 A2 D2 G2 B3 E4
0
Freq=82.4 Freq=110.0 Freq=146.8 Freq=196.0 Freq=246.9 Freq=329.6
(Open) MIDI=40 MIDI=45 MIDI=50 MIDI=55 MIDI=59 MIDI=64
F2 A2# D2# G2# C3 F4
Freq=87.3 Freq=116.5 Freq=155.6 Freq=207.6 Freq=261.7 Freq=349.2
1
MIDI=41 MIDI=46 MIDI=51 MIDI=56 MIDI=60 MIDI=65
F2# B2 E3 A3 C3# F4#
Freq=92.4 Freq=123.4 Freq=164.8 Freq=220.0 Freq=277.2 Freq=369.9
2
MIDI=42 MIDI=47 MIDI=52 MIDI=57 MIDI=61 MIDI=66
G2 C2 F3 A3# D3 G4
Freq=98.0 Freq=130.8 Freq=174.6 Freq=233.1 Freq=293.7 Freq=392.0
3
MIDI=43 MIDI=48 MIDI=53 MIDI=58 MIDI=62 MIDI=67
G2# C2# F3# B3 D3# G4#
Freq=103.8 Freq=138.6 Freq=185.0 Freq=246.9 Freq=311.2 Freq=415.3
4
MIDI=44 MIDI=49 MIDI=54 MIDI=59 MIDI=63 MIDI=68
A2 D2 G3 C3 E4 A4
Freq=110.0 Freq=146.8 Freq=196.0 Freq=261.7 Freq=329.6 Freq=440.0
5
MIDI=45 MIDI=50 MIDI=55 MIDI=60 MIDI=64 MIDI=69
A2# D2# G3# C3# F4 A4#
Freq=116.5 Freq=155.6 Freq=207.7 Freq=277.2 Freq=349.2 Freq=466.2
6
MIDI=46 MIDI=51 MIDI=56 MIDI=61 MIDI=65 MIDI=70
B2 E3 A3 D3 F4# B4
Freq=123.4 Freq=164.8 Freq=220.0 Freq=293.7 Freq=370.0 Freq=493.9
7
MIDI=47 MIDI=52 MIDI=57 MIDI=62 MIDI=66 MIDI=71
C2 F3 A3# D3# G4 C4
Freq=130.8 Freq=174.6 Freq=233.1 Freq=311.2 Freq=392.0 Freq=523.3
8
MIDI=48 MIDI=53 MIDI=58 MIDI=63 MIDI=67 MIDI=72
C2# F3# B3 E4 G4# C4#
Freq=138.6 Freq=185.0 Freq=246.9 Freq=329.7 Freq=415.4 Freq=554.5
9
MIDI=49 MIDI=54 MIDI=59 MIDI=64 MIDI=68 MIDI=73
D2 G3 C3 F4 A4 D4
Freq=146.8 Freq=196.0 Freq=261.7 Freq=349.3 Freq=440.0 Freq=587.5
10
MIDI=50 MIDI=55 MIDI=60 MIDI=65 MIDI=69 MIDI=74
D2# G3# C3# F4# A4# D4#
Freq=155.6 Freq=207.7 Freq=277.2 Freq=370.1 Freq=466.2 Freq=622.4
11
MIDI=51 MIDI=56 MIDI=61 MIDI=66 MIDI=70 MIDI=75
t1=1;k1=1;
for tao1=1:1024
for j1=t1:(t+length(handles.w)-tao1-1)
s1(k1)=(d{count-1}(j1).^2)+(d{count-
1}(j1+tao1).^2);
k1=k1+1;
end
m(tao1)=sum(s1);
k1=1; Fig. 3 Basic Layout
end
B. Acquiring the data
for t2=1:length(r) As the ‗Record‘ button is pressed, the application starts
n(t2)= (2*r(t2))/(m(t2)); data acquisition (Fig. 4 and Fig. 5). The data acquired is in the
end form of varying voltage signals, which change with the time.
The left most plot displays the real time input data of one
For displaying the staff notation we have used the second. The plot on the right gives the plot of NSDF.
MusiQwik-Bold font [7].
VIII. ACKNOWLEDGMENT
We would like to thank Prof. B. Kumar for his immense
support at every step of our project.
We would also like to thank Mr. Rachit Goel for providing
us with his guitar for performing the tests.
IX. REFERENCES
Books:
[1] John Cusack, Cusack‘s Lectures on Music, Third Edition, The City of
London Book Depot, White Street and Finsbury Street, Moorfields,
Fig. 5 Generating the Staff Notation E.C., 1899.
Online:
[2] http://www.guitar-pro.com/en/index.php
C. Tuning the Guitar [3] http://www.tabledit.com
For tuning the guitar, we shift to the standard tuner by [4] http://en.wikipedia.org/wiki/Guitar_tunings
[5] http://en.wikipedia.org/wiki/MIDI
selecting it in the View (in the menu bar). To make the tuner [6] http://www.mathworks.com/products/daq
work, one needs to press the record button and the MIDI [7] http://www.fontspace.com/robert-allgeyer/musiqwik
number obtained is displayed in the center right box and the
note played along with pitch appear in the box above the tuner Papers Presented (Published):
[8] Philip McLeod, Geoff Wyvill, ―A Smarter Way to Find Pitch‖
which in turn displays the deviation of the MIDI obtained from
Proc. International Computer Music Conference, pp. 138-141,
the standard MIDI number for that note, if the deviation falls September 2005.
in the range of ±0.5 (Fig. 6).
Periodicals:
[9] Cheveigne, A. ‖YIN, a fundamental frequency estimator for speech and
music‖, Journal of the Acoustical Society of America, Vol 111(4), pp.
917-30, April 2002.