Hi,

I'm hacking on some code that loops though the notes of an eventselection:

    for (i = m_selection->getSegmentEvents().begin();
        i != m_selection->getSegmentEvents().end(); ++i) {
            if ((*i)->isa(Note::EventType)) {
                  int pitch = (*i)->get<Int>(PITCH);
                  Accidental accidental = NoAccidental;
                  (*i)->get<String>(ACCIDENTAL, oldAccidental); 
            }

If I understand correctly, PITCH is the pitch of the note, and
ACCIDENTAL specifies how to spell it. For example, pitch 41 will be an
A# if the accidental is a Sharp, and a Bb if it's a Flat.

However, I'm getting NoAccidental back for a note with pitch 41. How
should I determine the accidental to use? Should I look at the current
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?


Arnout

-------------------------------------------------------------------------
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

Reply via email to