This works perfectly! Thanks ever so much.
If anyone is curious to see how this looks, I have a sight-singing blog, http://moveabledo.com Moveable Do , that I'm putting together using Lilypond and some other resources. Best, - Eugene Neil Puttock wrote: > > On 7 March 2011 21:11, emw <ewal...@weisswalden.com> wrote: > >> If anyone can help me write a Scheme tweak for this, I'd appreciate it. >> Even >> pointing me to a tweak that does some of the same things would be helpful >> (i.e. tweaking output across an entire Staff in a StaffGroup, etc). > > Each Staff context contains a grouping object (a VerticalAxisGroup) > which carries all the elements on the stave. You can extract the > bounding box for this and print a solid coloured box as its stencil > (which is usually unset): > > \version "2.12.3" > > highlight = { > \override Staff.VerticalAxisGroup #'layer = #-1 > \override Staff.VerticalAxisGroup #'stencil = > #(lambda (grob) > (let ((x-ext (ly:grob-property grob 'X-extent)) > (y-ext (ly:grob-property grob 'Y-extent))) > (grob-interpret-markup grob > (markup #:with-color yellow > #:filled-box x-ext y-ext 0)))) > } > > \new StaffGroup << > \new Staff \relative c' { > c1 > } > \new Staff \relative c' { > \highlight > c1 > } >>> > > If you're running 2.13, defining \highlight as a context modification > makes it easier to add to other contexts such as Lyrics: > > \version "2.13.53" > > highlight = \with { > \override VerticalAxisGroup #'layer = #-1 > \override VerticalAxisGroup #'stencil = > #(lambda (grob) > (let ((x-ext (ly:grob-property grob 'X-extent)) > (y-ext (ly:grob-property grob 'Y-extent))) > (grob-interpret-markup grob > (markup #:with-color yellow > #:filled-box x-ext y-ext 0)))) > } > > \new StaffGroup << > \new Staff \new Voice = "melody" \relative c' { > c1 > } > \new Lyrics \highlight \lyricsto "melody" { > foo > } > \new Staff \relative c' { > c1 > } > \new Staff \highlight \relative c' { > c1 > } >>> > > Cheers, > Neil > > > _______________________________________________ > lilypond-devel mailing list > lilypond-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/lilypond-devel > > -- View this message in context: http://old.nabble.com/Scheme-Tweak-Help%3A-Highlighting-a-Staff-in-a-StaffGroup-tp31091731p31130224.html Sent from the Gnu - Lilypond - Dev mailing list archive at Nabble.com. _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel