Aligning the vertical spacing of markups attached to notes

19 views
Skip to first unread message

Jonathan Myers

unread,
Apr 20, 2021, 1:13:29 PM4/20/21
to abjad-user
Hi all,

I'm putting together some materials for students in an intro music theory class. I've made a series of chords and I'd like to place roman numerals beneath each one. Currently, I am carrying this out by making markup objects and attaching them to notes on my bass staff like this:

_V_ = abjad.Markup('V', direction=abjad.Down)
_i_ = abjad.Markup('i', direction=abjad.Down)
abjad.attach(_V_, bass_notes[0])
abjad.attach(_i_, bass_notes[1])

This works, but the vertical spacing is dependant on the position of the notehead that each markup is attached to, which looks pretty bad:
What is the best way to have these roman numeral be at a consistent vertical alignment?

Thanks!
Jon 
Screen Shot 2021-04-20 at 10.08.57 AM.png

Martín Rincón Botero

unread,
Apr 20, 2021, 1:41:12 PM4/20/21
to Abjad-User
Hi Jonathan,

one option is to override the staff padding. Another option you can try is to put all harmonic functions in a Lyrics context. This last option is probably the best one to try. If you need anything fancier, David Nalesnik has a special tool for that https://github.com/davidnalesnik/lilypond-roman-numeral-tool . I haven’t tried it myself though.

Martín.


--
You received this message because you are subscribed to the Google Groups "abjad-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abjad-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/f77ae1f9-2693-4fc3-a051-6008ab988348n%40googlegroups.com.

Gilberto Agostinho

unread,
Apr 23, 2021, 6:51:18 AM4/23/21
to abjad...@googlegroups.com

Hi Jon,

I think this is just a matter of applying the right amount of padding to TextScript. Compare:

{
    <c' e' g'>2_"I" <b d' g'>_"V" <a c' f'>_"IV" <g b d'>_"V"
}
{
    \override TextScript.padding = #3.5
    <c' e' g'>2_"I" <b d' g'>_"V" <a c' f'>_"IV" <g b d'>_"V"
}

Producing: https://i.postimg.cc/j5W4g6WV/Screenshot-from-2021-04-20-18-22-46.png

So in Abjad, you can just attach a padding override to the first note of your bass line. Hope this helps.

Cheers,
Gilberto

Reply all
Reply to author
Forward
0 new messages