D. Michael McIntyre schreef:
On Tuesday 17 April 2007 8:49 pm, D. Michael McIntyre wrote:
If you're up for the challenge, then by all means go for it!
First off, thanks for the encouraging words. The reason you haven't
heard from me since is, luckily, that I've been happily hacking away on
this in the mean time ;).
I'll further add that Pitch::rawPitchtoDisplayPitch() is the cornerstone of a
lot of other code all over the place, so changing the way this behaves could
have many unforeseen consequences to work through.
Luckily it's private, but assumptions like "passing 'A minor' into
Pitch::getAccidental(key) will make it prefer flats" are rather
all-over-the-place, indeed :).
My code has stood for two or three years untouched. It's a good record. If
you want to be the next one in line to tear out the walls and rebuild it from
scratch, I can still be proud of how well my baby performed.
Actually, my current approach leaves your code largely intact: when
rawPitchToDisplayPitch is called with NoAccidental specified, I call my
new code to choose one. This will yield the most likely (hopefully)
'raw' accidental (i.e. Sharp for a F# even if there's a F# in the key).
Now that the accidental is specified (either by whoever called
rawPitchToDisplayPitch or by my new code), your code is leveraged to
calculate the display-accidental, octave, height-on-staff etc.
This seems to be working out nicely so far, but there's still a lot of
tweaking and testing to do, also to see if this approach actually seems
to give good results in practice :). Looking at how other packages
tackle this issue is a good idea, I'll see what I can find.
Arnout
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel