AW: AW: ChordNames

2006-11-29 Thread Philip Chinery
Thank you very much :)

I will inspect the code, but it looks very good so far. We may only need to
add 6 and 7 chords for our needs, but I will have a try on that and if I
don't succeed I will come back ;-)

Regards,
Philip 

> -Ursprüngliche Nachricht-
> Von: Johannes Schindelin [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 29. November 2006 21:32
> An: Philip Chinery
> Cc: lilypond-devel@gnu.org
> Betreff: Re: AW: ChordNames
> 
> Hi,
> 
> On Wed, 29 Nov 2006, Philip Chinery wrote:
> 
> > > Have you tried \germanChords?
> > 
> > Yes, I have, but it only changes B to H and such things, 
> but our Goal 
> > ist to display "Am" as "a" while "A" remains "A".
> 
> Correct. And you cannot just override chordRootNamer, since 
> that function is only passed a single pitch (not enough information).
> 
> Attached is my attempt at it. It is dirt simple, in that it 
> only displays alower case letter for minor chords, and an 
> upper case letter for all others. No triangles, numbers or 
> symbols. But it's a start...
> 
> Ciao,
> Dscho
> 
> 
> 



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: AW: ChordNames

2006-11-29 Thread Johannes Schindelin
Hi,

On Wed, 29 Nov 2006, Philip Chinery wrote:

> > Have you tried \germanChords?
> 
> Yes, I have, but it only changes B to H and such things, but our Goal ist to
> display "Am" as "a" while "A" remains "A".

Correct. And you cannot just override chordRootNamer, since that function 
is only passed a single pitch (not enough information).

Attached is my attempt at it. It is dirt simple, in that it only displays 
alower case letter for minor chords, and an upper case letter for all 
others. No triangles, numbers or symbols. But it's a start...

Ciao,
Dscho


\version "2.10.0"
\header {

texidoc = "Demonstrate German chord names"

}

chs =  \transpose c' c' 
{
1
% m = minor triad

 \break
\transpose c' d' {


   % triangle = maj
 
}
 \break
\transpose c' es' {


}
 
\break
   % 6 = major triad with added sixth
  % m6 = minor triad with added sixth
 
 \break


 
 \break



\break



\break



\break



\break



\break

  % add9

}

#(define (simple-german-chord-name pitches bass inversion context)
  "Return simple chord markup for PITCH, using german note names.
Use lower case for minor, otherwise upper case. Does not do any fancy
sub or superscripts.
"
  (let* ((pitch (car pitches))
 (pitch2 (cadr pitches))
 (diff (if (null? pitch2) (ly:make-pitch 0 0 0)
(ly:pitch-diff pitch2 pitch)))
 (minor? (and (= (ly:pitch-notename diff) 2)
  (= (ly:pitch-alteration diff) -2)))
 (name (ly:pitch-notename pitch))
 (short-alt? (or (= name 2) (= name 5)))
 (alt (ly:pitch-alteration pitch))
 (n-a (if (member (cons name alt) `((6 . ,FLAT) (6 . ,DOUBLE-FLAT)))
 (cons 7 (+ SEMI-TONE alt))
 (cons name alt
   (markup #:line
((string-append
  (vector-ref
   (if minor?
#("c" "d" "e" "f" "g" "a" "h" "b")
#("C" "D" "E" "F" "G" "A" "H" "B"))
   (car n-a))
  (list-ref
   (if short-alt?
'("ses" "s" "" "is" "isis")
'("eses" "es" "" "is" "isis"))
   (+ 2 (/ alt 2

germanChordProperties = \sequential { 
\set chordNameFunction = #simple-german-chord-name
}

\score{
<<
\new ChordNames {
\set instrumentName = #"Ignatzek (default)"
\set shortInstrumentName = #"Def"
\chs
}

\new ChordNames {
\germanChordProperties
\set instrumentName = #"Deutsch"
\set shortInstrumentName = #"dt"
\chs
}

\new Staff  \transpose c c' { \chs }
>>
\layout {
indent = 3.\cm
\context { 
\ChordNames
\consists Instrument_name_engraver
}
}
}

___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


AW: ChordNames

2006-11-29 Thread Philip Chinery
> Have you tried \germanChords?

Yes, I have, but it only changes B to H and such things, but our Goal ist to
display "Am" as "a" while "A" remains "A".

Regards,
Philip



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel