I asked this question in a comment in a bug report, and nobody caught it.

Here's a typical example:

Key == C major
Transpose == -2

Notation wants to be written at D major to sound correctly.  It goes up by two 
accidentals.  From zero accidentals to two accidentals.

Now how do you handle that when the number of accidentals gets higher than 7?

I don't have the foggiest clue, and don't even know what to google for.  I 
doubt an answer is out there in terms of -2 and +2.  It's probably about 
minor diminished 13ths or something, if it's out there at all.

So what's the formula here in code terms?

Something like

concert_pitch_key_accidental_count - segment_transpose_property

would work for most cases.

Key == C major, concert_pitch_key_accidental_count == 0.

Transpose == -2

0 - -2 = 2

The key with +2 accidentals from C major is D major.

Or the opposite

Key == C major, concert_pitch_key_accidental_count == 0

Transpose == 2

0 - 2 = -2

The key with -2 accidentals from C major is Bb major.

That much seems sane, reasonable, and predictable, but what happens when the 
number exceeds +/- 7?  We don't support keys with more than 7 accidentals, 
and I wouldn't expect it to be common for a -33 instrument to read a key in

Key == C major, accidental_count = 0

Transpose == -33

0 - -33 = 33

33 accidentals.  What the hell kind of crazy key would that be?  It would have 
to have triple sharps or something.

So I'm sure there is a perfectly sane solution to this, but I haven't a clue 
whatsoever what that solution might be.

Help?  Please?  Anyone?

-- 
D. Michael 'Silvan' McIntyre  ----   Silvan <[EMAIL PROTECTED]>
Linux fanatic, and certified Geek;  registered Linux user #243621

Author of Rosegarden Companion http://rosegarden.sourceforge.net/tutorial/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to