-
Violin Timbre Analysis withMel-Frequency Cepstral
Coefficients
Victor Ronchetti
ECE 272 Final [email protected]
Abstract
Timbre Analysis serves to quantify the subtle color changes that
make for an effective musical performance.What the human ear
distinguishes easily requires some manipulation in the digital
world. This paperexamines the abilities of the Mel-Frequency
Cepstral Coefficient (MFCC) to distinguish between the timbreof
different instruments, different violins, and three different types
of violin playing. K means clusteringis used to sort the resulting
data.
I. Introduction
The objective of this project is threefold. First,to verify that
MFCC as capable of distinguish-ing different instruments by timbre.
Second,to show the same ability is possible for twodifferent
violins. Finally, to explore the effectof different types of violin
playing on MFCCtimbre calculations to see if poor technique
canreflect in a consistent MFCC grouping for amusical scale as
compared with correct tech-nique.
The MFCC is based upon the raw Cepstrummathematical
approach:
X[q] = IFFT(log|abs(FFT[x[n]])|) (1)
The MFCC involves filtering the magnitudespectrum through a set
of overlapping triangu-lar filters based upon the mel scale:
Figure 1: Mel Filterbank
The general form for coverting between thefrequency and mel
scale:
The magnitude spectrum in filtered, con-verted to the
logarithmic scale, and, finally, con-verted to Mel-frequency
Cepstral Coefficientsthrough the Discrete Cosine Transform. TheMel
filter bank more realistically resembles thereal-life filtering of
the human ear than the fullCepstrum spectrum.1 For this reason,
MFCCis used in cutting-edge speech processing and
1Walker, J, The Use of Mel-frequency Cepstral Coefficients in
Musical Instrument Identification. University of Limerick,Ireland.
2013. pg 2
1
mailto:[email protected]
-
voice recognition applications. An instrumentwithin the range of
the human voice, the violinshould be a good candidate for MFCC
analysis.
II. Method
This project used parameters widely believedto be optimal for
MFCC analysis: Hammingwindowed, frame length less than 100ms,
sam-pled at 44,100kHz, around 14 coefficients cal-culated.2
Three tests were prepared. First, threedifferent instruments
were compared usingMFCC analysis: a trumpet, a clarinet and aflute.
A wide range scale was used for eachinstrument. Second, two
different violins werecompared. Scales were recorded with
vibratoand a tenuto bowing approach. Finally, oneviolin was
recorded playing on three differentlocations on the string- the
middle, towards thefingerboard, and towards the bridge.
Figure 2: Correct approach
Figure 3: Towards Bridge
Figure 4: Towards Fingerboard
2Lukasik, E. Long Term Cepstral Coefficients for violin
identification. Poznan University of Technology, Institute
ofComputing Science, Poznan. 2010. pg 1
2
-
III. Results
Figure 5: 2nd vs. 3rd MFCC: Blue - Trumpet,Yellow - Clarinet,
Red - Flute
Figure 6: 15 MFCC blue- Violin 1, red - Violin 2
Figure 7: K means clustering MFCC 1st blue-Violin 1, red -
Violin 2
Figure 8: 15 MFCC blue- middle, red - towardsbridge, cyan -
towards fingerboard
3
-
Figure 9: K means clustering MFCC 1st blue-middle red - towards
bridge yellow - away frombridge
IV. Discussion
The MFCC was a useful tool when comparingdifferent instruments
by timbre. As Figure 5shows, the three instruments occupy
almosttheir own area of the plot. It was expected thatmeasurements
of the same type of instrument(two different violins) would be less
distinctthan the first test. However, certain character-istics
consistently occurred. Figure 6 showseach of the 15 MFCC
coefficients for every noterecorded on the two violins. At the
coefficientindex gets higher, the two values blend, butthe first
seven coefficients indicate distinct dif-ferences - particularly
the first coefficient. Kmeans clustering partitions data into
distinctgroups, called clusters. When a two-cluster, kmeans cluster
algorithm is performed on the
2-violin 1st MFCC data (Figure 7), the two in-struments
partition virtually cleanly. Only 1data point is incorrectly
grouped.
Analyzing the timbre differences of differ-ent technique on one
violin proved even moresubtle than Test 2. As Figure 8
demonstrates,the MFCCs of the 3 playing techniques
exhibitsignificant overlap. However, the first few CC’sappear to
show some distinction. Once againK means clustering confirms this.
Figure 9shows three bands of a data with three cen-troids marking
the mean of the clusters. Here,4 data points (out of 18) have been
incorrectlyclustered.
Producing good tone in scales is an integralpart of a musicians
practice. Post-Analysis ofa recorded scale against a database of
Profes-sionally recorded and processed scales couldhelp the
beginner student when his teacher isnot around. Future work could
include a realtime MFCC analysis so the playing would nothave to be
post-processed.
References
[1] Jacqueline Walker, The Use of Mel-frequencyCepstral
Coefficients in Musical InstrumentIdentification, Science
Federation Ireland,2013.
[2] Ewa Lukasik, Long Term Cepstral Coefficientsfor violin
identification, Poznan University ofTechnology, 2010.
[3] Jane Charles, Playing Technique and ViolinTimbre:Detecting
Bad Playing, Dublin Insti-tute of Technology, 2010.
[4] William Brent, Cepstral Analysis Tools forPercussive Timbre
Identification, Universityof California, San Diego 2010.
4
IntroductionMethodResultsDiscussion