[Top][All Lists]

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

Re: Jazz Chord Symbols (as new font - NOT notation font)

From: Aaron Hill
Subject: Re: Jazz Chord Symbols (as new font - NOT notation font)
Date: Wed, 03 Jul 2019 16:45:52 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-07-03 3:12 pm, Marco Baumgartner wrote:
You're saying, that once I have my font finished, I can use it as \markup
OR as ChordName?

Technically, you are always generating a ChordName grob if you are using a ChordNames context, but you can easily override the text property of any individual grob to be whatever you want it to be should the value that LilyPond generates not be suitable. It is a little verbose, though:

\version "2.19.82"

\new ChordNames \chordmode {
  \once \override ChordName.text = \markup \circle "C" c4

If you do this a lot, then a helper function would be good:

\version "2.19.82"

chordText = #(define-music-function (text) (markup?)
  #{ \once \override ChordName.text = $text #})

\new ChordNames \chordmode {
  \chordText \markup \box "C" c4

But wouldn't ChordName mess with my font then?
Like forcing its own spacing and such?

It might depending on how the resulting markup is generated. Consider a chord like C# minor. By default, LilyPond would generate something akin to:

    \markup { "C" \smaller \raise #0.6 \sharp "m" }

Only the "C" and "m" would be using the text font whereas the sharp will come from the notation font.

It is possible to change how ChordNames are built so that you can customize elements like alterations. See LSR snippet 750 [1].


With some modifications to the aforementioned snippet, you could potentially end up with an effective markup like this:

    \markup { "C#" "m" }

With the "C" and "#" in one string, ligatures and kerning should work (assuming you have them for alterations and note names). Since the "m" will typically get appended as its own string, it would be unaffected by ligatures and/or kerning. With more modification to the chord naming procedures, you likely could get output similar to:

    \markup { "C#m" }

NOTE: Similar things will be adjusted to support the slash separator as well, so that you could get a single string like "C#m/E" so your font's logic could handle this.

The question is whether it is worth changing any of the existing plumbing or if using custom text overrides is easier.

-- Aaron Hill

reply via email to

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