Piano Keys

https://news.ycombinator.com/rss Hits: 16
Summary

Piano Keys If you've ever looked closely at a piano keyboard you may have noticed that the widths of the white keys are not all the same at the back ends (where they pass between the black keys). Of course, if you think about it for a minute, it's clear they couldn't possibly all be the same width, assuming the black keys are all identical (with non-zero width) and the white keys all have equal widths at the front ends, because the only simultaneous solution of 3W=3w+2b and 4W=4w+3b is with b=0. After realizing this I started noticing different pianos and how they accommodate this little problem in linear programming. Let W denote the widths of the white keys at the front, and let B denote the widths of the black keys. Then let a, b,..., g (assigned to their musical equivalents) denote the widths of the white keys at the back. Assuming a perfect fit, it's impossible to have a = b = ... = g. The best we can do is try to minimize the greatest difference between any two of these keys. One crude approach would be to set d=g=a=(W-B) and b=c=e=f=(W-B/2), which gives a maximum difference of B/2 between the widths of any two white keys (at the back ends). This isn't a very good solution, and I've never seen an actual keyboard based on this pattern (although some cartoon pianos seem to have this pattern). A better solution is to set a=b=c=e=f=g=(W-3B/4) and d=(W-B/2). With this arrangement, all but one of the white keys have the same width at the back end, and the discrepancy of the "odd" key (the key of "d") is only B/4. Some actual keyboards (e.g., the Roland HP-70) use this pattern. Another solution is to set c=d=e=f=b=(W-2B/3) and g=a=(W-5B/6), which results in a maximum discrepancy of just B/6. There are several other combinations that give this same maximum discrepancy, and actual keyboards based on this pattern are not uncommon. If we set c=e=(W-5B/8) and a=b=d=f=g=(W-3B/4) we have a maximum discrepancy of only B/8, and quite a few actual pianos use this pattern as we...

First seen: 2025-07-19 20:30

Last seen: 2025-07-20 12:32