The General Keyboard aka Uniform Keyboard aka Isomorphic Keyboard aka Self Transposing System

what is it?

A piano (or other musical instrument) keyboard design is called "general(alized)" (or "uniform" or "isomorphic", or a "self transposing system"), iff the fingering does not change, when you transpose the music. That means, for example, if you play some melody in C, using some fingering, you can play the very same melody, transposed to D, by starting with a different button, but then using the very same relative movements of your fingers from and to other buttons (which is how "fingering" is defined), as you did in C.

how can that be achieved?

Except for the trivial one-dimensional case (all buttons in a row, having all the same size and the step in pitch from one button to the next always being the same), the uniformity is achieved by arranging the buttons in a two dimensional grid (or "lattice"), so that each button has two integer coordinates. Then choose two step sizes, one for an increase of the x-coordinate by 1, the other for an increase of the y-coordinate by 1. Of course the same can also be done in more than 2 dimensions.

For example (perhaps best known), in the design by Janko, those two step sizes are a whole tone and a semi tone, respectively, and the coordinate axes have a 45 degree angle (if the buttons are square; more, if they are rectangles with more height than width.) The identical system, on an accordion instead of a piano, is called Robotti-Reuther uniform keyboard accordion. Another example is the axis 64 with a fifth and a major third as step sizes, and a 60 degree angle, with hexagonal buttons.

As a little caveat, that the fingering indeed never has to change, demands that one of three things has to happen: the keyboard must be infinitely large, or mounted onto a cylinder, or you must be always lucky enough not to fall off the edge.

The Bosanquet harmonium, contrary what everybody copies from everybody else, is not a uniform keyboard - look at the picture; if you move your finger from (the center of) one button to (the center of) some neighbouring button, and then you do the same movement again, there is not necessarily a (center of a) button there, not because you fell off the edge, but because of the irregular, non uniform arrangement of the buttons. And if the buttons aren't strictly arranged in a lattice, you do not have a uniform keyboard. However, the Bosanquet harmonium did inspire Erv Wilson to come up with a multitude of designs for micro tonal uniform keyboards, such as the microzone, which is basically identical to the axis 64, except for a rotation and a different coloring scheme of the buttons.

how many different designs are there, in theory and in practice?

In theory, there are of course infinitely many; one can parametrize them with 4 (or 6) real valued parameters: the two step sizes (or acoustical parameters), and then the topological parameters, which one can choose as the angle of the coordinate axes, and the ratio of the lengths of going one step in either x or y direction; then, if you care, 2 more (much less interesting) topological parameters, pertaining to magnification and rotation, making a total of 6. If you care to have magnification and rotation included, the 4 topological parameters can also be expressed simpler, by two "unit vectors", the finger movements associated with the step sizes (acoustical parameters.) Another way to cut down the number of topological parameters to 2 is to demand that the first unit vector be (1, 0), getting rid of magnification and rotation again.
   Note that the description of a uniform keyboard by those 4 parameters is not unique; one could choose two different neighbours (or even non neighbours) to define what the unit vectors are, and one then gets 4 different parameters describing the very same thing.
   In 3 or more dimensions, one needs of course more parameters.

Although a three dimensional uniform keyboard (for a theremin-like instrument) is within the realm of the technically possible, it hasn't been built yet. But in 2D, many designs have been physically implemented, see below. Alas, all of them are either pianos, organs, or accordions; wind instruments, where the valves are opened and closed electronically, operated from a uniform keyboard as panel would be awesome; I wonder if I'm the only one who has had the idea.

what is micro tonal music?

If the octave has more than 12 steps, you have micro tonal music. If the octave is partitioned into steps of equal size, one speaks of equal temperament. Of particular interest are 19 ET, 22 ET, 31 ET, 41 ET, 53 ET, and 72 ET, because they give better approximations of some or all of the "pure" intervals (such as 3/2, 5/4, 7/4, etc.) There are a great many uniform keyboard layouts for microtonal music, for example the design by  Adriaan Fokker, where the two step sizes are 5/31 of an octave and 3/31 of an octave, respectively (those intervals are "better versions" of whole tone and semi tone, respectively). While the Janko is only suitable for 12 ET, the axis 64 is very well suited for microtonal music. Especially 19 ET and 31 ET are much better(!!!) suited for baroque music than 12 ET is, as those tunings are much closer to how instruments were tuned when that music was composed. For Indian music, 41 ET and 53 ET are better suited.

Of course, the two step sizes don't even need to be rational multiples of the octave, in which case one gets infinitely many steps per octave, if the keyboard is indeed infinitely large (to be exact, that happens iff the ratio of the step sizes is irrational). That is for example the case for "quarter-comma meantone tuning", which is very close to 31 ET, and arises from choosing the size of the fifth in such a way that 4 fifths give exactly two octaves plus a perfectly tuned major third.

youtube videos of uniform keyboards in action

Janko1 (acoustical piano)    Janko2 (Japanese keyboard)      axis 64    thummer    Roger Linn

where can I buy one?

janko1  janko2  axis 64  microzone (rather expensive)

what is a tuning matrix, and what is it good for?

Tuning matrices are the way to provide a bird's eye view onto the infinite set of all uniform keyboards, by structuring them with respect to how they are used; using the above 4 parameters (see above question "how many different designs are there"), but no tuning matrix, this set would appear to be just an unfathomable vast mess. If you know a tiny bit of linear algebra, you should be able to understand the following.

As mentioned above, if the ratio of the step sizes is irrational, one will get infinitely many pitches as the "scale" of pitches available on the keyboard. If the keyboard is two dimensional, one can prove mathematically that out of the set of prime number intervals (i.e. octave (2/1), octave + fifth (3/1), 2 octaves + major third (5/1), 2 octaves + major seventh (7/1), etc), only 2 can be perfectly tuned (more generally, as many as the keyboard has dimensions.) That implies, even with infinitely many available pitches, there will always be perfectly tuned pitches that are unavailable. In the case of a rational ratio of step sizes (essentially, the ET case), it's even worse: then only one prime number interval can be perfectly tuned, which will of course usually taken to be the octave.

For example, in quarter comma meantone tuning (the renaissance standard), octave and major third are perfectly tuned, which implies that the fifth cannot be perfectly tuned; another example is Pythagorean tuning, (the medieval standard) where octave and fifth are perfectly tuned, which implies that the thirds cannot be perfectly tuned.

Consider Pythagorean tuning for a moment; it means, the perfectly tuned octave has a vector (finger movement) belonging to it, and so does the perfectly tuned fifth. (Note that those two vectors need not point to neighbours of the button where you start.) Every interval you can play, then, is of the form k1*octave + k2*fifth, for some (positive or negative) integers k1, k2 (i.e., you go an integer amount of octaves up or down, and an integer amount of fifths up or down), and the way to play it is to move your finger by the vector k1*octaveVector + k2*fifthVector.

So far, so good; if the octaveVector and the fifthVector are decided upon, you have defined your uniform keyboard, i.e., you have said where the (centers of the) buttons are, and, for each one, which pitch it has. That, however, does not tell you, which button you should use, if you want to play, say, something resembling the major third 5/4; remember, this interval is not available; instead, infinitely many approximations of it are available. So, which one of them are you to use?

For example, you could use "four fifths up and two octaves down", i.e. k1 = -2, k2 = 4, which gives you the interval 2^k1 * (3/2)^k2 = 2^(-2) * (3/2)^4 = 81/64, also called "Pythagorean major third". The "error interval" of that approximation of the major third and the actual major third is then (81/64)/(5/4) = 81/80, which is 21.5% of a semitone, or 21.5 cent, and is called the "syntonic comma". (There are dozens of such "error intervals" that have been given names by music theorists, usually ending in "comma" (most usual), "diesis" (for the bigger errors), or "schisma" (for the smaller errors).)

In case 21.5 cents are more error than your ears are willing to bear (which is more likely than not), there are infinitely many ways of reducing the error. For example, you could use "8 fifths down and 5 octaves up", i.e. k1 = 5, k2 = -8, giving the interval 2^k1 * (3/2)^k2 = 2^5 * (3/2)^(-8) = 8192/6561, also called "Pythagorean diminished fourth"; this time, the approximation is a little too small, rather than too big, and the error interval is (5/4)/(8192/6561) = 32805/32768, which is the schisma, and has 1.9537 cents.

Both choices of where to play the major third have advantages and disadvantages; while the second choice has a much smaller error, it has the disadvantage that the button in question will be further away from where you are (larger values of k1, k2 means further away.) In the unlikely case that 1.95 cents will still offend your ears, you can always find a button that has a still better approximation, but that button will be even further away. Both above choices are optimal in the sense that there is no button that has a smaller error and is closer (more exactly, has smaller k2) in space to your current button, and there are infinitely many buttons that are optimal in that sense. [It should be clear that "where you play the major third" or "button you use for the major third" is to be understood as a shorthand for "what relative movement of your fingers you use to play the (approximation of the) major third, no matter where you're currently at"; if you arbitrarily fix a "current button", where you put your origin, those things become the same. In the same spirit, we use "pitch of the button" as a shorthand for "change in pitch resulting from that finger movement", which amounts to the assumption that your "current button" has a pitch of zero octaves.]

Which of those infinitely many choices you will want to make, no honest music theorist can tell you (without asking you questions), it depends on the relative weighting that you put on your desire of a clean sound versus your desire of short physical distances in terms of fingering. All that music theory can tell you is that you should want to make a choice that is optimal in the above sense, and that you should want to be consistent, see below. (Only if you can quantify those levels of desire, the music theorist can tell you more than that.)

And this is where the tuning matrix comes in: the tuning matrix is a compact way of describing which approximations you intend to use. For every prime number you care about, there is one column, containing the coordinates which you intend to use in order to approximate that prime number interval. In our case, if 5/4, the major third, is approximated by "four fifths up and two octaves down", i.e. (k1, k2) = (-2, 4), the prime interval 5/1 will be two octaves higher, at (k1, k2) = (0, 4), so that's what you'll put into the column belonging to prime number 5, which is the third column, because 5 is the third prime number. The first column will be (1, 0), since an octave is an octave, and the second column will be (1, 1), since 3/1 is an octave up and a fifth up. The other mentioned possibility for approximating the major third gives us (k1, k2) = (7, -8) for the third column. Though you'll probably care for another one or two prime numbers more, we omit them for brevity. What we got as possible matrices are
110
014
and
117
01-8
, and those two matrices are called, respectively, meantone and garibaldi (actually, the second matrix should have (11, -14) appended as fourth column to be properly called garibaldi.)

Why prime numbers? Because consistency and the uniqueness of prime factorization leaves only one choice for the rest, and with prime numbers it's easiest to compute that unique choice. Let's explain that with an example. Suppose you have made up your mind about the location of the major third, where will you put the minor third? There is only one good answer. Let's say, we deal with case 1 (meantone matrix), where the major third 5/4 (the approximation we use for it, to be exact) is located at (k1, k2) = (-2, 4). Considering that the fifth is located at (k1, k2) = (0, 1), and that a minor third is equal to a fifth minus a major third, (3/2)/(5/4) = 6/5, the only place for the minor third that makes any sense is (0, 1) - (-2, 4) = (2, -3). If we deal with case 2 (garibaldi matrix), the same reasoning gives (0, 1) - (5, -8) = (-5, 9) as the location of the minor third. Any choice different from that would violate the principle that to each interval belongs a finger movement (vector), which doesn't ever change. That principle is what's called "consistency", and it's nothing but the natural extension of the definition of the uniform keyboard from intervals that you hear to intervals that you "mean" (the ones you approximate); if the fingering doesn't change for the intervals that you hear, it would be most unnatural to have it change for the intervals that you mean.

There is a straightforward way to get the coordinates of a fraction using the matrix, if all prime factors of the fraction are accounted for by a column of the matrix. We demonstrate that at hand of the minor third, because we already have the result. The prime factorization of the minor third is 6/5 = 2^1 * 3^1 * 5^-1. Putting all the exponents into a vector (the exponent vector or monzo) gives the vector (1, 1, -1). Now just multiply the matrix with that vector (as a column vector), and you got the coordinates. The simplicity of this procedure is the reason that one associates the columns of the tuning matrix with prime numbers, like 5/1, instead of with intervals within the octave, such as 5/4.

Note that, while above "consistency" is used in the sense that you pick a matrix and stick with it (until you retune your instrument), the consistency concept introduced below (consistency of a matrix for a fraction, given the step sizes) is different.

The tuning matrix does not dictate any of the 4 parameters (see above) in any exact way, but there is always only a small range of acoustical parameters (step sizes) that makes sense, see next question.

given the tuning matrix, what are good step sizes? What is consistency of a matrix for a fraction, given the step sizes? What is "ET-consistency"?

Above, we considered the case of a uniform keyboard with Pythagorean tuning, which means that the step sizes are the perfectly tuned octave, and the perfectly tuned fifth, and we saw that the garibaldi matrix

11711
01-8-14
provides us with a meaningful way to suggest which buttons to use for any interval that has only 2, 3, 5, 7 in the prime factorization. (You might want to calculate the error interval of the harmonic seventh 7/4 as an exercise. The solution is 33554432/33480783, or 3.8 cents, the septimal schisma.)

Now, we change our point of view a little bit: we consider it a given, that we want to use the garibaldi matrix as a guide as "where to play what" (which approximations we use), but we consider the above step sizes as up for discussion. For now, we don't touch the purity of the octave, and fiddle around with how the fifth is tuned, i.e. with the second step size. What will happen is that every button, except those with y-coordinate 0, will have a change in pitch, which will be proportional to the y-coordinate. Suppose, rather than tuning the fifth perfectly to 3/2, we tune it to 31/53 of an octave. Converting to cents, the perfect tuning is 1200*log(3/2)/log(2) = 701.955 cents, while 31/53 of an octave is 1200*31/53 = 701.887 cents. Subtracting the two, we see that our new tuning for the fifth is 0.06821 cents lower (which is most probably not detectable by any human ear.) The major third, located at (5, -8) will change its pitch by -8 * -0.06821 = 0.5457 cents. Remember that in Pythagorean tuning, the major third (meaning the approximation of the major third suggested by garibaldi) was too low by 1 schisma = 1.9537 cents. Hence, the new error in our retuned keyboard will be -1.9537 + 0.5457 = -1.4081 cents, still too low, but an improvement of about half a cent. On the other hand, the harmonic seventh, located at (9, -14) will change pitch by -14 * -0.06821 = 0.955 cents. Previously, the harmonic seventh was already 3.804 cents too big, and now it's 0.955 more at 4.759 cents, so we made things worse.

Twiddling in the other direction, we can tune the fifth to 24/41 of an octave. That's 1200*24/41 = 702.439 cents, which is 702.439 - 701.955 = 0.484 cents too big. Now, we made the major third worse; it changes its pitch by -8 * 0.484 = -3.8722, giving a new error of -1.9537 -3.8722 = -5.826, i.e. 5.826 cents too small. As for the harmonic seventh, it changes pitch by -14 * 0.484 = -6.776 cents, giving a new error of 3.805 - 6.776 = -2.972 cents, which means, the error is reduced a bit, but we "overshot". It should be clear from the above, that we can tune the fifth in such a way that the harmonic seventh becomes perfectly tuned, and that the value in question will be something less than 0.484 cents above the perfect fifth. Let's calculate that. If we call the result q, then we have pitch at location (9, -14) = pitch of perfectly tuned harmonic seventh, which gives 9 - 14 q = log(7/4)/log(2), hence q = (9 - log(7/4)/log(2))/14 = 0.585189 octaves = 1200*0.585189 cents = 702.227 cents, which is 702.227 - 701.955 = 0.272 cents above the perfectly tuned fifth. This tuning now is non-periodic (every button has a different pitch, we have infinitely many steps per octave, just as in Pythagorean tuning); for the sake of easier avoidance of "falling off the edge", you probably (but by no means necessarily) want your keyboard to be periodic, so that keys repeat, and that is achievable via choosing a rational multiple of the octave as your size of the fifth (leading to an equal temperament); in our case the quest for a better harmonic seventh within equal temperament (and at the same location dictated by garibaldi) tells us that we should look for a rational number which is between 31/53 and 24/41. That's easy to find with "f-student summation": 31/53 "+" 24/41 = (31+24)/(53+41) = 55/94. (It is easy to prove that the f-student summation of two positive rational numbers always gives a number between the numbers you're adding.)

When we tuned to 24/41, although we changed the tuning of the fifth by only half a cent, it had quite a lot of effect on the "distant" buttons (those with large y-coordinate), so the slack we got is quite narrow. Let's explore what happens, when we push the envelope too far, and how we realize that we did.

Still sticking with garibaldi, let's tune the fifth to the 12 tone equally tempered fifth (the one on the standard piano; what we get is 12 ET), which has 1200*7/12 = 700 cents, which is 1.955 cents too small. (No, it's not the schisma again, but 1/12 of the Pythagorean comma, (3/2)^12 / 2^7 = 531441/524288, with 23.46 cents). Nearly 2 cents; if you think that after what happened at half a cent in the other direction (24/41 octave), this smells like danger, it means your olfactory sense is working. The change in pitch for the major third is -8 * -0.1955 = 15.64 cents, so the new error of the major third is a whopping -1.9537 + 15.64 = 13.69 cents. An error of this magnitude, perpetrated to a fifth, is enough for many to make them run out of the room screaming; here, it's perpetrated to a major third, and it would have made many run out the room screaming in renaissance times, but nowadays, people have been dulled into accepting this abomination of an alleged major third by hearing it often enough, while not hearing the real thing ever. But the real shocker is yet to come. The change in pitch for the harmonic seventh is -14 * -1.955 = 27.37 cent, giving a shocking new error of 3.8 + 27.37 = 31.17 cents, roughly a third of a semitone. That kind of error, perpetrated to a fifth, would make everybody save the deaf run out the room screaming. And all but the very crudest of ears easily recognize the difference of a justly tuned harmonic dominant seventh chord (4:5:6:7) and the 12 ET mutilated version of it, when hearing one after the other, and much of the "blue note" business of skillful jazz and blues musicians is related to the 31.17 cent error of the harmonic seventh in 12 ET, namely, by not having to hear it.

We can, of course, make the fifth still smaller, and the errors for major third and harmonic seventh will still get worse. At some point, we must conclude, that garibaldi gives bad advice for that size of the fifth. But just where is that point? Is it a matter of taste, or can we mathematically derive theoretical arguments telling us where we have to stop using garibaldi? The answer is, while those theoretical arguments exist, taste still plays a role in how far before the theoretical limit one should stop using the matrix in question.

To that end, let's start with an observation. Consider garibaldi tuned to 12 ET. Since we have finitely many (namely, 12) different pitches, they must repeat, and we must have buttons tuned in unison to where we are. Those are all integer multiples of (7, -12), because 7 * octave - 12 * (12 ET fifth) = 7 * 1 - 12 * 7/12 = 0 octaves. Now, garibaldi says that the major third can be found at (5, -8). Subtracting the unison, we conclude that the same pitch is also available at (5, -8) - (7, -12) = (-2, 4); and since that's closer, we'd rather use that. That doesn't disqualify garibaldi for 12 ET, though; rather, when in equal temperament, no matter which matrix you're using, what it says where the button of a fraction is, must always be taken "modulo" the unison vector. [Mathematically speaking, if the first step size is the pure octave (it usually is, but not always), and the second step size is k/n octaves, where k and n are positive relatively prime integers (note that k/n need not be an approximation of a fifth or a fourth, it can be really anything, the circle of fifth is not a "holy grail" or something), then we have an unison at all integer multiples of (k, -n), and then the location recommendation the matrix gives must always be interpreted modulo (k, -n), i.e. you can always change the result by integer multiples of that. In technical terms, one must divide out Z(k, -n) from each column of the matrix, Z being the set of integers.] The same thing happens to the harmonic seventh; it's now (simultaneously) at (9, -14) - (7, -12) = (2, -2).

But now, if we decrease the size of the fifth further, a thing happens that will convince any sane person that garibaldi has to be discarded at this point. Remember that the new (additional) coordinates (-2, 4) for the major third and (2, -2) for the harmonic seventh are valid only for 7/12 octaves as the value of the fifth. Suppose we tune the fifth to (7/12 - ε) octaves for some small ε. Playing the major third where garibaldi says we should, at (5, -8), gives the pitch 5*1 - 8*(7/12 - ε) = 1/3 + 8ε octaves (which is 400 + 1200*8ε cent, but it is easier to do stay with whole octaves as the unit.) Playing the major third at the "alternative" (-2, 4), which garibaldi permitted only for a fifth of exactly 7/12, we get the pitch of -2*1 + 4*(7/12 - ε) = 1/3 - 4ε. We saw above that 1/3 octave = 400 cents is 13.69 cents too big for the major third, and that's the pitch of both buttons when tuned with fifth = 7/12. Diminishing the size of the fifth by ε will now make the error worse by 8*ε for button (5, -8), but reduce it by 4*ε for button (-2, 4), which means that if the fifth is smaller than 7/12, garibaldi will recommend a button for the major third, which has an alternative that is both closer spatially and better in approximating the target pitch. Now, the only reason that any sane person would prefer the garibaldi-recommended button over the alternative is that this person does not want to play something that sounds like a major third; but this case is totally irrelevant, because the garibaldi recommended button is of course meant only for those you want to play something that sounds like a major third (that you would want to move your fingers more then necessary, because you confuse music making with a sportive workout, does not count as a sane reason), which leaves us with no reason whatsoever why any sane person would follow the garibaldi recommendation for the major third, where it is applicable. So we must disqualify garibaldi for everything that is smaller than 7/12 for the fifth. We also say, that garibaldi is inconsistent for 5/4, if the fifth is tuned to a value less than 7/12.

Interestingly, the very same thing happens to the harmonic seventh, at the same threshold of 7/12. Here is the calculation: pitch(recommendation) = 9 - 14(7/12 - ε) = 5/6 + 14 ε, pitch(alternative) = 2 - 2(7/12 - ε) = 5/6 + 2 ε. This time, both pitches deteriorate with ε, but the recommendation deteriorates faster, and again the alternative is both closer spatially (because 2 is less than 14) and better in target pitch. So, garibaldi is inconsistent for 7/4 also, if the fifth is tuned to a value less than 7/12.

The same argument can be used to argue that garibaldi should be disqualified even earlier. Less compelling, this time, though, because we'll apply the argument to the interval 49/48, also called Slendro dieses (it's about a third of a semitone, 35.7 cents), and it is much less clear that you'll want to even use this interval; and if you don't, why should you care if it's consistent? Here is the calculation. The prime factorization of the Slendro diesis is 49/48 = 2^-4 * 3^-1 * 5^0 * 7^2, giving exponent vector (-4, -1, 0, 2). Multiplying garibaldi with the vector gives (17, -29) as recommended button. In order to find a possible alternative button responsible for the inconsistency, let's subtract the unison vector of garibaldi-53ET, which is (31, -53), giving (-14, 24). This is a valid contender, because it is closer (24 < 29). At a tuning of 31/53 - ε, the recommended button has pitch 17 - 29(31/53 - ε) = 2/53 + 29 ε, and the contender has pitch -14 + 24(31/53 - ε) = 2/53 -24 ε. 2/53 is 2/53 - log(49/48)/log(2) octaves = 9.586 cent too big, the common error at 31/53, and increasing ε, it gets worse for the recommendation and better for the contender. [There is one more contender for 49/48 at (17, -29), namely (17, -29) - (24, -41) = (-7, 12), which destroys garabaldi's consistency of 49/48 below (10 - 2 log(49/48)/log(2))/17, which is 0.204 cent later, so not really relevant; we mention it to clarify that the point where a contender starts generating an inconsistency does not need to be a rational number.] Hence garibaldi is inconsistent for 49/48, whenever the fifth tuned smaller than 31/53. Exercise: Show that garibaldi is inconsistent for 35/18, if the fifth is greater than 24/41.

Consistency sure is nice, but it's a pipedream to ever find a matrix and step sizes, such that it's consistent for any rational number, because that's just impossible (unless of course, you "cheat" and give the matrix only two columns.) To explain why, consider any interval and stack it n times on top of itself (as in, e.g., (5/4)^1000 or so), where n is large. Then the error (unless it's zero, then pick a different interval, they can't all have zero) will go to infinity, and so will the spatial distance. It should be obvious that that contradicts the consistency of matrix for that fraction (at any tuning.) Hence, you should demand consistency only for simple fractions (small(ish) enumerator and denominator), and the vagueness of the term "simple" is where the taste comes in.

Above, we encountered various approximations of the perfect fifth log(3/2)/log(2) = 0.5849625 octaves = 701.955 cent, namely 7/12 octaves (1.955 cent too low), 24/41 octaves (0.484 cent too high), 31/53 octaves (0.06821 cent too low). You might wonder, where those approximations "come from", i.e., how they can be found efficiently. The answer is, those numbers occur in the continued fraction expansion of the fifth, measured in octaves (i.e., 0.58496250072115618145373894394781650876)

There is also a stronger measure for consistency, which is only applicable to equal temperament, and actually has nothing to do with the keyboard, but only with the ET scale at hand; it's called ET-consistency. It means that the pitch of button you use for a fraction is the best approximation in the entire ET scale, hence the best approximation amoung all pitches available on the keyboard (tuned to the ET at hand), not just the best approximation among all the pitches of buttons which are no further away from the current button than the button you're using. Obviously, ET consistency implies consistency, but consistency does not imply ET-consistency. Example: Consider 28/25 in garibaldi tuned to 55/94. We have 28/25 = 2^2 * 3^0 * 5*-2 * 7^1, and garibaldi * (2, 0, -2, 1) = (-1, 2). The pitch there (measured in octaves) is -1 + 2*55/94 = 16/94, and the error is 16/94 - log(28/25)/log(2) = 0.006714 octaves = 8.057 cent. No button with y-coordinate between -2 and 2 has a pitch that is less than 8.057 cent away from log(28/25)/log(2), except the button (-1, 2) itself, so that means the button is consistent (or rather, garibaldi is consistent for 28/25, if tuned at fifth = 55/94 octaves). Now, in 94 ET, each step has 1200/94 = 12.766 cent, which means, if 16/94 is 8.057 cents too high, then 15/94 will have an error of 8.057 - 12.766 = -4.7091, i.e., will be 4.7091 cents too low, so 15/94 is a better approximation for 28/25 (measured in octaves, i.e. log(28/25)/log(2)) than 16/94. To find out where that button is, we have to solve k1 * 94 - k2 * 55 = 15, which has the solution (k1, k2) = (-25, 43) (see extended Euclidean algorithm for how to solve this kind of problem); the solution is of course modulo the unison vector of garibaldi tuned to 55/94, which is (55, -94). As the "ET-suggested" button (-25, 43) is much further away, one cannot conclude that garibaldi made a bad recommendation.

everything starting here is work in progress (will rewrite / fill out gaps later)

what features does your app have?

In the app, when you mouse over a button, a selection of the fractions that the matrix associates with that button will appear on the right (the most important (i.e. simple) fractions are also written on the button), along with additional infos: under "consistency", ET-consistency is indicated by "very much", consistency by "yes" (unless it's even ET-consistent), and inconsistency by "no". "Original" indicates the question, if that fraction is always found at location ("yes"), or if it's only there because, at your particular choice of ET tuning, a shift of the original location by an integer of the unison vector put it there ("no").

rotation, mirroring, scaling, how many fractions to show, "warping"/shearing (changing the unit vectors)

todo (notes on what to write next, and what to code)

what's the meaning of the table in tunings list?

It contains a huge list of tuning matrices. They have been computer generated, I haven't looked at them all. If they have a name, it usually means, that someone already discovered them before me, and has given that name to them. Only very few names are picked by me, and many are called "noname". When you click the unlabelled button in the "open" column, you first get a configuration screen, where you can set further options (most importantly, the step sizes), and look at error graphs, the shape of the buttons, etc. Usually, the default configuration will be just OK. Just click "open in new window", and you can play around with the keyboard. The tunings list also shows some examples of what's in the "kernel". The kernel consists of those fractions which are identified with the unison, i.e. the matrix recommends that you approximate this fraction with the unison, which means that hence matrix * exponent vector of that fraction is the zero vector. If you identify the fractions with their exponent vectors, the kernel is a Z-module subspace of Z^(number of columns of matrix) with dimension (number of columns of matrix) - (dimension of keyboard).

(tuningsList.html will work faster and look better after installation of tex fonts) the form that tuningsList.html opens does not work in internet explorer, due to a problem with functions from window.opener being invisible. I'm too lazy to fix, please use another browser. loading of tuningsList can take a couple of seconds.

give me some interesting layouts to look at.

meantone basically the fokker layout, but with not-quite-hexagon buttons (so that octave line and unison line have a right angle), and mirrored, so it's easier to play. good for 31 ET, 12 ET, 43 ET, 50 ET. In my opinion the best. Setting it to 12 ET gives a rotated Janko; the rotation makes the Janko easier to play.
porcupine good for 22 ET, 29 ET, 59 ET, 37 ET
negri good for 19 ET, 29 ET
miracle good for 72 ET
orwell called so, because the main step size (i.e. second step size, also called tau2) works best at 19/84. Also good for 41 ET and 53 ET
garibaldi good for 94 ET, 53 ET, 41 ET. Setting it to 12 ET gives (rotated) Janko again.
pajara good for 22 ET and 34 ET
magic good for 41 ET, 19 ET and 22 ET.
rodan good for 87 ET, 41 ET, 46 ET
fiftyseven good for 57 ET, 26 ET, 31 ET
fourtynine good for 49 ET, 22 ET, 27 ET, 71 ET, 39 ET, (17 ET, but 17 ET is not good)
augene good for 27 ET
unidec good for 118 ET
hemithird good for 118 ET, 56 ET, 31 ET