On Saturday 03 March 2007 8:41 pm, Arnout Engelen wrote: > key, and use a sharp if it's major and a flat if it's minor? If so, is > there a convenient way to find the current key? Or is it a bug for this > getter to return NoAccidental in this case?
See the huge comment at Pitch::rawPitchtoDisplayPitch() for a treatise on how we figure this out. It takes a raw MIDI pitch, the out-of-key accidental, and the key signature to resolve this. It's ridiculously complicated. I'm not sure of your exact context, but it sounds like you need to create a Pitch object and use its methods to resolve your problem. That's what Pitch is for. I spent an OBSCENE amount of time getting this right, so let's not reinvent the wheel. If you can't figure out the key, root around in LilypondExporter.cpp to see how to get a key and pass it in and use it with Pitch. If this is all too vague, I can be more detailed. -- D. Michael McIntyre ------------------------------------------------------------------------- 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 [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
