"\with { }" block with overrides when creating a Staff?

18 views
Skip to first unread message

padovani

unread,
Sep 21, 2021, 8:38:57 AM9/21/21
to abjad...@googlegroups.com
Hi,

I would like to create a Staff and override some properties as we usually do in LilyPond using a "\with { } " block after creating a Context...

For example, something like this:
\new Staff = "staffname" \with {
     \override StaffSymbol #'color = #(x11-color 'grey)
     \override StaffSymbol #'line-count = #5
     \override StaffSymbol #'line-positions = #'(-4 10 13.6 14.2 15)
{
...
}

Is there a method or some kind of way to do this using abjad methods?

thanks!

padovani

unread,
Sep 21, 2021, 9:37:17 AM9/21/21
to abjad...@googlegroups.com
Oh, just found it! Nevermind...

Here it is in case anyone gets confused like me.

abjad.override(cym_cowStaff).StaffSymbol.color = r"""#(x11-color 'grey)"""
abjad.override(cym_cowStaff).StaffSymbol.line_count = 4
abjad.override(cym_cowStaff).StaffSymbol.line_positions = r"""#'(-4 10 13.6 14.2 15)"""

thanks!


Reply all
Reply to author
Forward
0 new messages