>Laurie> Why does transposition need to understand the mode? > >Laura> Currently, the abc2midi transposer only understands the key >signature. So if I have a piece in D dorian, and I transpose it up 3 half >notes, the transposed output is in Ab. It should be in F dorian. > >Oh, is that all? > >I would hardly call the ability to copy the name of the mode from input to >output "understanding" it. I thought it might have been something to do >with whether a note should be called F# (or ^F) in D phrygian (2 flats) but >Gb (or _G) in some other 2-flats mode (F mix??) and I was all ready to start >busting my head to figure out a good algorithm! > >Actually I think there *is* something about deciding how a given note is to >be represented (which, aside from tempering questions, is a reason for >wanting double-sharp and double-flat symbols) but "slavishly copy the input" >seems to work. (I plead guilty - Muse does not yet do double-accidentals). >In other words if the effect of an accidental in the original was to modify >the note by n (signed number) semitones then do the same to the output.
Long after I wrote BarFly's transposition code (which sometimes gets this wrong) I figured out a solution to the problem. The trick is to copy the pattern of the notes in the staff display to the new key. So if a pair of notes is vertically separated by two lines in the original, in the new key you have to use whatever accidental is needed on the second note to place it two lines away from the first. Of course, this assumes that the original transcription is correct. Sometime I'll get round to re-writing it. >Of course if a key signature had a note flatted and the music had it >double-sharped then (1) a triple-sharp would be needed and (2) the input >file is silly anyway so who cares? No (1) is wrong because accidentals are absolute, rather than relative. You'd still only need a double sharp. (2) is right though:-) Phil Taylor To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
