9/20
Ratios and Harmonics: Practical applications
and how to use the Bagger 288 Ratio-Reaktor patches.

The reaktor synths that I built and are avilable for use on Bagger288.com may be confusing, because where a typical synth will have a "pitch" or "tune" knob for each oscillator, my synths have fractions--or ratios. I get the impression that the people I've shared these patches with like the sound of the patches but don't really know how to use these ratios in a musical way, and so are stuck with using the presets I've defined.

   

I can understand this, because until recently this was just as mystifying for me until I spent some hours researching and thinking about it. How are tones mathematically related--what do those fractions mean--and how do you actually use them?

Electronic musicians spend endless hours programming and designing unique, specific sounds for their music. But most musicians don't spend a single moment thinking about or defining the way the pitches they use are related to each other--and often this can have a more exciting impact on the overall sound and emotional tone of a song than whatever parameters you are toying with on a synth or sampler.

Since I love this subject, and because I think more people should get interested, and use these ideas in their music, I'm going to do a crash course on harmonics and ratios for the uninitiated. I'll to split this write-up into a few sections, starting with the most simple concepts. I'm going to use layman's vocabulary where I can instead of music theory lingo, so sorry if some of this doesn't seem perfectly accurate--I'm doing that so that it is more readable.

Equal Temperament and Overtone series.

Most western music is locked into a system called "equal temperament," which has been around for about 300 or more years. All major software sequencers use equal temperament, and almost all of them have no alternative to this tuning system unless you use a third-party plugin that allows you to use a different tuning system. Equal temperament is out of tune. Even on a fresly tuned piano, when you play two notes together, unless they are exactly an octave (12 half steps) apart, they will not be in tune (and, technically speaking, on the higher notes on a piano, not even the octaves are in tune). Some notes are more detuned, some less.

Most of you are probably familiar with "cents"--each semitone (half-step, or the distance from C to C#) in an equal tempered octave is divided into 100 cents--so there are 1200 cents in an octave.

I'm also going to speak in terms of C major--the white keys on the piano, instead of using interval names--so that this is a little more accessible to people. But when I use the word "interval," I just mean a certain distance between notes--for instance, from C to G is the "interval" of a fifth, or from C to E is the "interval" of a major third.

In equal temperament the distance from C to E (a Major third) is 13.7 cents sharper than its perfectly tuned counterpart.

The distance from C to B flat (two notes below the next higher C, or a minor 7th) is 31.2 cents sharper than its perfectly tuned counterpart. The distance from C to A is also 15.6 cents sharper than its perfectly tuned counterpart.

The distance from C to G (a fifth) is the closest--it's only about 2 cents flat compared to a perfectly tuned fifth. Maybe this is part of the reason why I always found myself predominantly using this interval in my music when I was younger--if ou listen to my album "piano music" in the music section of this site, you'll hear fifths everywhere.

The Overtone Series: The Mother Ship

I keep talking about "perfectly tuned" intervals. These perfect tunings are actually derived from the "overtone series' or the "harmonic series." The harmonic series is the mothership. Or the source. The mother of all musical scales and tones.

When we think of harmony we think of scales and chords--for instance a C major chord with the notes C, E, and G in it, or a C dominant chord, with the notes C, E, G, and B flat. We think of these pitches as their own seperate entities, with their own names and locations.

Actually, sounds are comprised of many little "notes," which are called partials. And most musical sounds--like a violin tone, or a piano note, or plucked harp string--have partials that are more or less related by simple arithmetic relationships.

Sounds can be analyzed and broken down into hundreds of sine waves at different frequencies. This is just one way of thinking about sound, but it is a perfect way to do harmonic analysis. A visual example would help.


This is an analysis of a sustained organ tone. It is a frequency graph, with frequency on the Y axis, and time on the X axis. Darker shades indicate higher volume--showing that most of the energy in this sound is in the lower frequencies, but you can see there is energy at frequencies of thousands of hertz.


This is the same analysis, but zoomed in much more. I've labeled certain "partials" on the graph with their frequencies. The red line is what we call the "fundamental," which is generally the lowest, loudest partial in a tone, and it is the pitch that we perceive the tone to be at. The fundamental is at 65 hz, or c2. Above the fundamental, you can see the strongest tones are all integer multiples of the fundamental: 65 * 2, 65 * 3, and so on.


This is an analysis of a short piano tone.



Here the frequencies are labelled. The fundamental tone this time is at 65hz, but it isn't labelled. You can see here that the tones have the same relationship as in the previous example, though in the higher tones the frequencies are a little bit higher than they should be. This is because of property of strings that causes the harmonics to be slightly sharp--but, in general, the different tones again are all integer mulitples of the fundamental, 65.

All of these frequencies that are integer multiples of the fundamental tone are called 'harmonics,' or the overtone series. They're illustrated in musical notation in the image below.


Nearly all musical sounds have these harmonics. Even in sounds that have no harmonics, like pure electronically generated sine tones, the human mind will assume the sound has harmonics if the sound is played with sufficient volume.

I am mainly discussing the mathematics of these harmonics, but for a very thorough discussion of that subject, visit this site:

UNSW Music Acoustics website


This chart to the left contains the first 14 tones in the "harmonic series" of a tone having its fundamental, lowest tone at 440 hz. The beauty of the overtone series is its simplicity. Just take the fundamental frequency, multiply it by two, three, four, and so on, and you have the overtone series, and the basis for most musical sounds and scales.

We can create ratios with these frequencies. The root, of course, is 1/1. Then, the first overtone would be 2/1, the next would be 3/1, the next, 4/1, and so on. These ratios all relate to a fundamental frequency of our choosing--in this case, 440.

We can choose any frequency as the fundamental. We can choose the note C--the same note as the organ and piano tones we analyzed. If the fundamental was C3, or 130hz, then we have the overtones 260 (2/1), 520 (3/1), 1040 (4/1), 2080 (5/1), and so on.

The first overtone, 260, (2/1) would be the C one octave above the fundamental C. The second overtone (3/1) would be the G above that C. The third overtone, (4/1), would be the C two octaves above the fundamental. The fourth overtone (5/1) would be the E above that. The next overtone, the fifth, would be G again, and the sixth would be a B flat. This is illustrated in the above image.

So-- in a musical tone with the fundamental note C, we have the notes C, C, G, C, E, G, B flat in the first six overtones. In the frequencies three octaves above the fundamental of most musical tones--there are all the notes of a perfectly tuned major chord, or dominant chord!




Ratios and Scales--Manipulating Ratios

A major scale can easily be built out of the first 4 overtones in the overtone series. I'll walk you through the process. The materials we are working with--the first four overtones:

2/1 , 3/1 , 4/1 , and 5/1. Mostly, we will just use 3/1 and 5/1.

Doubling or halving a musical note just places that same note in a different octave. Accordingly, we can multiply or divide the numerator or denominator of any ratio by two. This will change the octave the note is in, but it will still be the same note.

Ok--let's build a scale.

Let's start with C. C is 1/1, and also 2/1 (the next C higher).

The next note we'll define is G. We use the second overtone to get this note--the ratio 3/1. Using 3/1 on C will give us a note in the next higher octave, so we multiply the denominator by two--to bring the note into the same octave. That gives us the ratio 3/2. This gives us the "G" that is in the same octave as C--or a perfect fifth. The way we use this 3/2 ratio is like this: if C is 130 hz, we multily it times 3/2 (or 1.5), giving us 195. That is the frequency of the note G. To take us back to C, simply divide 195 by 3/2, or 1.5

We can use this ratio of 3/2 to also define a the "D" in the major scale, or a major second. Stacking another "perfect fifth" on the G, you arrive at the D one octave higher. To mathematically "stack" two fifths, just multiply 3/2 and 3/2--giving 9/4. multiply the denominator by two, and you get 9/8, 1.125, or a major second--D.

3/2 can also give us F, or a perfect fourth. Simply subtract a fifth (the distance from C to G) from an octave, or 2/1. To "subtract" a fifth from 2/1, divide 2 by 3/2, or 1.5. This gives 1.333...    or 4/3. That is the ratio for the F above C, or a perfect fourth.

The ratio 5/1 can give us the E above C, or a major third. Simply double the denominator--giving 5/2. One more time... that gives 5/4, the ratio for E.

Now, we already have the notes C, D, E, F, and G.

To get A, we ahve to stack a 5/4 (the ratio for E) and a 4/3 (the ratio for F). 5/4 * 4/3 gives 1.66666, or 5/3 -- the ratio for A.

The last note we need to get is B--the Major seventh. To get B, we stack a 5/4 on a 3/2. Multiply 5/4 and 3/2 -- that gives us 15/8. That's the ratio for B.

Just Intonation

Now we have a complete major scale. The scale we just built is like this:

C  D  F  
1/19/85/44/33/25/315/82/1

Just now, we built a just-intonation scale, without knowing what Just Intonation was. Just intonation is a scale, that, like this, uses whole number ratios to define the notes in a chord. There are many types of just intonation, but I prefer to use simple ones, like this. You can get very complicated with Just intonation, and make very sophisticated scales that are much more out of tune than equal temperament--OR, you can make very perfectly tuned scales like this. In this scale, the notes all have the most perfectly in-tune relationship to the fundamental note, C, as possible. That is what interests me now, though I like microtuned, or detuned intonations sometimes, too.

Another form of a just-intoned scale, for instance, is pythagorean intonation. Pythagoras was a wack greek mathematician, and he built his scale only using the ratio of the distance from C to G-- 3/2, or the perfect fifth. He got the notes he wanted by stacking fifths upward or downward until he arrived at new notes. Many of these notes were a little or very out of tune.

Pythagorean intonation looks like this:

C  D  F  
1/19/881/644/33/227/16243/1282/1

These notes are all built from stacking of fifths and fourths. You can try it for yoursef--and see how I got these ratios. It's a little tricky!




Practical Applications

With some basic math and a little music theory knowledge, you can use these ratios to build your own scales and chords.

First, though, there has to be a way to implement them. Only some applications will support alternate tunings, unfortunately! I know that Logic has a built in alternate tuning options dialog. Alternate tunings can also be implemented in almost any reasonably flexible modular environment, like Reaktor, Clavia's Nord Modular, Max/Msp, or even Plogue Bidule.

Some hardware synths and software synths also support alternate tunings. I know, for instance, Native Instruments's Kontakt sampler supports alternate tunings, as does other Native Instruments software. A good soft synth that supports micro tunings is the Astralis soft synth, which was made in SynthEdit, A shareware vsti creation plugin. On OSX, there is a free AU plugin creation environment called Sonic Birth, which I think would also be capable of implementing microtuning in a synth.

As you may have noticed, using ratios, just intonation, or microtunings in music usually requires treading outside of the usual paths, and sometimes even requires a lot of work.

Sometimes you can trick software into playing microtonal music, by inputting detune values in cents in a pianoroll, for instance. A good calculator for moving back and forth between frequency ratios and cents is this Frequency Calculator

There are some applications, like the epic Scala that will help you implement different tunings in different synthesizers and software applications.

Using the Reaktor Synths.

Like I mentioned at the beginning of this tutorial, there are two synths available on my bagger 288 website that use ratios for the tuning of the different oscillators in the synth.

Tuning these synths to different harmonies can involve some mental gymnastics. A simple first setting for tuning these synths would be the overtone series. That would be as easy as setting the ratios to 1/1, 2/1, 3/1, and so on. Using a simple overtone series and changing the relative volumes already gives the potential for a lot of sounds. You can also try using all odd harmonics, like 1/1, 3/1, 5/1, 7/1, etc. All prime number harmonics? 1/1, 3/1, 5/1, 7/1, 11/1, 13/1, 17/1?

After playing with simple harmonics, you can branch out--and play with some more complicated ratios.


To be continued...