lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Slash chords


From: Luca Fascione
Subject: Re: Fwd: Slash chords
Date: Sat, 21 Nov 2015 14:15:44 +1300

Hi Simon,
so this actually works rather well, I ended up taking the rotation out, as with the actual font you get a better sense of the nib direction with the original orientation of the solidus, nonetheless I do really like your suggestion of using a slightly larger size, I find it does help a fair bit with overall balance and blackness. I also messed with kerning a little

I have attached a test of the latest results, I find it looks ok (and it's certainly good enough for my present purpose), but it could be better. 

I think there are two issues at present: on the "top" of the solidus the chords with sevenths have the slash too far to their right, the F minor has it a touch loose, and the F major has it a touch tight. On the bottom of the solidus, I like how B and G sit, I think A sits loose and E sits far too tight, the present settings being somewhat of a compromise.

I suspect this is because lilypond, like TeX, thinks in boxes, and that, combined a possibly not too accurate kerning table for the font, is not working too well.

So the reason for this message is just to enquire as to the offchance of being able to adjust the kerning of the bass notes on a per-note basis and some way to do the same for the top.

(Note that this font is odd, in the the 7th symbol is raised in its natural, baseline-referred form: you can see this in the overrides, where asking for C7 actually yields C^7)

Anyways, in the off chance this is fixable, I'd be keen to hear how to do so, in any event many thanks for your help so far, this is of enormous help

Cheers,
Luca


On Sat, Nov 21, 2015 at 10:36 AM, Simon Albrecht <address@hidden> wrote:
Hello Luca,

with the help of the french blog post jmechmech linked in his reply, I cooked up the following from your code:

%%%%%%%%%%%%
\version "2.18.2"

#(define (lower-extension pitch chbass)
   "Return lowered markup for pitch note name."
   #{
     \markup \raise #-1.9 \halign #0.2
     #(note-name->markup pitch chbass)
   #})

chExceptionMusic = {
  <c e g bes>1-\markup { "7" }
  %<c e g b>1-\markup { "<7/" \raise #-2.5 "B" } % for illustration purposes only
  <c ees g>1-\markup { ">" }
}

chExceptions = #(append
                 (sequential-music-to-chord-exceptions chExceptionMusic #t)
                 ignatzekExceptions)

\layout {
  \context {
    \ChordNames
    \override ChordName.font-name = #"New Real Book Chords"
    chordNameExceptions = \chExceptions
    slashChordSeparator = \markup {
      % the \hspace commands simulate kerning
      \hspace #-.7
      \fontsize #1 \lower #1.2 \rotate #-10 "/"
      \hspace #-.1
    }
    chordNoteNamer = #lower-extension
  }
}

\score {
  \new StaffGroup <<
    \chords {
      f2.:m c4:7/e c2:maj7
    }
    \new Staff { \key aes \major \time 3/4 c'4 aes'2 c'4 bes'2 }
  >>
  \layout { }
}
%%%%%%%%%%%%%%

Does that do what you want? I couldn’t test it with the actual font, of course, only with LilyPond’s default Sans font. So you’ll likely have to adjust the numerical values in lines 6 and 27–29 to taste. See <http://lilypond.org/doc/v2.18/Documentation/notation/text-markup-commands> for documentation on the markup commands (you can also look them up in the index, section D of the Notation Reference).
You can fitfully use the \layout {} block in a stylesheet (i.e., a separate .ily file to \include everywhere you want this kind of chord names display).

HTH, Simon


Attachment: slashchordtest.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]