On 10/20/09 1:27 PM, "fiëé visuëlle" <fiee.visue...@gmx.net> wrote:
> Hello again, still fiddling with chord names...
>
> (1)
> I use this nice Scheme function by Carl Sorensen to get "fis" and
> "des" names instead of "f#" and "db".
> I don't understand enough Scheme to avoid "ees" - do you?
I assume you want to get Es for E flat major and es for e flat minor.
(I'm not sure about this -- I'm totally american in my chord experience).
>
> #(define ((chord-name->german-markup-text-alteration
> B-instead-of-Bb) pitch lowercase?)
> "Return pitch markup for PITCH, using german note names.
> If B-instead-of-Bb is set to #t, real german names are returned.
> Otherwise, semi-german names (with Bb and below keeping the
> british names). Alterations are indicated with -es and -is
> instead of the flat and sharp symbols."
> (let* ((name (ly:pitch-notename pitch))
> (alt-semitones (pitch-alteration-semitones pitch))
> (n-a (if (member (cons name alt-semitones) `((6 . -1) (6 .
> -2)))
> (cons 7 (+ (if B-instead-of-Bb 1 0) alt-semitones))
> (cons name alt-semitones))))
> (make-line-markup
> (list
> (make-simple-markup
> (conditional-string-downcase
> (vector-ref #("C" "D" "E" "F" "G" "A" "H" "B") (car n-a))
> lowercase?))
> (let ((alteration (/ (cdr n-a) 2)))
> (cond
((and (= alteration FLAT) (= (car n-a) 2)) (make-simple-markup
"s"))
> ((= alteration FLAT) (make-simple-markup "es"))
> ((= alteration SHARP) (make-simple-markup "is"))
> (else empty-markup)))))))
Note: code above is untested, but it illustrates the principle.
>
>
> (2) Different, probably easier problem:
> I must display some alterations as follows:
> f:dim => f-
> f:aug => f5+
> f:maj7 => f7+
>
> I found the last one on my one, since there is a "majorSevenSymbol"
> hook, but I found nothing similar like "diminishedSymbol".
> How can I change the chordname "enhancement symbol" for each one of
> these special cases, favourably in combination with the above chord
> namer?
Probably the easiest way to do these is to use a custom chord name
exceptions list. See the snippet Chord name exceptions in Customizing chord
names of section 2.7.2 of the docs.
<http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Displaying-chords
#Customizing-chord-names>
HTH,
Carl
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user