You are on page 1of 5

EUROCON 2007 The International Conference on “Computer as a Tool” Warsaw, September 9-12

A New Method of Searching for Violin Modes


Piotr Wrzeciono
Poznań, Poland

Abstract – This paper presents a new method for searching ∞

of violin modes with the use of Fourier transform and f s t= ∑ f  nT s  t −nT s (2)
recorded chromatic scales. The method is based on the n=−∞

presence of modal frequencies in the spectrum of violin where:


sound. The algorithm was tested on the recordings of the Ts is the sampling period, δ(t) is the Dirac delta function.
instruments taking part in the 10th International Henryk
Wieniawski Violin Making Competition [7]. After substituting formula (2) to formula (1) the
following formula was obtained:
Keywords—Acoustic signal analysis, violin modes,
continuous Fourier transform, AMATI ∞

I. INTRODUCTION
F  j = ∑ f nT s  e− jnT s
(3)
n=−∞

Violin modes are the characteristic frequencies of The final form of formula (3), which was employed to
resonances of the instrument and they determine a calculate the spectrum of violin sound, is:
number of aspects of violin sound. The study of modes is
very important for violin makers, musicians and sound N −1 − j2 nf k
fs
engineers. At present the most popular is the analysis of F  f k = ∑ f nT s e (4)
the pulse response of the violin body with the use of an n=0

accelerometer to measure the vibrations of the belly and


back [1,2,4,5]. However, in recent studies [9,10], the where:
modal frequencies were found in a spectrum of violin fs is the sampling frequency, fk is the prescribed
sound. This article draws upon the results of research frequency, N is the number of samples, f ( nTs ) is the
work on violin sound [9,10]. sampling signal of violin sound.

II. THE SELECTION OF A KIND OF FOURIER TRANSFORM The energy spectrum of signal, which was calculated
with the following formula, was employed for the
FFT is a commonly used transform in the analysis of analysis of instrument sound:
signals. However, it has certain limitations, especially
with respect to frequency resolution, which is of E  f k =∣F  f k ∣
2
(5)
particular importance in the study described in this
article. The optimal resolution for this kind of studies is where:
0.1 Hz [3], which is difficult to obtain in FFT. Besides, it E( fk ) is the sample of energy spectrum.
is also crucial to be able to calculate a sample of a
spectrum for a prescribed frequency. Therefore, the In this work, the analysis of sampling energy spectrum
application of FFT is not very reliable when solving this was used to search for violin modes.
kind of problem.
This work makes use of the continuous Fourier III. THE CHOICE OF THE RECORDED VIOLIN SOUNDS
transform to calculate the spectra of the studied
instruments. Such a solution makes it possible to The main violin modes are present in the frequency
calculate the spectrum of violin sound with a required band ranging from 100 Hz to about 700 Hz. The most
precision and for the prescribed frequencies. Since the important ones were described as C1 (about 200Hz), A0
time factor here is of marginal importance, the (about 275 Hz), C2,T1,C3 (from 430 Hz to 500 Hz) and
information-based complexity of the continuous Fourier C4 (about 700 Hz). C1 has the smallest energy. The T1
transform is not critical. mode is known as the main wood resonance and has the
The following formula was employed in this work: highest energy [1,5]. Therefore, the choice of the

recorded violin sounds must allow for this fact.
The recordings of sounds of instruments taking part in
F  j =∫ f te− j t dt (1)
−∞
the 10th International Henryk Wieniawski Violin Making
where: Competition [7] were used to create a multimedia
ω is pulsation, f(t) is a signal in time domain, t is time. database AMATI[6]. All of them were made with a 44.1
kHz frequency sampling and a 16-bit resolution, both in
The sampling signal is expressed with the following the near field and the far field. The AMATI database
formula: contains recordings of whole strings, diatonic and
chromatic scales, pizzicati and one piece of Johann

1-4244-0813-X/07/$20.00 2007 IEEE. 189


Sebastian Bach for each violin. Each instrument was a' where:
tuned at 443 Hz. The number of recorded violins is 53. Enorm(fk) is the normalized sample of the energy spectrum,
The selection of recordings was determined by the
properties of violin modes. The sound must have the G  f k =E normg  f k ⋅E norme  f k  (8)
frequencies from 100Hz to 700Hz. Moreover, for the
comparison of energy spectra, a recording with a string where:
stimulation of above 700 Hz was needed. If the modes G(fk) is the sample of product, Enormg(fk) is the sample of
are present in both signals, they can be identified. the normalized energy spectrum of the chromatic scale
The lowest frequencies of violin strings are: 196.89Hz played on g string, Enormg(fk) is the sample of normalized
(string g), 295.34Hz (string d'), 443.00Hz (string a') and energy spectrum of the chromatic scale played on e''
664.50Hz (string e''). Consequently, the C1 and C4 modes string.
are difficult to observe, especially the latter. However,
C1 should be present in both recordings, as long as all the The samples of G(fk) represent the characteristic of the
modes respond during normal playing. This effect was violin body in the prescribed band, below 664.50 Hz.
expected on the basis of research [9,10].
In the AMATI database there are two interesting V. THE ALGORITHM OF SEARCHING FOR VIOLIN MODES
recordings which can be used to resolve this problem.
The first recording is the chromatic scale on g string, the The input data for the algorithm are:
second is the chromatic scale on e'' string. It was assumed 1. the name of the wave file with a recording of the
that both scales would be played in the following manner: chromatic scale on g string in the near field:
each step of the scale would be played with the same name_g,
duration and the same force of pressure of the bow on the 2. the name of the wave file with a recording of the
string. The frequencies of the chromatic scale on g string chromatic scale on e'' string in the near field:
are very similar to those of the A0, C2, T1, C3 and C4 name_e,
modes. The chromatic scale on e'' string has frequencies 3. the initial frequency of spectrum: freq_begin,
in the vicinity of the C4 mode. Since the energy from a 4. the final frequency of spectrum: freq_end,
violinist is the same in each sound of scale on g string, 5. the increment of frequency: freq_step.
the differences between energy levels of the recorded
steps of scale should represent the different modes of an The output data are:
instrument. In the recorded chromatic scale on e'' string 1. the table of product of normalized energy spectra
the A0, C2, T1, C3 modes should also be present, but multiplication: g_table,
probably with different proportions from those on g 2. the frequencies of violin modes: c1_freq, a0_freq,
string. The C4 mode in this work was not searched. c2_freq, t1_freq, c3_freq,
Following the above, the recordings of the chromatic 3. the number of energy spectrum samples: K,
scale on g and e'' strings were employed while searching 4. the table of frequencies: freq_table.
for violin modes.
The method:
IV. THE COMPARISON OF ENERGY SPECTRA 1. Load name_g and name_e.
2. Try to open files name_g and name_e. If these files
The comparison of the energy spectra of sound exist, load their content into tables file_g and
recordings should highlight the common parts of both file_e. Both of the tables contain the double
spectra and reduce differences between them. For this precision elements.
purpose, a correlation function in the time domain was 3. If file name_g or file name_e do not exist, return to
used. Since the multiplication of spectra corresponds to point 1.
the correlation function in the time domain, this property 4. Load freq_begin, freq_end and freq_step.
was used to resolve this problem. However, before the 5. Calculate the number of spectrum samples K.
multiplication, the energy spectrum must be normalized 6. Create the table of frequencies freq_t from
with regard to the maximum value of energy in the freq_begin to freq_end with step freq_step. This
spectrum, because the recordings differ with respect to table contains the double precision elements.
the number of samples. 7. Create and launch two threads: the first to
Therefore, the following formulas were used: calculate the energy spectrum of file_g (energy_g),
the second to calculate the energy spectrum of
E max =max {E  f 0  , E  f 1  ,, E  f K−1 } (6) file_e (energy_e).
8. If both threads end, normalize energy_g and
where: energy_e.
Emax is the maximum value of energy in the spectrum, 9. Carry out the multiplication of normalized
E(fk) are samples of the energy spectrum, K is the number energy_g and energy_e. Write the result of this
of spectrum samples, calculation in the table multi_g_e. The multi_g_e
table has double precision elements.
E f k 10. Search for the maximal extrema in the multi_g_e
E norm  f k = (7)
E max table and store them with the maxima table. The
elements of this table are structures with two

190
double precision variables: frequency (freq) and and help_cos.
value (val). 6. Set variable n and variable k to 0.
11. Choose extrema in the vicinity of frequencies of 7. Calculate help_cos = cos(help_one[k]*n).
violin modes C1, A0, C2, T1 and C3. Fix the 8. Calculate help_sin = -sin(help_one[k]*n).
found extrema as violin modes. 9. Calculate spectrum[k].real = spectrum[k].real +
12. Write energy_g, energy_e, multi_g_e and the found rec_table[n] * help_cos.
extrema in the text file. 10. Calculate spectrum[k].imagine =
spectrum[k].imagine + rec_table[n] * help_sin.
VI. THE OPTIMISATION OF THE CALCULATION OF THE 11. Increase n by 1.
CONTINUOUS FOURIER TRANSFORM 12. If n is less than N, go to point 7.
13. If n is equal to N, increase k by 1 and calculate
The algorithm presented above, does not include the modulus, phase and energy of spectrum sample.
precise description of the calculation of the continuous 14. Increase k by 1.
Fourier transform. Although the time of waiting for the 15. If k is less than K, go to point 7.
work result of the violin modes searching programme is 16. If k is equal to K, end the calculating.
not critical, it was found that the number of arithmetic
operation could be reduced. Consequently, the application In this optimisation a number of arithmetic operations
for searching violin modes can work much faster. and access time for memory was reduced. The reduction
The resolution of this problem consists largely of the access time consists in the using simple variables to
preparation of tables with values for sinus and cosinus storing results of the most part of calculation.
arguments.
Formula (4) can be written as: VII. THE SEARCHING OF EXTREMA

[  ]
During searching for violin modes, only clear maxima
 
N −1
2 nf k 2 nf k
F  f k = ∑ f nT s cos − j sin (9) are interesting. In energy spectrum are present different
n=0 fs fs kind of disturbances, especially noise. The method of
searching for extrema have to be little sensitive for noise.
The fk are prescribed frequency, which was calculated In another case, the big number of found extrema will not
in point 6 of the main algorithm. To calculate argument of be incorrect.
trigonometric functions, two operation of multiplication The presented below algorithm of searching of
and one of division must be made. The table of prepared maxima uses five samples to detect one maximum. This
arguments can create, because all of values of variables method works only for clear maximum in energy
are known. spectrum.
This method was used to optimisation of calculating
continuous Fourier transform. The input data for algorithm are:
1. the table spectrum with the same structure as in the
The input data for algorithm are: continuous Fourier transform algorithm,
1. the number of spectrum samples: K, 2. the number of spectrum samples: K.
2. the table of sample of recording: rec_table,
3. the tables of frequencies: freq_t, The output data for algorithm are:
4. the sampling frequency: fs, 1. the number of maxima: M,
5. the number of samples of recording. 2. the table freq_max with found maxima. Elements
of this table are double precision variable.
The output data for algorithm are:
1. the table spectrum having elements with following The method:
structure: 1. Create a new boolean table maxima with K
- frequency (freq), elements.
- real part of spectrum sample (real), 2. Set all elements of maxima to false.
- imagine part of spectrum sample (imagine), 3. Set variable i to 0.
- modulus of spectrum sample (modulus), 4. Set M to 0.
- phase of spectrum sample (phase), 5. If spectrum[i].energy < spectrum[i+1].energy and
- energy of spectrum sample (energy). spectrum[i+1].energy < spectrum[i+2].energy and
spectrum[i+2].energy > spectrum[i+3].energy and
The method: spectrum[i+3].energy > spectrum[i+4], set
1. Create K-elements output table spectrum. maxima[i+2] to true and increase M by 1.
2. Copy frequencies from table freq_t into table 6. Increase i by 1.
spectrum. 7. If i is less than K – 5, go to point 5.
3. Create K-elements table help_one with double 8. If the number of found maxima is greater than 0,
precision elements. create freq_max table with M elements. In other
4. Calculate value of formula 2πfk/fs for each case go to the point 10.
frequency from freq_t table and store results into 9. Copy a fonded frequency to freq_table.
help_one. 10. End the searching.
5. Create two double precision variables: help_sin

191
This method of searching works correctly to 0.5 Hz of TABLE I
resolution in frequency domain. When the step of THE FREQUENCIES OF MODES OF VIOLINS FROM AMATI DATABASE
CALCULATED WITH USING THE ALGORITHM DESCRIBED IN THIS ARTICLE.
frequency is greater than 0.5 Hz, the algorithm omits a
part of violin modes. Signatu- Frequency of
re of
VIII. THE RESULTS OF CALCULATION violins C1 [Hz] A0 [Hz] C2 [Hz] T1 [Hz] C3 [Hz]

The algorithm for searching violin modes was 10 197 267 417 420 447
implemented in c++ language with using Qt library for 15 198 281 397 420 450
user interface. The program was compiled by gcc and 17 198 282 399 427 499
tested on Linux platform openSuSE 10.2.
The calculation was made for the all violins from 18 199 284 398 423 503
AMATI database. The initial frequency was 102 Hz, the 20 198 266 399 435 507
final frequency was 600 Hz. The frequency resolution
21 199 265 398 425 450
was 0.5 Hz. Only recordings of sound from the near field
was analysed. 23 198 265 396 418 476
The found modes were very similar to these was 24 198 282 395 418 475
presented in literature [1,2,4,5], but some violins from
AMATI database have artefacts in comparison with the 30 198 264 397 420 452
results of the researches [1,2,4,5]. 31 197 280 417 440 472
Since the extrema are better visible in the linear scale,
32 197 281 418 424 472
it was used to the graphic presentation of multiplied
energy spectra. 33 197 282 421 440 451
In Fig. 1 exemplary solution obtained by the algorithm 35 198 279 396 420 474
described in this paper is given. This is the product of
multiplication normalized energy spectra for the 36 198 265 397 423 496
recordings chromatic scales on g string and e'' string for 37 197 280 390 435 482
violin fixed by number 85. The found modes are:
39 197 278 388 416 464
C1 = 197 Hz, A0 = 278.5 Hz, C2 = 420 Hz,
T1 = 422 Hz, C3 = 468 Hz. 40 198 280 416 423 449
41 197 280 419 441 469
Some violins have artefacts with the A0 mode. Two
maxima are observed instead of one maximum. In Fig.1 43 197 285 419 425 447
two extrema in band from 250 Hz to 300 Hz are present.
The interpretation of this effect is following: a violin In Table I the exemplary results of searching are given.
maker decides, where the A0 mode will be present, but he The modes was searched with 1 Hz frequency resolution
must tune the belly and back to the same frequency of A0 in band from 100 Hz to 600 Hz.
mode [1,2,4,5]. The making of this consists in suitable
sculpturing of the belly and back. This is very difficult IX. THE COMPARING RESULTS FROM NEW METHOD OF
and precision task, because the small mistake takes effect SEARCHING FOR VIOLIN MODES WITH RESULTS
a change of modes frequencies. DESCRIBING IN LITERATURE

The results of searching for modes with using the


0,43 recordings of chromatic scales must be compared with
0,40
results described in the literature [1,2,4,5]. In the
0,38
0,35
traditional method, the pulse response of violin mode is
0,33 analysed, but the vibrations of violin body are measured
0,30 by accelerometer. The results of both methods can differ,
Product of multiplication

0,28 because the stimulate of instrument are completely


0,25 different. However, the found frequencies of modes by
0,23 the both methods should be similar.
0,20
0,18
0,15
0,13
0,10
0,08
0,05
0,03
0,00
100 200 300 400 500 600
Frequency [Hz]

Fig. 1. The product of multiplication of normalized energy spectra of Fig. 2. The result of analysis of pulse response of violin body by
chromatic scales for violin with number 85 accelerometer [1]

192
Fig. 2 presents the exemplary result of analysis the [10] P. Wrzeciono, The Mathematical Method of describing properties
pulse response of violin body [1]. The frequencies of of sound of musical instrument, 53th Open Seminar on Acoustics,
OSA 2006, Zakopane, Poland
modes are fixed in this diagram. The C1 mode is near 200
Hz, the A0 mode is near 300 Hz, the C2,T1 and C3
modes are between 400 Hz and 500 Hz. The found modes
in the violin sound are very similar to example from book
[1]. However, in the results of new method, more extrema
was observed.
There are a lot of reasons of this situation. The first is
the sound wave propagation in different media [1]. The
traditional methods measure the vibrations of violin body,
not a sound wave in the air. The sound of instrument
depends on vibrations, but it is not the simple
dependence. Consequently, the spectrum of sound differs
from the spectrum of violin body vibrations. In many
cases, the dependence is linear.
Additional, in the last acoustic researches, a lot of
nonlinear effects was observed [8]. There are also in the
musical instruments, especially in the string instruments.
In the results of this work, probably the both kinds of
effects can observe, because the proportions between the
modes are changed and the extra maxima are present in
the energy spectra of violin sound.

X. CONCLUSION

The method presented in this article shows that the


frequencies of violin modes are always present during
normal play. This frequencies can extract from the violin
sound and can compare to the results of vibrations of
violin body studies. The main advantage of this new
method is possibility of searching for characteristic
properties of violin in this same sound, which normally
come to a listener. This can be used to an automatic
classification of instruments, especially to musical
instrument sound quality researches. Additional, this
method can be useful to search nonlinear effects in violin
and other instruments from this family.

REFERENCES
[1] Y. Andou, A acoustics of musical instruments, Ongaku-no Tomosha,
Japan, Tokyo 2000 (japanese)
[2] H. Dünwald, An introduction to the objective tuning of sound
quality of violins (german), Acustica (Acta Acustica) vol. 58, pp.
163-169, 1958
[3] D.E. Hall, Musical Acoustics – An Introduction, Wadsworth
Publishing Company, USA, 1998
[4] C.M. Hutchins, A 30-year experiment in the acoustical and musical
development of violin-family instruments, Journal of the Acoustical
Society of America, vol. 92, pp 639-650, 1992
[5] E. Jansson, Acoustics for violin and guitar makers, 2002
www . speech . kth . se / music / acviguit4 /
[6] E. Łukasik, AMATI - the multimedia database of violin sounds
(polish), Multimedia i Sieciowe Systemy Informatyczne, MiSSI
2002, Wrocław, Poland
[7] E. Łukasik, P. Wrzeciono, The digital registration of instrument
sounds for the research of theirs tone (polish), Raport Instytutu
Informatyki RB-03/2001, Politechnika Poznańska, Poznań 2001,
Poland
[8] E. Weyna, A propagation of energy of real acoustic sources,
(polish), Wydawnictwa Naukowo-Techniczne, Warszawa 2005,
Poland
[9] P. Wrzeciono, Statistical and perceptual analysis of the violin tone,
52th Open Seminar on Acoustics, OSA 2005, Wągrowiec, Poland

193

You might also like