On Monday, 20 September 1999, "Shamus" writes:

> myself!  ;-p  BTW, I've been working on a chord object that figures out
> chord names (or more precisely, chord labels) from a given collection of
> notes--I can send it to you if you'd like.  Also, I can understand why you

Have a look at lily/chord.cc:

   Chord:banter_str (..)

That routine constructs a chord name from a list of pitches and 
given inversion.  It would be Good to have other chord name schemes
too (like more 'traditional american', or whatever).  Actually,
returning a string is a bit nasty, a molecule would be better.

> would need to figure out a chord label from a collection of notes, but why
> can't it figure out that the chord name that I specify (by literally writing
> it out as 'Cmaj7' for example) is what I want printed out in a ChordName
> context?  I've looked through the source trying to find where Lily does that
> parsing but have had no luck finding it...  Could you point me to it?

See parser.yy, look for 'chord'.  Also, see lily/chord.cc:

/*
  construct from parser output
  */
  Chord::Chord (..)

Where a chord is constructed from a:

  * tonic
  * list of additions
  * list of subtractions
  * inversion pitch

Jan.

Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien/      | http://www.lilypond.org/

Reply via email to