Dougie McGilvray wrote:
> might be worth a looking at the base40 system if you haven't already.
> It's a numerical representation of enharmonic pitch which I'm sure
> would allow 'easy' diatonic transposition, but I didn't look into it
> too deeply.
>
> http://www.ccarh.org/publications/reprints/base40/
Interesting read (and pleasantly written) indeed  however, quoting from
the article:

The most successful systems to be proposed thus far have been those
which recognize the twodimensional nature of pitch notation, i.e., that
the unambiguous representation of pitch notation requires two
independent parameters. (..) From the standpoint of data storage and
retrieval, however, the representation of musical pitch by a single
numerical parameter would be superior to any system using two
parameters. (..) any singleparameter system will have inherent ambiguities.

I think for Rosegarden a simple 2parameter representation is clearer
and more elegant, and does not neccessarily have the limitations*
imposed by a 1parameter system. I haven't been able to find out more
about the representations by Norbert BoerkerHeil mentioned in the article.
The Binomal representation** by Alexander Brinkman mentioned in the
article is, however, a lot more like I'd have imagined this (except much
more nicely worked out and documented ;) ). Basically, a note or
interval is stored as a pair of pitch and step. So C is <0,0>, D <2,1>,
E <4,2>, F <5,3>, et cetera.
This has nice properties: D3 transposed upwards by a major triad will
simply be, for example, <(3*12)+2,(3*7)+1> + <(0*12)+4,(0*7)+2> =
<36+2+4,19+2> = <42,24>. Converting that back to conventional notation
is simple: the octave is 42div12 or 24div7 = 3, 24%7=3 means 'F', F's
pitch%12 is normally 5, but 42%12=6, hence one # needs be added,
yielding F#3. Computing the interval between 2 notes can be done by
substracting them much like how transposing is done by adding. I like it.
We could use the proposed singlenumber representation, but I guess it'd
be neater to do it 'the C++ way' and just store it as a class with 3 fields.
Nice stuff, thanks for the pointer.
Arnout
* the base40system works as long as a note never has more than 2 flats
or sharps. The article nicely explains how the system can be scaled up
to a base54 system (3 flats/sharps) and beyond, which could be
sufficient, but isn't really elegant.
** A Binomial Representation of Pitch for Computer Processing of Musical
Data, http://www.jstor.org/view/01956167/ap020010/02a00030/0 (if that
url works)
