>:! We need:
>:!     * transposition (which understands the mode of what's being
>:!       transposed)
>: Why does transposition need to understand the mode?
>
>I had in mind a problem with the way BarFly used to transpose.  If the
>tune is *strictly* in a mode it worked okay, but if you transposed a
>tune with accidentals, it was anybody's guess how it would decide to
>name them - if you had an F sharp in a G minor tune, it might end up
>as B flat if you transposed it to B minor, and the program would then
>need to put a natural in front of the next B in the bar, with similar
>cascades of weirdness throughout the tune (this looked particularly
>bizarre if you had a sharpened gracenote like that).  I think this
>is fixed now, at least I just tried a few tunes with accidentals and
>couldn't get it to happen; I presume the program now realizes that
>such an F sharp is a sharpened seventh rather than a flattened tonic,
>and represents it accordingly when transposing it.

It's been tinkered with a bit since you last complained, but it's still
not perfect.  You can mess with it yourself if you want, by editing the
RKSG (Reverse Key SiGnature) resource with ResEdit.  When deciding what
combination of note and accidental to use to represent a pitch BarFly
uses this lookup table:

Uncommitted (128):

=C=C C C C C C C C=C=C=C=C=C B
 D D D D_D_D_D^C^C C C C C C C
=D=D=D=D D D D D D D D=D=D=D=D
 E E E E E E_E^D^D^D^D D D D D
 F=E=E=E=E=E E E E E E E E=E=E
=F F F F F F F F=F=F=F=F=F E E
 G G G_G_G_G_G^F F F F F F F F
=G=G=G G G G G G G G=G=G=G=G=G
 A A A A A_A_A^G^G^G G G G G G
=A=A=A=A=A A A A A A A A=A=A=A
 B B B B B B B^A^A^A^A^A A A A
 C C=B=B=B=B=B B B B B B B B=B

Each of the 15 columns represents a key signature, ranging from seven
flats (column 1) to seven sharps (column 15).  The twelve rows represent
the pitch (as midi code modulo 12) from zero (C) at the top to eleven (B)
at the bottom.  Each cell contains exactly two characters, the first of
which is =,^,_ or space, and the second is a note letter.  The underlying
rule behind this is:

(1) use no accidental if possible, else
(2) use a note with a natural if possible, else
(3) if the key signature has any flats in it use a flat, else
(4) use a sharp.

If you can come up with a better rule, change the table to suit.

Unfortunately ResEdit represents this in four columns, rather than 15, but
if you paste the above text version into a text editor (you can use BarFly
itself, but you'll need a second copy as you can't run the copy which is
open in ResEdit) edit it, then copy and paste into ResEdit it will come out
right.

There are two other RKSG resources, named "Hinted Sharp" and "Hinted Flat".
They are only used when expanding guitar chords, where you get a hint from
the name of the chord.

Phil Taylor


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to