{"id":707,"date":"2016-04-13T20:08:19","date_gmt":"2016-04-14T02:08:19","guid":{"rendered":"https:\/\/supermediocre.org\/?p=707"},"modified":"2016-07-12T19:06:04","modified_gmt":"2016-07-13T01:06:04","slug":"tuning-the-tubes","status":"publish","type":"post","link":"https:\/\/supermediocre.org\/index.php\/2016\/04\/13\/tuning-the-tubes\/","title":{"rendered":"Tuning the Tubes"},"content":{"rendered":"<p>The resonator tubes are an important part of the xylophone. They boost and shape the sound produced by the bars. There is lots of information\u00a0on the web about resonator tubes, so I won\u2019t repeat that, but I will discuss our approach to making, mounting, and tuning the tubes.<\/p>\n<h1>The Physics<\/h1>\n<p>It is not hard to find info about \u201cquarter wave stopped resonator tubes\u201d on the web (in musical parlance these are sometimes called \u201cstopped pipes.\u201d) This is the type of resonator tube that is used for xylophones and marimbas These tubes basically resonate at a fundamental frequency of c\/4L, where L is the length of the tube and c is the speed of sound. In simple terms, the tube boosts the bar sound amplitude by utilizing the normally wasted downward-directed sound energy in a way that boosts the upward facing energy (which is what you mostly hear). It shapes the sound too, because it does not boost all frequencies equally. In particular, it only boosts the fundamental and the odd harmonics. Because xylophone bars are tuned to a 1:3:6 frequency relationships, the fundamental and second partial will be boosted, but the third partial will not. This is another reason why I wasn\u2019t too concerned about tuning the 3rd partial \u2013 its already puny energy is swamped by the boosted energy of the first two partials. Additionally, while\u00a0we haven\u2019t discussed it much, real xylophone bars \u201cring up\u201d not just the \u201ctransverse modes\u201d that dominate the sound, but also lesser \u201clongitudinal\u201d and \u201ctorsional\u201d modes. Because these modes are not typically odd harmonics of the fundamental, they do not get amplified. So, at the end of the day, when tubes are added to the instrument, you mostly hear the fundamental and the second partial \u2013 all the other frequencies get dwarfed.<\/p>\n<p>Tuning the tubes is done by adjusting a movable stopper that effectively changes the length of the tube. This is what determines the length L in the equation above. So you might think that tuning the tubes is just a matter of computing the tube length via the equation above and then setting the stopper to that length (I did,) however, like most equations from physics, the formula above is only approximate. It is very accurate under certain conditions, such as when the tube length to diameter ratio is large and the sound input to the tube is a \u201cplane wave.\u201d However, neither of these assumptions is true for the xylophone. In particular, the shorter tubes have a relatively low length-to-diameter ratio; and the sound wave coming off the bar is likely not planar, since the bottom of the bar is curved.<\/p>\n<p>Dr Entwistle pointed me to a book called \u201cThe Physics of Musical Instruments,\u201d by Rossing and Fletcher (ISBN-13: 978-1441931207,) that had some interesting comments about xylophones and \u00bc wave resonators. In the section on resonator tubes, they note that the\u00a0resonant frequency of the tube is a weak function of the distance between the tube end and the bottom of the bar. However, they state that \u201cAs yet, the theory describing the coupled bar-resonator system has not been worked out in detail,\u201d which basically means that there is not\u00a0a simple equation to compute the\u00a0actual stopper position as a function of the desired frequency.<\/p>\n<p>Additionally, the Rossing book describes\u00a0a few topics\u00a0of practical importance. First, the it\u00a0describes something referred to as the \u201cend correction factor.\u201d It turns out that the equation above must be tweaked somewhat due to the fact that the standing wave in the tube does not end exactly at the pipe mouth but is rather a bit beyond it. The more accurate equation for the resonator frequency is f =c\/[ 4(L+0.61r)], where r is\u00a0the\u00a0radius of the tube. I found other references to the end correction online and there appears to be some debate in the literature over the correct value of the correction factor (i.e., the value of 0.61).<\/p>\n<p>As noted above, the book notes that the tube frequency is affected by the spacing between the tube end and the bar bottom. I had already seen that some xylophones allowed for adjustment of the height of the tube assembly (i.e., the assembly of all of the tubes locked together into a rigid structure) to compensate for temperature changes. It makes sense that if the tube-bar spacing is less than the 0.61r factor, then it\u00a0will affect the tube resonance since the bar is effectively serving as\u00a0a stop at\u00a0the top of the tube.<\/p>\n<p>At the end of the day, it became clear that the bars must be tuned in situ to obtain accurate tuning. However, I couldn\u2019t resist the urge to check out the physics, so I did a few experiments and built some tuning curves that I hoped might at least guide\u00a0the resonator tuning. However, in the spirit of full disclosure, I must note that I mostly ignored\u00a0the results from this effort\u00a0and just tuned the tubes by\u00a0ear! Nevertheless, I will describe these experiments, if for no other reason than to perhaps save others the folly of this endeavor. You can safely skip this section without regret if you just want to git-er-done\u2026<\/p>\n<h1>Tuning the Tubes<\/h1>\n<p>I started out by doing experiments with a piece of PVC as I awaited the delivery of the aluminum. I was particularly interested in verifying the resonant behavior of the tubes as a function of spacing distance to the bar. It wasn\u2019t clear to me how to establish the correct tube-bar spacing. Intuitively, it seemed to me that the best coupling might result from close spacing, so that the spacing would be dictated by physical constraints, like avoiding contact if the bar should sag.<\/p>\n<p>In order to start my experiments, I needed a value for the speed of sound. The speed of sound is a function of the density of the air, which is a function of the temperature. I found an online calculator <a href=\"http:\/\/www.srh.noaa.gov\/epz\/?n=wxcalc_speedofsound\" target=\"_blank\">here <\/a>that computed the velocity. During my experiments, I measured the temperature at 19.2 C, and the the online calculator gave me a velocity of 343 m\/s.<\/p>\n<p>I must admit that I struggled a bit with how to find the resonant frequency for my PVC resonator pipe. I fabricated an adjustable stop and set it\u00a0to yield a\u00a015.0 cm tube. Per the standard 1\/4 wave calculation (with a 0.61*r end correction,) the computed frequency was\u00a0about 525 Hz. I experimented with several methods of exciting the bar. I tried whacking the end of the tube, and attempted to measure the impulse, but the resonance died out rather quickly. Here\u2019s an example where you can see that the pulse dies out in about 25 ms:<\/p>\n<figure id=\"attachment_713\" aria-describedby=\"caption-attachment-713\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_decay.png\" rel=\"lightbox[707]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-713\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_decay-300x132.png\" alt=\"Measured decay of 15 cm tube after being whacked.\" width=\"300\" height=\"132\" srcset=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_decay-300x132.png 300w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_decay.png 437w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-713\" class=\"wp-caption-text\">Measured decay of 15 cm tube after being whacked.<\/figcaption><\/figure>\n<p>I did some decayed sinusoidal fitting to this, but wasn\u2019t able to get accurate results. Ultimately, I used a small speaker to excite the tube as shown in this photo:<\/p>\n<figure id=\"attachment_714\" aria-describedby=\"caption-attachment-714\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/IMG_0117.jpg\" rel=\"lightbox[707]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-714\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/IMG_0117-300x225.jpg\" alt=\"PVC tube with small speaker used for excitation\" width=\"300\" height=\"225\" srcset=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/IMG_0117-300x225.jpg 300w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/IMG_0117-1024x768.jpg 1024w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/IMG_0117.jpg 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-714\" class=\"wp-caption-text\">PVC tube with small speaker used for excitation<\/figcaption><\/figure>\n<p>The tube was excited by the speaker at the right, and the resulting audio was recorded with the microphone.<\/p>\n<p>Next, I tried exciting the tube with white noise. Interestingly, you could easily hear the \u201ccoloring\u201d of the noise due to the modes. This gave PSD plots like this:<\/p>\n<figure id=\"attachment_715\" aria-describedby=\"caption-attachment-715\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/white_noise_tube.png\" rel=\"lightbox[707]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-715\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/white_noise_tube-300x102.png\" alt=\"PSD of white noise response.\" width=\"300\" height=\"102\" srcset=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/white_noise_tube-300x102.png 300w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/white_noise_tube.png 644w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-715\" class=\"wp-caption-text\">PSD of white noise response.<\/figcaption><\/figure>\n<p>However, I found that identifying the peaks was unreliable. Ultimately, I wrote some Matlab code to generate and play a frequency sweep while recording the response. Here is an example of one of the PSD curves:<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_716\" aria-describedby=\"caption-attachment-716\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_sweep_15cm.png\" rel=\"lightbox[707]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-716\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_sweep_15cm-300x225.png\" alt=\"PSD of 15 cm tube excited with frequency sweep.\" width=\"300\" height=\"225\" srcset=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_sweep_15cm-300x225.png 300w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_sweep_15cm.png 672w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-716\" class=\"wp-caption-text\">PSD of 15 cm tube excited with frequency sweep.<\/figcaption><\/figure>\n<p>This is what the recording sounded like for this tube:<\/p>\n<!--[if lt IE 9]><script>document.createElement('audio');<\/script><![endif]-->\n<audio class=\"wp-audio-shortcode\" id=\"audio-707-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/wav\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/20150927_132105_tube_150mm.wav?_=1\" \/><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/20150927_132105_tube_150mm.wav\">https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/20150927_132105_tube_150mm.wav<\/a><\/audio>\n<p>The code identifies the peaks (which of course correspond to odd harmonics). However, the first peak (the fundamental) was always a bit broad and had a sort of \u201cshoulder\u201d to it, which made me doubt it. So I wrote a little algorithm to find an the optimal &#8220;least common factor&#8221; for all of the identified peaks. The higher harmonics had generally broad peaks so I also ignored them, and only used the lower modes. In general the setup was somewhat fickle and the quality of the peaks that I got was a strong function of the microphone and speaker placement. In any case, here is some data for my 15 cm tube:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Temp = 19.2 deg C\r\n\r\n\r\n&gt;&gt; ResonatorTune(500, 'res=15.0, spc=3.0')\r\n\r\nres=15.0, spc=3.0 -<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>Fund: 509.0<\/strong><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">, Error (Hz): 5.9, NumModes: 2\r\n\r\n   Mode 1: Error (Hz): +10.6\r\n\r\n   Mode 2: Error (Hz): -1.2\r\n\r\n&gt;&gt; ResonatorTune(500, 'res=15.0, spc=2.0')\r\n\r\nres=15.0, spc=2.0 -<\/pre>\n<p><strong><span style=\"color: #ff0000;\">Fund: 509.4<\/span><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">, Error (Hz): 6.0, NumModes: 2\r\n\r\n   Mode 1: Error (Hz): +10.8\r\n\r\n   Mode 2: Error (Hz): -1.3\r\n\r\n&gt;&gt; ResonatorTune(500, 'res=15.0, spc=1.0')\r\n\r\nres=15.0, spc=1.0 -<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>Fund: 505.0<\/strong><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">, Error (Hz): 2.8, NumModes: 2\r\n\r\n   Mode 1: Error (Hz): +5.0\r\n\r\n   Mode 2: Error (Hz): -0.5\r\n\r\n&gt;&gt; ResonatorTune(500, 'res=15.0, spc=0.5')\r\n\r\nres=15.0, spc=0.5 -<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>Fund: 492.5<\/strong><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">, Error (Hz): 3.4, NumModes: 2\r\n\r\n   Mode 1: Error (Hz): +6.1\r\n\r\n   Mode 2: Error (Hz): -0.7\r\n<\/pre>\n<p>These data correspond to 4 different collections with varying standoff distances from the end of the tube to the speaker (from 3.0 cm to 0.5 cm). It is interesting that the frequency doesn\u2019t shift above about 2 cm, but there is a nearly 20 Hz shift when the tube is very close to the speaker. This clearly shows the behavior noted in the Rossing book (i.e., decreased frequency for close spacing,) which was pretty cool.<\/p>\n<p>So using this technique, I set off to build a curve that could be used to set the stopper distance for each tube. I chose to set the distance at 0.5 cm, which is about as close as I could safely space the tubes from the bars without fear of contact. For each stopper distance, I performed a sweep and used my least-common-factor code to find the tube resonance. With this approach, I was able to build the following curve.<\/p>\n<figure id=\"attachment_725\" aria-describedby=\"caption-attachment-725\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_curve.png\" rel=\"lightbox[707]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-725\" src=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_curve-300x225.png\" alt=\"Resonator tube tuning curve.\" width=\"300\" height=\"225\" srcset=\"https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_curve-300x225.png 300w, https:\/\/supermediocre.org\/wp-content\/uploads\/2016\/03\/tube_curve.png 672w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-725\" class=\"wp-caption-text\">Resonator tube tuning curve.<\/figcaption><\/figure>\n<p>The blue points on the curve are the measurements and the red line was created using the frequency equation given above (including the 0.61r end correction factor). The equation accurately predicts the frequency for the longer pipes, but performs poorly for the short pipes. As a quick test, I tried fitting the equation above, but left the speed of sound and the end correction factor as free variables. This resulted in the blue curve. The fit was better for the short tubes, but resulted in poor performance for the long tubes.\u00a0So I decided to skip function fitting entirely, and just set my stopper distances by interpolation between the measured points.<\/p>\n<h1>Next Up<\/h1>\n<p>This post described\u00a0some of the science involved in establishing the tube resonant frequency. In the next post, I will describe the fabrication and mounting of the resonator tubes.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The resonator tubes are an important part of the xylophone. They boost and shape the sound produced by the bars. There is lots of information\u00a0on the web about resonator tubes, so I won\u2019t repeat that, but I will discuss our approach to making, mounting, and tuning the tubes. The Physics It is not hard to &hellip; <a href=\"https:\/\/supermediocre.org\/index.php\/2016\/04\/13\/tuning-the-tubes\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Tuning the Tubes<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":722,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,2],"tags":[24,18,25,11,3],"class_list":["post-707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wickstroms","category-xylophone","tag-resonator","tag-resonator-tube","tag-tube","tag-tuning","tag-xylophone"],"_links":{"self":[{"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/posts\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/comments?post=707"}],"version-history":[{"count":16,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"predecessor-version":[{"id":945,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/posts\/707\/revisions\/945"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/media\/722"}],"wp:attachment":[{"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supermediocre.org\/index.php\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}