How to parenthesise bass note in chord symbol?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to parenthesise bass note in chord symbol?

Peter Crighton
Hello all,

I need the bass note of a chord symbol to be in parentheses, like so:
C(/G)

How could I achieve this? I am, sadly, clueless.

\version "2.19.82"
\new ChordNames {
  \chordmode {
    % like this, but with only the /G in parentheses -> C(/G)
    \parenthesize c1/g
  }
}

Thanks,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

Thomas Morley-2
Am Sa., 6. Okt. 2018 um 23:48 Uhr schrieb Peter Crighton
<[hidden email]>:

>
> Hello all,
>
> I need the bass note of a chord symbol to be in parentheses, like so:
> C(/G)
>
> How could I achieve this? I am, sadly, clueless.
>
> \version "2.19.82"
> \new ChordNames {
>   \chordmode {
>     % like this, but with only the /G in parentheses -> C(/G)
>     \parenthesize c1/g
>   }
> }
>
> Thanks,
> Peter

Hi,

probably:

\new ChordNames
  \chordmode {
    \set slashChordSeparator = ""
    \set chordNoteNamer =
    #(lambda (pitch lowercase?)
      (make-line-markup (list "(/" (note-name->markup pitch lowercase?) ")")))
    c/fis
    c/g
  }

HTH,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

David Kastrup
Thomas Morley <[hidden email]> writes:

> Am Sa., 6. Okt. 2018 um 23:48 Uhr schrieb Peter Crighton
> <[hidden email]>:
>>
>> Hello all,
>>
>> I need the bass note of a chord symbol to be in parentheses, like so:
>> C(/G)
>>
>> How could I achieve this? I am, sadly, clueless.
>>
>> \version "2.19.82"
>> \new ChordNames {
>>   \chordmode {
>>     % like this, but with only the /G in parentheses -> C(/G)
>>     \parenthesize c1/g
>>   }
>> }
>>
>> Thanks,
>> Peter
>
> Hi,
>
> probably:
>
> \new ChordNames
>   \chordmode {
>     \set slashChordSeparator = ""
>     \set chordNoteNamer =
>     #(lambda (pitch lowercase?)
>       (make-line-markup (list "(/" (note-name->markup pitch lowercase?) ")")))

I'd have said make-concat-markup instead of make-line-markup, but it
would appear that word space is removed anyway.  Seems a bit weird to
me.

>     c/fis
>     c/g
>   }

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

Thomas Morley-2
Am So., 7. Okt. 2018 um 00:55 Uhr schrieb David Kastrup <[hidden email]>:

>
> Thomas Morley <[hidden email]> writes:
>
> > Am Sa., 6. Okt. 2018 um 23:48 Uhr schrieb Peter Crighton
> > <[hidden email]>:
> >>
> >> Hello all,
> >>
> >> I need the bass note of a chord symbol to be in parentheses, like so:
> >> C(/G)
> >>
> >> How could I achieve this? I am, sadly, clueless.
> >>
> >> \version "2.19.82"
> >> \new ChordNames {
> >>   \chordmode {
> >>     % like this, but with only the /G in parentheses -> C(/G)
> >>     \parenthesize c1/g
> >>   }
> >> }
> >>
> >> Thanks,
> >> Peter
> >
> > Hi,
> >
> > probably:
> >
> > \new ChordNames
> >   \chordmode {
> >     \set slashChordSeparator = ""
> >     \set chordNoteNamer =
> >     #(lambda (pitch lowercase?)
> >       (make-line-markup (list "(/" (note-name->markup pitch lowercase?) ")")))
>
> I'd have said make-concat-markup instead of make-line-markup, but it
> would appear that word space is removed anyway.  Seems a bit weird to
> me.

Well, word-space is set to 0.0 in the ChordName-grob.
Current definitions for the ChordName uses line-markup with
0.0-word-space at several instances.
Sometimes inserting adjusted hspace-markup where wished (see:
accidental->markup-italian and conditional-kern-before).
Also chordNameSeparator is set to a hspace-markup.

Current implementation obviously is done caring about different
horizontal spacing-wishes.
Not sure whether it's the best possible coding using zero word-space
and adjusted hspace-markups.

Honestly, I stopped any attempt to improve current situation after
"Improving ChordNames" became a GSoC-project.

Cheers,
  Harm


>
> >     c/fis
> >     c/g
> >   }
>
> --
> David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

Peter Crighton
In reply to this post by Thomas Morley-2
On Sun, 7 Oct 2018 at 00:27, Thomas Morley <[hidden email]> wrote:
Am Sa., 6. Okt. 2018 um 23:48 Uhr schrieb Peter Crighton
<[hidden email]>:

>
> Hello all,
>
> I need the bass note of a chord symbol to be in parentheses, like so:
> C(/G)
>
> How could I achieve this? I am, sadly, clueless.
>
> \version "2.19.82"
> \new ChordNames {
>   \chordmode {
>     % like this, but with only the /G in parentheses -> C(/G)
>     \parenthesize c1/g
>   }
> }
>
> Thanks,
> Peter

Hi,

probably:

\new ChordNames
  \chordmode {
    \set slashChordSeparator = ""
    \set chordNoteNamer =
    #(lambda (pitch lowercase?)
      (make-line-markup (list "(/" (note-name->markup pitch lowercase?) ")")))
    c/fis
    c/g
  }

HTH,
  Harm

Thanks!
How would I go about either shifting the parentheses vertically or making them smaller? They probably make sense how they are now with regard to sharps/flats and possible lowercase letters, but they still look off, especially with the C(/G) example. Although I’m just realising – looking at the characters I just typed in – that such alignment of parentheses is probably typographically common. I would have expected them to be exactly as tall as all other characters in the example.

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

Thomas Morley-2
Am So., 7. Okt. 2018 um 19:53 Uhr schrieb Peter Crighton
<[hidden email]>:

> How would I go about either shifting the parentheses vertically or making them smaller? They probably make sense how they are now with regard to sharps/flats and possible lowercase letters, but they still look off, especially with the C(/G) example. Although I’m just realising – looking at the characters I just typed in – that such alignment of parentheses is probably typographically common. I would have expected them to be exactly as tall as all other characters in the example.

A ChordName is not a simple line of characters, but a tailored markup,
containing strings and musicglyphs, additional they are used with
different fontsize and probably raised etc.
Look at the far simpler
\markup { "(/" \sharp ")" }
to get an impression ...

Nevertheless, you can adjust fontsize and apply \raise (and what ever you like).
To make it more easy I switched (partly) to ly-syntax for the chordNoteNamer:

\new ChordNames
  \chordmode {
    \set slashChordSeparator = ""
    \set chordNoteNamer =
      #(lambda (pitch lowercase?)
        #{
          \markup {
            \fontsize #-1.5 \raise #0.21 "("
            "/"
            #(note-name->markup pitch lowercase?)
            \fontsize #-1.5 \raise #0.21 ")"
          }
        #})

    cis:5.9.13/fis
    c/g
  }

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to parenthesise bass note in chord symbol?

Peter Crighton
On Sun, 7 Oct 2018 at 21:12, Thomas Morley <[hidden email]> wrote:
Am So., 7. Okt. 2018 um 19:53 Uhr schrieb Peter Crighton
<[hidden email]>:

> How would I go about either shifting the parentheses vertically or making them smaller? They probably make sense how they are now with regard to sharps/flats and possible lowercase letters, but they still look off, especially with the C(/G) example. Although I’m just realising – looking at the characters I just typed in – that such alignment of parentheses is probably typographically common. I would have expected them to be exactly as tall as all other characters in the example.

A ChordName is not a simple line of characters, but a tailored markup,
containing strings and musicglyphs, additional they are used with
different fontsize and probably raised etc.
Look at the far simpler
\markup { "(/" \sharp ")" }
to get an impression ...

Nevertheless, you can adjust fontsize and apply \raise (and what ever you like).
To make it more easy I switched (partly) to ly-syntax for the chordNoteNamer:

\new ChordNames
  \chordmode {
    \set slashChordSeparator = ""
    \set chordNoteNamer =
      #(lambda (pitch lowercase?)
        #{
          \markup {
            \fontsize #-1.5 \raise #0.21 "("
            "/"
            #(note-name->markup pitch lowercase?)
            \fontsize #-1.5 \raise #0.21 ")"
          }
        #})

    cis:5.9.13/fis
    c/g
  }

Cheers,
  Harm

Thanks a lot! Scheme still always throws me off … 

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user