Saturday, March 21, 2015

Music Theory for Conworlders: Mavila

So, I've discussed a fair bit about scales that are rather closely related to twelve-tone equal temperament. I've explained informally how we can, by detuning the fifth, make four fifths equal a major third. I might have implied that we can find other near-identities and 'temper' out the difference - i.e. we're kind of doing that with (5/4)^3 = 2, in a sense, in 12-tone equal temperament. In that case, we only temper 5/4 by raising it a bit, and we keep 2 intact. We could raise 5/4 less and alter our octave or something, but let's not go there quite yet.

Could we, perchance, temper out a bigger difference? Yes, we could!

If we were to decrease the size of the fifth, so that the following holds:
Four fifths give a third
Two thirds give a fifth
 then it seems clear we've created a third that is midway between major and minor - the upper and lower half of the chord are of equal size. In fact, there's but one scale where the above solution exists (while maintaining octaves): eight fifths obviously must equal a fifth then, which tells us that it is seven-tone equal temperament we are dealing with. Seven-tone equal temperament tempers out the difference between major and minor thirds (or between minor and major seconds). The fifth is fairly low (about 685 cents). Thus, the scale we've obtained is EEEEEEE (for 'equal' or 'element'), instead of LLsLLLs. It is attested in human cultures - the piphat and pinpeat styles of Thailand and Cambodia use it. However, this does not make it an end point! We can go further!
For comparison, though, here's our familiar composition, now in 7 tone equal temperament on percussive-melodic instruments.  
Let's pick a generator that is fairly easy to deal with, but is lower than 685 - so say 675. This gives us a series of [0, 675, 150, 825, 300, 975, 450]. As we did with the regular meantone structure, we rotate it (by subtracting 675 from each element) and we get
mavila : 0, 150, 300, 525, 675, 825, 975.
for comparison, the regular 12-et major and minor scales
major: 0, 200, 400, 500, 700, 900, 1100
minor: 0, 200, 300, 500, 700, 800, 1000
So, like major, we have equal steps from C to D', and from D' to E'. (Where ' just marks "intervals obtained by naming the tones by the same sequence of letters and adding an apostrophe to show we're not doing the major scale" ; like major we have equal steps ever from F to B; like minor, we have the a 300c third, roughly a 800 cent sixth and roughly a 1000 cent seventh. Where major has small steps, this has large steps - where major has small steps, this has large. (If we were to rotate it to the same 'starting note' as minor, we'd actually get the opposite result - large steps corresponding to small and small to large, etc - but major intervals instead of minor and vice versa)

We get a thing that sounds like this:

Clearly, there's some drastic changes in sound from the previous versions of this song we've had: major is minor, minor is major! How did that happen?

 What happens here is that L < s, so it makes sense to change our notation, s:=L', L:=s' (where ' marks 'what previously was'). We obtain ssLsssL. Bizarro-major! If we do some calculations, we find that for s = 1, L = 2, we get 9 steps in total, for s = 2, L=3 we get 16 steps in total. We can of course try other numbers - 3,5; 4,5; ... - these numbers of course giving the relationship between the sizes of the large and small steps. we'll get larger temperaments. 23 and 25 are fairly popular for this particular scale. (In fact, if you look at 16 tone equal temperament, you'll find that it has 675 cent fifths, and thus was the scale I started out with here.) Of course, we could take a major key composition in our regular temperament and remap it to minor (or vice versa), but we won't retain the distribution of step-sizes then: instead of LL giving major turning into ss giving minor, we'll have to replace some L with s, and some L will remain L for that transition to happen. This way, [L, s] := [s, L] is possible.

What's interesting with this scale is that it's actually attested in real life. Not only that, but it is attested in the music of wildly separate peoples - some Indonesian gamelan scales and some African scales. You might have noticed it did not sound all too good with the vaguely organ-like timbre I used in the sample above. So let's go and change that:

Because the chords have no sustain on the instruments used, repetition is used instead.
We have something a bit more un-western already, even if we fundamentally work with the same kind of building blocks. But let's try and see what else we can do with it:
The variations for how the chord instrument plays its chords are not particularly systematic here. The patterns only illustrate some of the endless variations that could be used.
Also, the slight 'vibrato'-like sound on the melody instrument comes from three instruments playing it - one is a bit too sharp, the other a bit too flat, and this produces 'difference waves' that give it a shimmering quality.

We're already getting somewhere a bit afield from western European music! We could finally try and change the kind of accompaniment a bit more drastically, and mostly avoid the western chord. There's options for it - we could use dyads ('two tone chords') - iirc, much Indonesian gamelan music uses dyads quite a lot, mainly focuses on those closest in size to our 'fifths' and 'sixths'. Thus, their accompaniment tends to stick to parallel simultaneous playing of those intervals. Here, I'm doing another thing instead: sequences of tones, along the lines of CDECDECDE or GAFGAFGAF or GFEGFEGFE or things like that. I vary the patterns a bit:


Any composition in meantone[5] (i.e. our pentatonic scale) or meantone[7] (i.e. our major and minor scales, and their modes) can be translated to mavila while retaining a lot of the structural properties: large steps will turn to small steps, small steps to large; this means the same applies to combinations of steps - minor thirds turn major, major thirds turn minor. Perfect intervals will keep being perfect, but augmented intervals now are diminished instead, and vice versa. Major sixths turn into minor sixths, same goes for sevenths. Thus, a composition in our western scales has a shadow composition in mavila, where major is minor, minor is major, augmented is dim, and so on. Every mavila composition has a shadow composition in western scales where the same relations apply!

As an illustration of this, I recommend Mike Battaglia's Mavila Experiments, where a variety of pieces from the western classical canon are given a mavila treatment.

We even can take and expand this to include our harmonic and melodic minors - the scales we get by replacing one or two of the minor triads in a minor scale with major triads - instead of these two:
melodic minor ascending: 
major: F A C
minor:         C Eb G
major:                   G B D
or harmonic minor:
minor: F Ab C
minor:           C Eb G
major:                     G B D
(so C DEb F G A Bc, and C DEb F GAb  Bc)
we now get melodic major ascending:

minor: F Ab C
major:           C E G
minor:                   G Bb D
or harmonic major:
major: F A C
major:         C E G
minor:                 G Bb D       
 (CDEb FGAb Bb C, CDEb FG ABb C)
Of course these scales are also possible in twelve-tone equal temperament, but they are, somehow, less off in mavila than they are in meantone:y systems (12, 19, 31, ...), and for some reason, melodic and harmonic minor seem more off in mavila than they do in meantone. I will probably go and get into these once I get around to talking a bit more about melodic and harmonic minor and what kind of relation they have to the MOS structure.

Thursday, March 19, 2015

Music Theory for Conworlders: Investigating that Just-Intonation Scale a bit more Thoroughly

Investigating the scales we obtain may yield interesting finds, and I will provide you with some examples of that:
8/8 9/8 10/8 4/3 12/8 5/3 15/8 2/1 (9/4 10/4 8/3 12/4 10/3 15/4 4/1)
We recall we have three chords in there: one that western music calls the 'tonic' [8/8, 10/8, 12/8], we have the subdominant [4/3, 5/3, 6/3] and the dominant [12/8, 15/8, 18/8]. However, we may have other chords present here! So let us have a look.

We have earlier noticed that a minor chord is a major chord with its 'inner intervals' switching place. Since 12/8 is to 10/8 what 6/5 is to 6/6, and since we have a 4:5:6 structure running in parallel, we should be able to build a minor chord there:
4 : 5 : 6
          4 : 5 : 6
(Each member of the upper line has a 6/4-relation to a member in the lower line)
 C E G
        G B D
{E,G,B} - 10/8, 12/8, 15/8; we divide each by 10/8, and obtain 10/10, 12/10, 15/10, which we've previously established is a minor chord. The same thing can be done one more time, in fact!
F A C
       C E G
               G B D
{A,C,E} gives us the very same structure! If you happen to know your chords and scales, you might wonder why I haven't mentioned D minor yet - and that's because D minor is somewhat exceptional. Canonically, D minor consists of D, F and A.
D to F gives us (4/3) / (9/8) = (4*8) / (3*9) = 32/27; 32/27 just cannot be rewritten as 6/5. Further, A is D's fifth, and we can also see a similar problem there: (5/3) / (9/8) = 40/27. That is about a tenth of a tone flat of a regular fifth, and thus it's a wolf. 'Correcting' A by 20 cents would make [FAC] somewhat odd, with a near neutral third.

We can look at one final thing, the chord starting at B; [BD] is obviously 6/5 (because [GBD] is 4:5:6). [DF] we have already had a look at and found wanting, er found to be 32/27. 32/27 is very close to the equal tempered minor third we often use, so it's not all that impossibly bad, and the way the chord we'd build on top of B normally is used anyway is expected to sound dissonant - it's basically that horror-movie sonority.

If we used 6/6: 6/5 : 6/4 as our building block, obtaining
F Ab C
          C Eb G
                    G Bb D
A similar problem would occur for our Bb major chord; we would have good Ab major and Eb major. If we build scales in this manner, we cannot have three perfect major and three perfect minor chords in the same scale.

How could we make the scale more 'general'? One way, of course, is equal temperaments. Another is extended just intonation - which simply means we keep adding notes so that we have notes for each chord we might want to use. Illustrating the notes of such a scale can easily be done by various geometrical means, consider for instance upwards = 3, downwards = 1/3; leftwards = 1/5, rightwards = 5
... A (27/16)
... Bb 9/5 D (9/8) F# (45/32) A# (225/128) ...
Eb (6/5) G (3/2) B (15/8)  D# (75/64) F## (375/256) A## (...)
Bbbb Dbb (128/125) Fb (32/25) Ab (8/5) C (1/1) E (5/4) G# (25/16) B# (125/64) D## (625/512)
C# 16/15 F (4/3) A (5/3) ...
... Bb (16/9) ...
Eb ...
... Ab

A type of chord, a melody or a type of scale would all have a 'shape' in this system, and moving the shape around would transpose it - thus marking all tones currently slightly to the left and up from the currently bolded ones would give Eb minor. Notice, however, that we have two A of rather similar pitch, but with dissimilar function - one the fifth of D, the other the third of F.

For, say, small percussive instruments that are struck, a layout along a matrix like this makes sense. Keyboard layouts along these lines have been successfully tested, and in some sense, the layout on some accordeons is a tempered version of the same idea, although with other intervals as dimensions.

Friday, March 13, 2015

Tuning Theory for Conworlders: Meantone Temperament and MOSes

We previously noted that (3/2)4 ≃ 80/16 (a.k.a. 5/1, a.k.a. 5). Written in mixed form, it is 5 + 81/80. A solution we can do to remove this difference is to remove some amount r from 81/16: (81-r)/16. This means ((3-r¼)/2)4 = (81-r)/16. By adjusting the size of r, we can now decide how in tune 5/4 is, and consequently, how in tune 3/2 is. Since 5/4 is a compound interval from several 3/2s, adjusting our 3/2 slightly produces a bigger difference on 5/4.

We can also notice that (3/2)2 = 9/4, and due to octave equivalence (3/2)2 = 9/8. Secondarily, we notice that (5/4) / (9/8) = 10/9. 9/8 and 10/9 are fairly similar. We could similarly do a thing whereby we represent the two of them by the same interval, and this interval is some form of weighted average between the two of them. Thus, we have an 'average' tone between the two tones that add up to (something along the lines of) 5/4!

We can go on and notice that (5/4)3 is (125/64), which is not particularly far off from 128/64 = 2. So, we can represent our 5/4 by something that is really (5+s)/4, where s = (128/125)1/3. Since each third is a stack of four fifths, we then will need four fifths per such third, and end up with 12 fifths.

We could, however, do other things as well. We may notice, for instance, that 125/64 is a bit flat of an octave - about 0.4 semitones, and that (5/4)2 = 25/16, 25/16 > 3/2 by a slight bit (about 0.7 semitones). 7.7 + 11.6 = 19.3. If we were to lower 5/4 a bit more - which we obtain by lowering 3/2 just a slight bit, we could potentially get this snake to bite its own tail.

25/16 is obviously two thirds, four fifths each. 125/64 is three thirds, four fifths each. And we've planned that combining these we'd obtain a fifth - thus 2*4 + 3*4 = 1 → a stack of 20 fifths gives us a fifth. Thus the nineteenth fifth has to be wrap back on an octave! It turns out that 19-tone equal temperament has a rather low major third (1200/19 ≃ 63, 6*63 = 378), although it is closer to the just intonation ideal than 12-tone equal temperament achieves. It has way worse fifths, however.

The result we see above is a rather fascinating thing - it means if you were to do something along the lines of C → E → G# → C → E → G#, and you stuck to major thirds, you'd end up rather doing C → E  → G#  → Cb → Eb → G instead - in both cases stacking what sounds like and functions as the very same interval, viz. the major third, 5/4.

We can now introduce a concept that has been sort of kicking around in the background for a while - Moments of Symmetry. Although not all scales that occur in human cultures are moments of symmetry, they are surprisingly common.

Remember how I have used strings of L and s to describe scale structures? A Moment of Symmetry (from now on MOS) can be described using only two letters - if you need mid-sized or supersized or subsized intervals, it's not a MOS. However, there is a second requirement: if we were to look at the distances from any tone to the tone after the next tone after it, we would also only find two sizes for that interval. Similarly, we would always find that any interval - except the period (which for us mostly will be the octave), will come in two sizes.

This does happen for 19tet with regards to our regular major scale:
C c#  db D d#  eb E e#/fb F f# gb G g#  ab A a#  bb B b#/cb C
Finding that the bold letters in fact form a MOS is left to the reader [small appendix at the end, though, explaining in detail]. In 19-edo, there is a reason why c| < dd (etc), but this rule does not apply to all temperaments. (Hint: it's basically because meantone is the naming-scheme that we use: as you ascend the circle of fifths, you add #s, as you descend it, you add bs. There are circumstances where c# > db, and there may be circumstances where it's not even consistent.) Tasks for diligent students:

  1. What tones are in D major in 19-tet? 
  2. Does C D E G A - the major pentatonic - have the MOS property in 12tet? Does it have it in 19tet?
  3. Can you find a six-tone scale in 12-tet that has the MOS property?
  4. Instead of using the C-G interval to build your scale, consider using the CE or CEš„³ intervals. (So, e.g. CEGš„²B...) Can you find scales that have the MOS property? Can you find such for any other interval? (Notice how I've already laid out the start for one such series above, viz.  
       C → E  → G# → Cb → Eb → G. Is that a MOS? If you need to, how many notes do you need to add to turn C Eb E G Gcbc into a MOS?)
There is one obvious set of MOSes in any temperament: those generated by any length of single steps are always MOSes: C C# D D# E [gap ] c, C C# D D# E F [gap] c.

However, in 19edo, we also get rather many examples of LLL...s and sss...L, i.e. one single type of step that goes almost all the way to the octave, and then a single step of another kind wrapping it up at the end. I mark L by an underline, and s by absence of space at all in the following:
ssssL = CDEF#A#_C,
LLLLLs = C_D_E_F#_A#_B#C
ssssssssL = CDbD#EFGbG#ABb_ C
LLLLLLs = C_Db_D#_E_F_Gb_G#_A_Bb_CbC
The Pythagorean chromatic scale also has this property - which has the interesting property of making some of the major and minor scales available in it lack this property. However, using a MOS that divides the octave into a large number of steps (something like ten or greater) and pretending it is an equal temperament - especially when the difference is subtle - and embedding a MOS in it -- seems to enable some pretty neat effects.

Turns out some Japanese scales actually is the pentatonic MOS (small-small-large-small-large) embedded in a seven-tone MOS (large-large-small-large-large-large-small). Thus wherever in the seven-tone MOS you start, you include the next tone if the five-MOS interval is small, and you skip it if it's large. So you get a large number of scales derived from what essentially is very similar to our major and minor scales by pretending it's an equal temperament and picking subsets out of it.

APPENDIX: Is the major scale a 19-TET MOS? (Note: non-member notes are written out to show how the member notes, in bold large fonts, relate to the temperament)
C c#  db D d#  eb E e#/fb F f# gb G g#  ab A a#  bb B b#/cb C
We notice there are two sizes of second:
C c#  db DD d#  eb EF f# gb GG g#  ab AA a#  bb Bvs.
B b#/cb CE e#/fb F
 A size of a second clearly is either 'two intervening elements (e.g. c# db)', or 'one intervening element' (e.g. b#/cb). Since sevenths are inverses of seconds, the same will apply.

As for fifths, due to the way this thing was generated F → C → G → D → A → E → B, they all come in one size except the one counting from B, which is slightly smaller. The same applies, inversely, for fourths. (There, F will be the end of the line, and the distance from it to B is sharpened.)

We have the thirds and sixths left, then. We could count them individually - and find that some come with something along the lines of [c# db D d# eb] intervening, some come with something slightly smaller - [d# eb E e#], i.e. 5 vs 4.

We could do another trick here: since sixths are fifths + seconds, and all but one fifth are of uniform size, we can tell that all the regular fifths produce sixths of two sizes - due to there only being seconds of two sizes. In that case, we only need to look at the exceptional fifth - B→F, and we find that there are [b# C c# db D d# eb E e#] intervening. This is one less than the regular fifth. To get the sixth, we add [F f# gb], which gives us the same length as e.g. A→F (basically, all we have to do at that point is notice that regular fifth + small second = small fifth + large second, and that the small fifth is surrounded by large seconds, making it impossible to generate an exceptional sixth using it.

APPENDIX: Another MOS, now in 11-edo
Consider [0,2,3,5,6,8,9,(11)]
K k# L M m# N O o# P Q q# K
1) Identify the generator
2) Show that this is a MOS.

Yet another MOS, that should be trivial to show is a MOS:
K k# L l# M m# N O o# P p# K
1) Identify the generator
2) Show that this is a MOS

Notice that in both these scales, note names have now been given so that each member has a name that lacks accidentals, and the complement - the 11 tet note names missing in the MOS itself are given accidentals. With regards to the second MOS, it's been rotated a little bit - this is not a scale you will obtain by just stacking the generator - you have to move some intervals from one end of the line to the other to obtain it.

Is this a MOS?
C C# D D# E f F# G G# A bb B C
How about this:
C C# D D# E F F# G G# A bb B C 

Tuesday, March 10, 2015

Music Theory for Conworlders: The Pythagorean Scale

[mylisten.com is having problems, so the stuff I was going to upload today still sits on my harddrive]

We have seen a few ways of constructing scales this far, and we'll now look at a rather specific example. It goes back to antiquity, and was quite predominant in European ecclesiastical music in medieval times, and also in late medieval and early renaissance art music. (I am not too sure on the exact times with regards to art music - we don't really have any art music separate from ecclesiastical ditto until late medieval times.) Other scales were in use in antiquity, and probably in medieval times as well, but the pythagorean scale has a certain reputation.

First of all, the perfect untempered fifth is, on most instruments with natural overtone series, the easiest interval to tune, except for the octave. Thus repeatedly tuning strings by jumping by fifths (C-G-D-A-E-...) will introduce little error, compared to what tuning by some less easily tuned interval will do. Tuning repeatedly by fifths therefore seems a rather natural approach. You can be pretty sure you've heard perfect untempered fifths at some rock concert, since several rock guitarists actually tune the E-A-D strings to a perfect untempered fifth + octave.

It is closely related, conceptually, to the modern western tuning as well, and is an important step in the historical development that lead up to the modern temperament. For a more mathematical look at the idea of repeatedly tuning by fifths, consider a 'period', a distance that basically is the 'space' within which we build our scale. We go with the octave for now, so either 2/1 or 1200 cents. Since we use fifths, we have the ratio 3/2, or 701.955000865 cents. We then build an octave-reduced stack of these. This can be done in two ways, giving the same result:
(3/2)0, 3/2,  (3/2)/ 2, (3/2)/ 2, (3/2)/ 4 ...
or
0,  701.96..., 701.96... * 2 mod 1200, 701.96... * 3 mod 1200,  701.96... * 4 mod 1200, ...
We repeat this for a while, and once we hit ^6 or *6, we reach a point where our scale looks like this:
8/8,  9/8, 81/64, 729/512, 3/2, 27/16, 243/128, 2/1
However, traditionally we divide each by 3/2, thus in effect rotating the cycle so what formerly was 3/2 now is 1/1. We have
8/8,  9/8, 81/64, 4/3, 3/2, 27/16, 243/128, 2/1
This is not particularly far off from our previous scale - the one built from stacking 4:5:6 in a similar fashion
8/8, 9/8, 80/64, 4/3, 3/2, 25/15, 240/128
our previous just intonation scale, rotated by dividing by 3/2, analogously to how our current scale's been rotated
We can see we hit pretty close -  81/64 and 80/64 differ by the syntonic comma 81/80 (about 21 cents or so), 9/8, 4/3, 3/2 are exactly the same, 240/128 and 243/128 differ by 243/240 = 81/80 too. 25/15 and 27/16 are a bit more cumbersome to work with, but differ by a comparable amount. It sounds fairly similar to the just intonation scale previously introduced, as well as to the twelve-tone equal temperament. Personally, I find the chords a bit more restless than just intonation, but the restlessness can give an appealing shimmer to the sound of it - depends a bit on the instrument used to play the song.
The familiar song, now in pythagorean intonation
So, our 4:5:6 ( = 64:80:96) chords are now instead represented by 64:81:96. A slight mistuning, but not all that terrible - a tenth of a wholetone.

This scale is the 'canonical' pythagorean scale. It has a structure of LLsLLLs (or in the form we first obtain, LLLsLLs). Most rotations of it - LsLLLsL, LLsLLsL - were in use as tonalities in their own right in medieval times. (With the exception of sLLsLLL, which very few compositions exist in, even today.) To 'rotate' a scale given in the L,s-notation, just take a symbol from either end and move it to the other end - repeat until the rotation you want is obtained.

There is a problem, however - a chain of 3/2s never, ever, will reach an octave of its starting point. We can easily prove it along these lines (only a sketch of the proof is given):
The last digit of successive powers of 2 form a repeating series of 2, 4, 8, 6, 2 ... and only the last digit affects the last digit of the next member in the series.
The last digit of successive powers of 3 form a repeating series of 3, 9, 7, 1, 3 ... and thus never form even numbers.
Thus 3^n/2^m never will equal 2^p, for integers n,m,p > 0.
Thus, by continuing up the series we get an infinite number of tones. However, we can decide to just terminate it at some point - such as building the scale above and being content at that point. Some cultures have used the same method and been content two steps earlier - 1/1 9/8 81/64 3/2 27/16 2/1 forms a very nice pentatonic scale, as does the rotation corresponding to the minor pentatonic 1/1 32/27 4/3 3/2 16/9.

The musicians of several cultures that used this scale went to 12 steps, because they found that the twelfth iteration is fairly close to an octave of the starting point. (About an eight of a wholetone off.) (3/2)12 ≃ 27. Thus, the eleven first fifths were perfectly in tune, but the twelfth got reduced by the amount of the error. Using the twelfth fifth was therefore avoided, and keys that included it were not used all that much. Of course, that particular fifth could be avoided or used sparingly in compositions in keys that contained it.

The scale that is obtained thus is fairly evenly spaced - should be something like, given in cents ~ 113, 91, 113, 91, 113, 91, 91, 113, 91, 113, 91, 91 if I count correctly - LsLsLssLsLss. L is the large Pythagorean semitone of 2187/2048 , s the small Pythagorean semitone of 256/243. This means different keys will sound slightly differently when playing the same composition in them - let's introduce a meta-notation: L, s. These are the steps of a scale that is a subset of the above cromatic scale. Now, some L will consist of Ls, some will consist of ss. Some s will consist of L, some of s.
Thus, when we make a scale that is LLsLLLs, the first rotation gives [Ls, Ls, L, ss, Ls, Ls, s]; if we start from the second note and build the same scale, we get [Ls, Ls, s, Ls, Ls, ss, L]. From the third tone, we get [Ls, Ls, s, Ls, Ls, Ls, s], etc. This will lend the scale some variation, of course - each key will now have a slightly unique sound with regards to some interval. However, providing examples of this requires some work. I will probably do it some weekend.

Both of the facts given above kind of might give a musician reason to think that hey, why not take the average of seven 91-cent steps and five 113 cent steps or alternatively 'hey, why not average out the error of the last fifth on all twelve of them - not a single one would be all that badly damaged, and the bad one would be greatly improved'. (Other solutions could also have occurred to him if he used some form of extended pythagorean, where the gamut goes past 12 fifths.)

 [Historically, we actually have some reason to think Pythagoras may have used a period of 4/3 instead of the octave, but for some mathematical reasons, the scale you get by adding two fifths into the frame of a fourth gives [9/8, 81/64, 4/3]. This was then placed on top of 3/2 as well, giving the exact same scale as the stacking method (after rotating it back one step).]

Now, what could a culture have done differently? It could possibly use a different interval, say 5/4, to generate its tuning - a thing even late renaissance and early baroque European music did! It could go further than twelve iterations to find a tuning with smaller granularity. It could use this method over part of its gamut, and some other method elsewhere. It could potentially use a different period.

We will look at using multiple generators next, after which we'll start looking at tempering things.

Monday, March 9, 2015

Music Theory for Conworlders: Chords as Building Blocks for Scales, Temperaments pt 1

So, we recently saw how a major chord is built, and looked at some other chords as well. Let us build a scale from these chords!

We could stack them in some way - i.e. we build a chord, let's call it M. We index its notes M1, M2, M3. Once we reach M3, we also call that note N1, and build a new chord N1, N2, N3. So, using the major chord outlined earlier and arbitrary 1/1, we have 4/4, 5/4, 6/4. We stack a new similar series on top of 6/4, giving us 6/4, 15/8, 9/4. If we assume we have octave equivalence, we can replace 9/4 by 9/8, getting us this scale: 4/4 9/8 5/4 3/2 15/8. We now repeat this one last time on top of 9/8 - getting us 45/32 and 27/16. So, our full set now is
FGABCDE
8/89/8 10/8 45/32 12/8 27/1615/8
If we were to further remap the composition to this set (so that the starting tone is remapped to C, rather than F, instead of the previously used approaches), we get this result:

If we further approach it, mostly without any clearly thought-out approach, but adding backing chords basically by picking a chord for which the melody over some span shares a significant number of notes with that chord, we get this, which already has turned our rather weird overtone thing into a rather pleasant, albeit not very complicated thing:
The distribution of step-sizes here is:
FG
ABCDE
9/810/99/816/159/810/916/15
204c182c204c111c204c182c111c
[Note: I've rounded the cents values to integers.]
The underlined ones form the first triplet, the italic ones form the second triplet, the bolded ones form the third triplet. Notice that there are tones that belong to two triplets. If we instead of stacking twice, instead had stacked 'downwards' as well as 'upwards', we'd have in front of us the major scale. Now we have a rotation of the major scale instead. (By 'stacking downwards', I mean building a triplet L1,L2,L3 such that its L3 = M1, where M1 is our starting point; had we started at M1, built M1,2,3, L1,2,3 and N1,2,3, we'd have the regular major scale.) We're currently looking at the same thing, but starting at the wrong tone in it - the thing in front of us right now is called a lydian scale. This is why I opted to call the first tone F instead of C. We could go about similarly with the minor chords as well, and build the natural minor scale by stacking [6/6,6/5,6/4] the same way. If we replace the last of them with a major triad, we get the harmonic minor, and if we replace the triad we build 'downwards' with a major triad, we get melodic minor ascending.

We could of course go and add 7/4 to the major triad too - so we would have chords of 4/4 - 5/4 - 6/4 - 7/4, but stack them at 6/4. (or at 7/4 if we'd like, but I'm not going to do that right now)








1/19/8     7/65/421/16
45/32

6/427/16 7/415/8


204c 266c 386c470cc586c
702c906c  966c 1090c

This scale would be a bit of a curiosity, although who knows, it might be possible to compose nice music it in. Here's a really shoddy attempt:

We are not restricted to 4:5:6(:7:...) either. We could pick, say, 3:4:5, 5:6:7 or 6:7:8 or something that has a different number of notes, or gaps in it. 4:5:7 gives an interesting scale - one that obviously is a subset of the one given above. Nothing stops us at two iterations either - but we probably want a manageable number of notes. And of course, we can alternate what kinds of sets we stack on top of something, just to see what happens.

We'll go back to the one presented above that just had seven distinct notes. We might notice that there's basically three sizes of steps in it - and that two of these sizes are fairly close together, whereas the third is a bit further off. Could we perhaps utilize that somehow? Actually, one thing we could do is call the 204 cent intervals 'L', the 182 cent intervals 'M' (for middle), and the 111c intervals 's', for small. This, in fact, is a useful notation: when we describe a scales shape, we sometimes actually benefit from ignoring the exact sizes we have to deal with, and instead just consider the scale as having the form LMsLMLs. We will later on encounter scales (and parts of scales) that are only described as strings of L:s, M:s, s:s, and possibly other letters, and possibly only a framing interval given explicitly or even implicitly.

For now, our framing interval is the octave. Our plan is to 'equalize' the intervals in some sense, to drop some of the exact tuning in favour of the convenience of a more 'simple' system.
We then have the following thing to solve: 3L + 2M + 2s = 1200 (since there's three L, two M, and two s in the scale). This can be solved in several ways; we can go to extremes, and conflate them all, L=M=s, in which case we get L=M=s=171 cents. It is useful, however, if M,L and s all are multiples of some shared unit - so e.g.

3L + 2M + 2s = 1200 cents | our basic setup
 L = M | we decide to conflate 'large' and 'middle' steps→ 5M + 2s = 1200 cents
 M = 2s | we decide we want the small steps to be half of the large steps → 12s = 1200
→ M = 200 cents, s = 100 cents
We now end up with
Overtune, now in 12-tone equal temperament.
Another thing we could do is:
3L + 2M + 2s = 1200 cents | ...
L = M | we decide to conflate large and middle againM = 3/2s | we decide we want the large only to exceed the small by half the size of the small→ u = 1/2 s (u for 'unit') | we decide to introduce the 'unit' that corresponds to the smallest necessary division for this to work out→ 5M + 2s = 1200 c
→ 5*(3/2)s + 4s = 1200 c
→ 15u + 4u = 1200 c
→ u = 1200c/19
This would give us a tuning that sounds like this:
That same tune in 19 tones to the octave.
The first example is one way of ending up at modern equal temperament. However, the same mathematical approach coupled with some different decisions will give other nice temperaments that have many similar properties - but may have other, dissimilar properties as well. The second example gave 19-tone equal temperament, a temperament which very well could be a dead-ringer for 12-tone equal temperament, especially with regards to most of the repertoire that doesn't modulate wildly. Why this is the case, we will look at a bit later when we get into meantone. (There are more in tune meantones than 19, but 19 is conveniently small - basically, 12, 19 and 31 are pretty good meantones - but 31 is rather big).

We will look how this same method can be used to find other temperaments with similar properties - or temperaments that give us 'twisted' tunings - tunings where things from 12-tone equal temperament get turned on their heads. (One hint, though: imagine what happens if we substitutes M→s, s→M, and solved for that? 5s + 2M, distributed as ssMsssM actually produces a weird yet attested in real life cultures scale. The same type of inversion can be done for any scale!)

We'll also see how this can be used more generally to consider the results of other building blocks than 4:5:6. But before that, we'll go and look at Pythagorean tuning, the Meantone tuning it gave way to, and our modern very moderate meantone tuning, viz. 12-tone equal temperament. We'll see a few other approaches that we may take to reach 12-tone equal temperament as well (but also other points to which those approaches could have taken us).

Sunday, March 8, 2015

Music Theory for Conworlders: Chords

In most European/Western music since some point in the baroque onwards, chords have been a rather central concept. The chords provide a background harmony, which it is easy to write melodies over. Chord progressions provides the song with a sense of things advancing, and chord-based approaches make it easy to change a key by a variety of methods.

Chords are compound tones - they are several tones played at once. Depending on your experience with music, you may know that, i.e. C#major is C#,F,G#, and that Fmajor is F,A,C. Now, some hobbyists may be under the impression that chords are labels for essentially arbitrary groups of tones, but they are in fact a systematic terminology for groups of tones that have certain relations.

The most basic chord in western music is the major chord. Each tone in the 12-tone temperament can be root for one. The major chord has a rather interesting structure - in just-intonation (where intervals are basically tuned like intervals between members of the overtones series), the major chord would be 4:5:6. That is, [4/4, 5/4, 6/4] times a shared fundamental frequency. If we were to pick A=440hz as our starting point, we get [440hz, 550hz, 660hz]. A similar structure is present at [3/3, 4/3, 5/3], which gives [330hz, 440hz, 550hz]. We notice that 330hz is an octave below 660hz, so we can consider them the same structure. [5/5,6/5,8/5] too gives a similar structure with two of its members offset by an octave. Structures where a member is offset by an octave are referred to as 'inversions' of the same chord, as the same equivalence classes of tones are present (i.e. the classes C,E,G are present regardless if it's or C3, E3, Gor E3, G3, C4.) Some experiments indicate that musicians hear inversions as the same chords, whereas people who don't play instruments tend to hear them as distinct chords. This may be worth being aware of when considering the music of your culture - apparently, it's a thing western musicians learn to hear them as, and thus it is entirely conceivable that some culture would have musicians that maintain the distinction.

We could write a song where we just stick to one chord throughout it, and the melody is the main source of motion, tension and interest. Such songs exist. However, it is more usual once we start using chords to create motion, tension and interest by changing the chords - and letting the melody create further motion, tension and interest against the backdrop of the chords.

So, we may want to build new similar structures from other tones in the scale, say we pick the topmost member of our first chord as the root of the new one; we could also pick the bottom-most member of it as the topmost member of a later one, obtaining:
440*(6/4) * [4/4, 5/4, 6/4] = 660, 825, 990
440*(4/6) * [4/4, 5/4, 6/4] = 293,333..., 366,666..., 440
gives us all of these, when reduced to the same octave: 440, 495, 550, 586,666..., 660, 733,333..., 825, 880
The same procedure can be applied to any frequency to obtain the frequencies of the major chord rooted on that frequency. For reasons I will get into soon, having chords tuned exactly to these ratios causes certain problems, and this is solved by only approximating them - this benefits from our hearing not being all that exact.

Now, I mentioned earlier that multiplication is to a number what addition is to its logarithm. So, if we take logarithms of [4/4, 5/4, 6/4], we can now add things instead, by using cents:
[0, 386, 702] + [702, 702, 702] : same thing as multiplying [4/4, 5/4, 6/4] each by 6/4.
[0, 386, 702] - [702, 702, 702] : ... dividing by 6/4
Although hertz numbers are easy to understand, they're less general than cents are. Cents are easier to work with than ratios though, because a) it's easier to compare sizes - which one's bigger out of 19/16 and 6/5? How about 298c and 316c? - b) it's easier to add than to multiply. Octave reduction is done by subtracting or adding 1200 (repeatedly, if so needed), c) since the cents-value basically is based off the twelve-tone tuning of western music anyway, an interval measured in cents tells us something about what familiar musical intervals it is close to - i.e. 25/16 and 8/5 might not spontaneously tell us much - but 772c and 813c tell us they're both in the vicinity of 800c, so fairly close to the interval you get by stacking eight minor seconds - C to Ab, D to Bb, etc.

Chords need not be 4:5:6, though - we have minor, diminished, extended chords and sus chords in western music, and there are other possibilities as well.

Minor turns the order of the intervals upside down: from [4/4, 5/4, 6/4] we go to [6/6, 6/5, 6/4].
 ((6/4) / (5/4) = 6/5). The minor chord famously is 'sadder' than the major chord, and is the other main staple of chords. If you use some specific type of triad, you should probably try and see if its ~inverse sounds appealing to you as well. For [3/3, 5/3, 7/3] this would mean [7/7, 7/5, 7/3]. They can be recalculated to have a uniform denominator, i.e. [6/6, 6/5, 6/4] can be rendered as [10/10, 12/10, 15/10,] and [7/7, 7/5, 7/3] as [15/15, 21/15, 35/15].


Sus2 are [8/8, 9/8, 12/8], sus4 are [6/6. 8/6. 9/6] (or in the other notation 8:9:12, 6:8:9). Diminished and augmented chords are slightly less clearly any one thing and can stand for several possible interpretations. The diminished chord can easily be seen as [5/5, 6/5, 7/5] or [7/7, 7/6, 7/5] or [6/6, 6/5, 36/25]. A different musical tradition may have a more specific idea of what a dim chord is, or even have several different dim chords.

Extended chords sometimes are understood as going further up the overtone series, so a seventh-chord adds one tone higher (depending on type, you usually get something close to [8/8, 10/8, 12/8, 16/9], [8/8, 10/8, 12/8, 15/8] or [4/4, 5/4, 6/4, 7/4]. The first is roughly or dom7 chord, the second the maj7 chord, and the third is common as dom7 in Barbershop and some blues. Again, by sheer luck, 9-chords too generally add a 9-like number: [4/4, 5/4,6/4,(whichever seventh the chord name specifies),9/4] (although b9 may add things like 17/8 or 32/15, #9 may add 12/5 or 19/8 or somesuch, and so on).

Chords with the extensions 11 and 13 are further off from the corresponding overtone when played in equal temperament, however. Using extended chords as "proper" chords has some roots in Baroque times (where some 9-chords were definitely used in a chordlike manner, e.g. dom7b9, which for E would spell out E-G#-B-d-f, a strong dissonance that goes well in minor keys, so e.g. Edom7b9 would appear in A minor compositions, Cdom7b9 in F minor, etc. In the 19th century, especially major seventh chords became increasingly considered consonances, and in the twentieth century especially jazz has made some quite wild chords acceptable as 'chords proper'.

Other series could well be used - Bohlen-Pierce-scale composers draw a lot of mileage out of 3:5:7 and 5:7:9, and some microtonal composers utilize things far up the overtone series, such as 14:17:21, 12:17:23 or things like that.

It is possible to build your chords from a subset of the scale used for melodies; the opposite is possible as well - lots of western popular music take its chords from all seven notes of the diatonic scale - or even more than that - yet restrict the melody to the pentatonic scale that is a subset of the seven notes. Some music, however, restricts its chords to a smaller set than it restricts the melodies to. So both approaches are apparently fertile ground for melodic/harmonic interaction.

Not all music classifies simultaneously played notes as any kind of chord; even in the baroque era, such a classification system was not all that widely used. Renaissance polyphony definitely does not use the same kind of chords as we do, but would have considered all three-note chords except root-fifth-octave as dissonances that should be resolved (yet did use combinations of three or more tones as a device for tension). Polyphony in general can use tone-combinations without giving names to them - there are lots of possible combinations, and naming them all may seem rather tedious and pointless.

[note: I will add some samples of chords of various kinds later]

Friday, March 6, 2015

Music Theory for Conworlders: How to Test These Scales

If you happen to play a fretless instrument such as the violin or cello, playing unfamiliar intervals is possible, but may take some practice. With woodwinds, I hear it is possible, but challenging. With brass, the overtone series comes naturally, but is of course slightly challenging once you get sufficiently high up. The slide trombone is of course a very convenient instrument insofar as that goes.

Several synths support .scl files these days. .scl files are a convenient format for storing tunings, and for using them with hardware and software that supports them. Midi keyboards can of course be retuned on the fly - try Manuel op de Coul's Scala.

For people lacking instruments, but who want to try out microtonal music, most freeware trackers permit pitch bends. The small tunes I've made here I've made using sunvox - which can do a lot more than just sound like ass the way those tunes do. Pitch bends upward have the code '11' in the effect column. However, pitch bends in sunvox require some maths - sunvox doesn't use cents, but 64th:s of semitones. Thus, the pitch bend necessary for an interval P (given as a ratio), is rendered as 768*log2P mod 64 rewritten in hexadecimal, and the number of semitones is naturally (768*log2P - (768*log2P mod 64)) / 64. I have made a gnumeric file that calculates this stuff for any equal temperament (I will explain what those are soon enough), and used this to compose, among other things, these compositions. It is basically very much a cheap hack, so no guarantees. I might improve a bit on it in the near future. In order to get overtone scales and other ratio-based tunings, you basically have to set the period to be that ratio, and the number of subdivisions to be one (well, you can set it to anything, but then only every anything:th element will correspond to that ratio or its integer powers, i.e. for 5/4 divided in three steps, you'll get 5/4, 25/16, 125/64, etc every few steps.)

The temperament names given below the pieces are in a way for future reference, as I will get into the kinds of structures I've used in these pieces and what other structures exist that can give equally weird or weirder results:

11-tone equal temperament attempt at Arabic-sounding stuff.


11-tone equal temperament attempt at I dunno, some kind of electronic thingy.

19-tone equal temperament thingy in a somewhat out-there temperament.

An octave-less thingy in "88 cent equal temperament".

A thingy in Bohlen-Pierce temperament.


A fanfare that attempts to do some weird things.