Hello Niek, I haven't looked at the code in detail for a while, but I think the comments below should be accurate. Haven't tested.
On Wed, Jun 22, 2011 at 09:34:22PM +0200, Niek van den Berg wrote: > I am trying to import a MusicXML file and found some strange behavior of the > Pitch constructor Pitch::Pitch(char noteName, int octave, const Key &key, > const Accidental &explicitAccidental, int octaveBase). > > When parsing the MusicXML file I find a A without accidentals. When the key > is > C major the constructor creates the right pitch (69). However in C minor the > constructor creates a pitch 68 (A flat). > > I would expect an A without accidentals will be an A in every key. I can see how that might be confusing. Right now I think the rationale here is: * when no explicit accidental is specified ('NoAccidental'), inherit the accidental from the key signature * when an accidental is specified, always honour this accidental. Note that this does not always mean this accidental is shown: when the specified accidental (DoubleFlat, Flat, Natural, Sharp, DoubleSharp) is consistent with the current key, it will usually not be shown in the graphical representation. Perhaps the above explanation should be added to the documentation for this constructor (or the code changed, of course :) - but I think it makes some sense ;) ). > An A natural will be an A in C major and a Ab in C minor or do I understand > something wrong? 'Natural' here really means 'Not altered', e.g. not flat/sharp. > How can I create a pitch representing a "real" A in C minor? Specify 'Natural' as the accidental. Arnout ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Rosegarden-devel mailing list Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel