-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
197 lines (137 loc) · 12.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Cajon Drum Analysis and Sound Synthesis by alexnieva</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-dark.css">
<script src="javascripts/scale.fix.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Cajon Drum Analysis and Sound Synthesis</h1>
<p>alexnieva.GitHub.io</p>
<p class="view"><a href="https://github.com/alexnieva">View the Project on GitHub <small>alexnieva</small></a></p>
<ul>
<li class="single"><a href="https://github.com/alexnieva/alexnieva.github.io">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>
<a id="introduction" class="anchor" href="#introduction" aria-hidden="true"><span class="octicon octicon-link"></span></a>Introduction.</h1>
<p>The Cajon drum is a percussion instrument that was originated as a substitute to African drums by the Afro-Peruvian community that were brought as slaves during colonialism. This instrument also exists in Cuba and is made of wood. Its shape is of a rectangle of about 480mm height, 300mm width, and 300mm depth. The front face and the back face are usually different; the front face being made of thinner wood - usually plywood - and the back face has a hole that acts as a sound projector. </p>
<p><img src="http://cdn.shopify.com/s/files/1/0266/7599/products/J021.ProCajon2_1024x1024.jpeg?v=1387413510" alt="Cajon Drum"></p>
<!--
<p><img src="http://i.istockimg.com/file_thumbview_approve/23282158/3/stock-photo-23282158-cajon-drummer.jpg" alt="Cajon Drum"></p>
-->
<p>It is also used in flamenco and jazz music with some variations such as snares or other metallic objects installed on the back of the front plate . Sounds are generated by hand-strumming the front face in different locations with different parts of the hand. </p>
<p><a href="https://www.youtube.com/watch?v=ixJjpdti9jY">Click to see a video of the Cajon Drum Sound. Susana Baca - Peruvian Artist</a></p>
<h1>
<a id="motivation-and-objectives" class="anchor" href="#motivation-and-objectives" aria-hidden="true"><span class="octicon octicon-link"></span></a>Motivation and Objectives.</h1>
<p>The main objective of this project is to synthesize the sounds generated by the Cajon drum. Being an essential instrument in many rhythms of the Peruvian musical culture and also used in many other types of music. It's important to understand its physical behaviour and subtleties in regards to different materials and designs.</p>
<h1>
<a id="sound-synthesis-approach" class="anchor" href="#sound-synthesis-approach" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sound Synthesis Approach.</h1>
<p>Based on the geometry of the Cajon drum, synthesis can be tackled through several different methods. We can work with a lumped parameter model based on the acousto-mechanic properties of the system [1]. This will allow us to generate an equivalent electrical circuit that can be discretized and solved in the digital domain using the Laplace transform and its mapping into the Z plane.</p>
<p>Another approach would be to use a Digital Waveguide mesh in 2 and 3 dimensions defining a 2D mesh for the front plate, and a 3D mesh for the volume of air inside the drum [2, 3]. In addition, we have to consider the boundary conditions depending on the stiffness and materials of the drum. The first attempt to model the 3D mesh is written in the following Matlab script. See it <a href="alexnieva.github.io/mesh3d_cajon_drum.m">here</a>.</p>
<p>The technique chosen to synthesize the Cajon drum sounds is based on modal analysis and coupled mode synthesis [4, 5]. The geometry of the drum is basically that of a Helmholtz resonator with a vibrating plate as the excitation of the system. The resonant frequency of a Helmholtz resonator is given by the expression:</p>
<p><img src="images/freshelmholtz.png" alt="Resonance Frequency"></p>
<p>where v is the speed of sound, A is the area of the duct, Vo is the volume of the box and Leq is the equivalent length of the duct. For a Cajon drum of this size, the approximate resonant frequency is around 60Hz to 100Hz depending on the diameter of the back hole and its apparent length.</p>
<p>It is important to point out that there are several ways to strum the Cajon, but the two most popular ones are to strum it in the middle of the front plate with the hand making the shape of a spoon, and to strum it at the upper edge just with the fingers. This is important in the generation of different pitched sounds.</p>
<p>The frequency response measured in [1] for the transfer function is (force vs. pressure at the front plate using an excitation hammer): </p>
<p><img src="images/freq_response.gif" alt="Frequency response"></p>
<p>The sound pressure level at the hole in the back plate is according to [1]:</p>
<p><img src="images/spl_cajon.gif" alt="Sound Pressure Level"></p>
<p>This information suggests that we can attempt to synthesize the sounds from the exponentially decaying sinusoids originated by the vibrating modes from the instrument. These can be modeled as a second order digital filter of the form: </p>
<p><img src="images/diffeq.gif" alt="Resonance Frequency"></p>
<p>In our case we are going to make use of Five second order digital filters to match the resonant frequency of the Helmholtz resonator and the vibrating modes of the plate. The values of the complex poles depend on the bandwidth B and resonant frequency of each of them. For the Cajon drum, depending on its size and hole diameter, the first resonance frequency is around 90Hz. According to sound pressure measurements there are also frequency components in the 100Hz to 200Hz range that can be attributed to harmonics of this fundamental frequency. Also the first resonant mode of the front plate is around 360 Hz and 574Hz depending on its size [6]. According to the analysis performed in this project, the sound generated by the Cajon drum has an important component from its behaviour as a Helmholtz resonator, but also has mid-range frequency content in the 2KHz range where the attack of the hand strum is mostly perceived. This is important to get a more realistic synthesized sound.</p>
<h1>
<a id="synthesized-sounds" class="anchor" href="#synthesized-sounds" aria-hidden="true"><span class="octicon octicon-link"></span></a>Synthesized Sounds.</h1>
<p>The sound synthesis code was implemented in Matlab (<a href="alexnieva.github.io/reson_cajon_alexnieva.m">script</a> in the repository of this project). The impulse response of the second order digital filters and the following synthesized audio files were generated:</p>
<p><img src="images/fresp_filters.png" alt="Resonances of filters"></p>
<h3>Low Frequency Hit</h3>
<p>Input to the system. Recorded damped hand strum at center of the front plate - wave file</p>
<audio controls>
<source src="CAJON_SAMPLE1.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound box as a Helmholtz resonator only - wave file</p>
<audio controls>
<source src="CAJON_AS_HELM_RES.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound of box resonances - wave file</p>
<audio controls>
<source src="CAJON_BOX.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound of Cajon drum including plate resonances, low frequency hit - wave file</p>
<audio controls>
<source src="CAJON_LOW.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p><h3>High Frequency Hit</h3></p>
<p>Input to the system. Recorded damped hand strum at edge of the front plate - wave file</p>
<audio controls>
<source src="CAJON_SAMPLE3.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound box as a Helmholtz resonator only - high pitch hit - wave file</p>
<audio controls>
<source src="CAJON_AS_HELM_RES_HIGH.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound of box resonances - high pitch hit - wave file</p>
<audio controls>
<source src="CAJON_BOX_HIGH.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Synthesized sound of Cajon drum including plate resonances, high pitch hit - wave file</p>
<audio controls>
<source src="CAJON_HIGH.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>
<h3>Real sounds of the Cajon drum can be listened here:</h3></p>
<p>Cajon drum sound with snares - wave file</p>
<audio controls>
<source src="CAJON_SAMPLE_BACK_UD2.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Cajon drum sound low pitch- wave file</p>
<audio controls>
<source src="CAJON_SAMPLE_SUSANABACA3low.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Cajon drum sound high pitch- wave file</p>
<audio controls>
<source src="CAJON_SAMPLE_SUSANABACA2high.wav" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>In order to obtain an excitation signal for the resonant filters, we made dry measurements of the damped (filled with absorptive material) Cajon drum using a condenser microphone (Audio Technica AT2020 - fairly flat frequency response). Unfortunately, the Cajon drum used for these measurements had snares. A better excitation signal would have to be recorded using a Cajon drum without those additions, a controlled environment, and calibrated microphones.</p>
<h1>
<a id="discussion" class="anchor" href="#discussion" aria-hidden="true"><span class="octicon octicon-link"></span></a>Discussion</h1>
<p>The attempt to recreate the sounds generated by the drum sound was in part successful due to the simple geometry of the instrument. Nevertheless, there is still room to improve this sound synthesis engine and this study. There were difficulties throughout the study, such as obtaining accurate values for the poles of the digital filters. This was done based on the graphs presented in the references and our measurements and analysis based on the fourier transforms of the obtained signals. It is necessary to perform measurements for each instrument to obtain the corresponding parameters because the change of size, shape, type of wood of the drum change the resonance frequencies to an extent that makes the current model not accurate. </p>
<p>The matching of the resonant filters was done manually approximating their bandwidths and calculating the resonant frequency of the Cajon drum used in this project.</p>
<p>Our study and synthesized sounds obtained suggest that the low frequency behaviour of the Cajon drum is well understood but there are mid-range and high frequency components that influence the overall percussive attack and brightness of the Cajon drum timbre that need to be addressed in future studies.</p>
<h1>
<a id="references" class="anchor" href="#references" aria-hidden="true"><span class="octicon octicon-link"></span></a>References</h1>
<p>[1] Llimpe, C., Moreno, J. "Estudio Preliminar Teorico-Experimental de las Caracteristicas Acusticas del Cajon Peruano". Presented in TecniAcustica 2000, II Congreso Iberoamericano de Acústica, Madrid, Spain. October 2000.</p>
<p>[2] Van Duyne, S.; and J. Smith. “Physical Modeling with the 2-D Digital Waveguide Mesh,” Proc. ICMC, Tokyo. 1993.</p>
<p>[3] M. Karjalainen, V. Ikonen, A. Järvinen, P. Maijala, L. Savioja, A. Suutala, J. Backman, S. Pohjolainen: "Comparison of Numerical Simulation Models and Measured Low-Frequency Behavior of a Loudspeaker". In the 104th Audio Engineering Society (AES) Convention, preprint no. 4722 Amsterdam, the Netherlands. 1998.</p>
<p>[4] P. R. Cook. "Physically informed sonic modeling (phism): Synthesis of percussive sounds". Computer Music Journal, 21 (3): 38-49, 1997. </p>
<p>[5] Scott A. Van Duyne, "Coupled Mode Synthesis". Center for Computer Research in Music and Acoustics, Stanford University. <a href="https://ccrma.stanford.edu/files/papers/stanm101.pdf#page=42">Paper download</a></p>
<p>[6] L. E. Kinsler. "Fundamentals of Acoustics". p. 82, New York, Wiley, 3rd Edition, 1982. </p>
</section>
</div>
<footer>
<p>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></p>
</footer>
<!--[if !IE]><script>fixScale(document);</script><![endif]-->
</body>
</html>