<?xml version="1.0" encoding="utf-8"?>
<!-- RSS generated by Web Crossing(r) Unix-v6.4 built Jan 14 2010 18:50:13 (source:1372 2010-01-14 15:39:31 -0800)/-6.4 on 2010-03-17-20.55.38 GMT -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://www.officeformac.com/blog/A-Circle-of-Fifths--How-I-Learned-Music-Theory-using-Excel/blog_rss/synopsis.xml" rel="self"></atom:link>
<title>
Mac Mojo: The Office for Mac Team Blog - A Circle of Fifths: How I Learned Music Theory using Excel</title>
<link>http://www.officeformac.com/ms/blog</link>
<description>
&lt;p&gt;Someone recently asked me what I do when I&amp;rsquo;m not playing &lt;a href=&quot;http://www.upa.org/&quot;&gt;Ultimate&lt;/a&gt;. I responded by saying &amp;quot;I play a lot of guitar&amp;quot; (deftly sidestepping a &lt;a href=&quot;http://www.officeformac.com/blog/Job-Description-for-a-Program-Manager&quot;&gt;conversation&lt;/a&gt; about my day job). And while I&amp;rsquo;ve played guitar for almost 20 years, I&amp;rsquo;ve also spent most of those two decades stubbornly refusing to learn any music theory. &amp;quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Jimi_Hendrix&quot;&gt;My&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Stevie_Ray_Vaughn&quot;&gt;guitar&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Stone_Gossard&quot;&gt;gods&lt;/a&gt; had self-taught so why should I not do the same?&amp;quot; I reasoned. But I recently discovered that I really do want to understand (if not practice) music theory, so I turned to several sources, one of which was Excel.&lt;/p&gt; 
&lt;p&gt;&amp;quot;Why use Excel to teach yourself music theory?&amp;quot; I ask myself. To which I retort, &amp;quot;Music theory is all about patterns in series and Excel is an excellent and convenient tool for generating such series and manipulating them to expose their patterns.&amp;quot; Convinced, I opened my &lt;a href=&quot;http://www.everymac.com/systems/apple/macbook/stats/macbook_2.0_black.html&quot;&gt;MacBook&lt;/a&gt; and launched Excel in hopes of discovering the patterns underlying the &lt;a href=&quot;http://en.wikipedia.org/wiki/Circle_of_fifths&quot;&gt;Circle of Fifths&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;I&amp;rsquo;m not completely na&amp;iuml;ve about music theory. I know the names of the twelve tones (A, A#, B, C, C#, et al.) used in Western music, and I understand that A-sharp and B-flat really are two names for the same tone. In other words, I sort of generally grok the black and white key arrangement on the &lt;a href=&quot;http://en.wikipedia.org/wiki/Image:Klaviatur-3-en.svg&quot;&gt;piano keyboard&lt;/a&gt; or the &lt;a href=&quot;http://en.wikipedia.org/wiki/Fingerboard&quot;&gt;fret board&lt;/a&gt; of a guitar. It&amp;rsquo;s not much of a starting point, but it&amp;rsquo;s enough: I enter the twelve tones in a column in Excel.&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b637f9&quot; /&gt;&lt;img width=&quot;0&quot; height=&quot;0&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b637f7&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;I also understand that the tones repeat themselves in cycles called octaves. For example, the tones G, G#/Ab, A ascend into each other in exactly the same way that C, C#/Db, D do. I set the value of cell A13 to &amp;quot;=A1&amp;quot; and then use AutoFill to complete a second octave in cells A13 through A24. Cool, but while this second octave will be totally useful (for reasons that may become obvious shortly), I don&amp;rsquo;t need to see it any longer, so I select rows 13 through 24 and hide them.&lt;/p&gt; 
&lt;p&gt;My next goal for Excel is to generate all of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Major_scale&quot;&gt;major scales&lt;/a&gt; in Western music. There are twelve of these, one for each of the twelve tones, and each is derived from a common seven-tone pattern based on its root tone: up 2, up 2, up 1, up 2, up 2, up 2. Excel can handle this. I start by entering the common pattern in the A row using cell references instead of values.&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b637ff&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;The picture above shows what I typed into cells B1 through G1, but the leading &amp;quot;=&amp;quot; characters mean these cells should compute their values (like we did in cell A13). What Excel actually displays looks like the following: It&amp;rsquo;s the A-major scale!&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b63801&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;At this point we can take advantage of the same powerful AutoFill feature we used to generate the second octave, this time to generate all the rest of the major scales. Are you ready for this? Excel sure is. Just select cells B1 through G1 and drag from the lower right-hand corner of that selection down to highlight cells B1 through G12. Voila: All of the major scales, and barely any hassle.&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b63805&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;This is a great start. I just generated every major scale by typing just 12 literal values plus an additional 7 cell references into Excel and using AutoFill to generate the rest. Totally great, but it&amp;rsquo;s not yet the fabled Circle of Fifths. How do we get there from here?&lt;/p&gt; 
&lt;p&gt;I know the Circle of Fifths organizes major scales by the number of sharps and flats in each scale. &lt;a name=&quot;MyAnalogClock&quot;&gt;&lt;/a&gt;Think of an &lt;a href=&quot;http://en.wikipedia.org/wiki/Image:Circle_of_fifths_deluxe_4.svg&quot;&gt;analog clock&lt;/a&gt; where 1:00 is the major scale with 1 sharp, 11:00 is the major scale with 1 flat, 2:00 is the major scale with 2 sharps, 10:00 is the major scale with 2 flats, etc. I also recall that A-sharp and B-flat are two names for the same tone (and likewise for the other sharp/flat pairs), so I could also think of the same analog clock where 1:00 is one of two major scales with 1 sharp/flat while 11:00 is the other.&lt;/p&gt; 
&lt;p&gt;I create a column H to list the number of sharps and flats in each row using Excel&amp;rsquo;s &lt;a href=&quot;http://office.microsoft.com/en-us/excel/HP052090291033.aspx&quot;&gt;COUNTIF&lt;/a&gt; function to do the heavy lifting. I enter the following value into cell H1 to get the number of sharps and flats in the A-major scale, then use AutoFill to generate similar results for the rest of the major scales: =COUNTIF(A1:G1, &amp;quot;?#/?b&amp;quot;)&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b63809&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;I want to sort by column H but there&amp;rsquo;s a problem: The way I set this up, all those cell references assume that we&amp;rsquo;re sorted by column A. No big deal though: I no longer need the cell references now that the scales are all generated. I copy the whole range A1 to G12 and use Paste Special to paste back over that same range as values. Now I can sort by column H without turning the major scales to &lt;a href=&quot;http://en.wikipedia.org/wiki/Jazz&quot;&gt;jazz&lt;/a&gt;!&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b6380b&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;It&amp;rsquo;s still not the Circle of Fifths, but it&amp;rsquo;s looking a lot more like my &lt;a href=&quot;#MyAnalogClock&quot;&gt;analog clock&lt;/a&gt;. Other than the zeros and the fives, each of the pairs of scales from column H shares a common property: One of the two has a sharp/flat in the 4th position (column D) and the other has a sharp/flat in the 7th position (column G) while neither scale has both. Interestingly, two of the three scales with five sharps/flats in also share this property (the third is just special: we&amp;rsquo;ll call it 6 sharps/flats for reasons that will be explained shortly). I create a column I to expose this property then sort by it. Resorting by column H within those results gives me just what I&amp;rsquo;ve been looking for.&lt;/p&gt; 
&lt;p&gt;Behold: The Circle of Fifths!&lt;/p&gt; 
&lt;p&gt;&lt;img width=&quot;427&quot; height=&quot;193&quot; alt=&quot;&quot; src=&quot;http://www.officeformac.com/.59b6380e/cmd.233/embedded..59b6380d&quot; /&gt;&lt;/p&gt; 
&lt;p&gt;I understand now why that F#/Gb-major scale with five sharps/flats is really six sharps or six flats. Think of F as &amp;quot;E-sharp&amp;quot; or B as &amp;quot;C-flat&amp;quot; depending on the key: If you&amp;rsquo;re in the key of F#-major then F is &amp;quot;E-sharp&amp;quot; but if you&amp;rsquo;re in the key of Gb-major then B is &amp;quot;C-flat&amp;quot;. It&amp;rsquo;s sleight of hand really: They really are just different ways of thinking about the same thing, but apparently it&amp;rsquo;s musically pure to think about it this way. (There&amp;rsquo;s some similar musical purity where the major scales with five sharps and flats [B-major and C#/Db-major] do double-duty as major scales with seven sharps or seven flats, but I&amp;rsquo;ll leave it as an exercise for the reader to figure that out.)&lt;/p&gt; 
&lt;p&gt;So what did I learn from all this? Well, for one thing I learned how to read sheet music since now I know what it means for a key signature to have (for example) two sharps or four flats. I also learned to look at the fret board on my guitar completely differently than how I did before: I care now much more deeply for the &amp;quot;natural&amp;quot; tones A, B, C, et al. and respect the special place that their sharp and flat accents can have depending on the key. And I learned how to play in any key, at least in theory (certainly not yet in practice). That&amp;rsquo;s a lot to learn from just a couple handfuls of values, some cell references and simple formulas, sorting, and a little AutoFill magic from Excel.&lt;/p&gt;</description>
<lastBuildDate>Mon, 15 Dec 2008 21:12:01 GMT</lastBuildDate>
<generator>Web Crossing(r) Unix-v6.4 built Jan 14 2010 18:50:13 (source:1372 2010-01-14 15:39:31 -0800)/Unix-6.4 (http://webcrossing.com/)</generator>
<docs>http://backend.userland.com/rss</docs>
</channel>
</rss>
