I'm aware of a number of different ways of representing pitch as numbers (including one I developed for use in my own software) but am interested if there are others.

The most widespread is probably MIDI (where C4 is 60 and each semitone up/down adds/substracts 1 from the value).

The MIDI note value system conflates enharmonics (which is problematic for a lot of the work I'm interested in and pretty much a deal breaker) and can really only handle a 12eq but it does have the advantage that both pitch class and octave are incorporated in one number.

I've written a lot of code that uses my own circle of fifths system http://jtauber.com/blog/2007/12/13/numerical_representation_of_pitch/ assigning D to 0 and +1 means a fifth above and -1 a fifth below. This allows for distinct enharmonic spelling, and easy interval arithmetic (which makes it easy to give the correct answer to questions like: what's the augmented fourth above D♯?) and can easily test for enharmonic equivalence via a modulo operation. It can, however, extend beyond the 35 note names for non-12eq tunings. One disadvantage is it only represents pitch class so you need a second number to indicate octave.

Hewlett's Base-40 system http://www.ccarh.org/publications/reprints/base40/ is very clever in supporting distinct enharmonic spelling plus representing pitch class and octave in a single number in such a way that allows easy interval arithmetic. The only disadvantage I can see is it does assume 35 note names and so has a 12-note octave assumption built in.

Hewlett's page (linked to above) does mention work by Clements and Zimmerman.

Is Hewlett's Base-40 the dominant one used in computational musicology or are there other systems (that maintain interval invariance and enharmonic spelling differentiation) in use, and, if so, what are they?

  • 2
    I don't know if this will help you, but have you heard of pitch set theory? It's good for abstracting relationships between a series of pitches, but does not assign absolute numbers. en.wikipedia.org/wiki/Set_theory_(music)
    – cotroxell
    Commented May 20, 2011 at 12:35
  • 1
    @James Tauber: The answer to "Are there other systems in use in computational musicology?" is presumably yes. Are you looking for something in particular? For example: A system that provides greater advantages than the one you're using, with an explanation of it? If so, please add that information to the question; I don't see a real question here otherwise.
    – user28
    Commented May 20, 2011 at 13:12
  • 2
    Just represent the pitch using the frequency in Hertz. Problem solved. :) At least, as a physicist, this is what I would do.
    – Noldorin
    Commented May 20, 2011 at 19:11
  • @Matthew Read: I've edited the final paragraph to make it clearer I'm interested in what other systems are in use Commented May 21, 2011 at 2:12
  • @Noldorin: joking aside, frequency isn't really that different than the MIDI note value. In fact, if you assume 12-eq and allow for non-integer MIDI note values, they are homeomorphic. Systems like Hewlett's and mine maintain note naming for us people that care that A♯ is not B♭ :-) Commented May 21, 2011 at 2:19

1 Answer 1


There are many others. Some piano technicians identify the keys on a piano by number, from 1 = the lowest A to 88 = the highest C.

In electrical engineering, the most common way is to use Hertz which is the number of cycles per second. In standard pitch, A is 440. A disadvantage of this system is that it is not linear, but you can convert it to a linear scale by taking the logarithm. (What the piano technicians use is the log to base 22.5 of this number, if my math is correct.) An advantage is that almost-exact values can be given for notes in different tuning systems and for enharmonics. A disadvantage is that they can only be almost-exact because most of the numbers are irrational.

Harry Partch in his book Genesis of a Music formulated a system of ratios starting at a low G which is 1/1. His system depends on instruments that are tuned using only rational numbers so that the intervals relate more closely to the harmonic series. The D a fifth above low G is 3/2.

There are also systems that are not purely numerical. There is a very commonly-used one in which the lowest C on the piano keyboard is CCC, the next is CC, the next is C, then c, then c', then c'' etc. Another one labels the low C as C1, the next as C2 etc.

Early computer-based musical typology systems had only punched cards for input, so they needed a system. This was for printed music, not sound generation. One way is to indicate the staff line and note value; another is pitch class, octave and note value like "C5Q".

  • These systems are all either non-numerical or fail to maintain enharmonic spelling differentiation. I'm interested in whether Base-40 is still state-of-the-art or whether other systems have been developed in the last 25 years. Commented May 22, 2011 at 2:43
  • 1
    A better approach would be to abstract pitch class, tuning and enharmonic variations as three separate dimensions. Traditional notation has separate "dimensions" for diatonic pitch (vertical position on staff), accidental pitch modification (sharps and flats), note duration (note shape), position in time (note shape, rests, and horizontal position), overall loudness, single-note loudness (accents), musical phrasing, ornamentation, and separation of multiple parts (separate staves, or note stems up or down on one staff). (But it doesn't answer your question.) Commented May 31, 2011 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.