lilypond-user
[Top][All Lists]
Advanced

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

Re: Instrument Name Not Appearing


From: SoundsFromSound
Subject: Re: Instrument Name Not Appearing
Date: Sat, 2 Dec 2017 19:54:56 -0700 (MST)

Robin Bannister-2 wrote
> Well, in 2009 Neil Puttock said you can't, and said why.
> http://lists.gnu.org/archive/html/lilypond-user/2009-03/msg00123.html
> If that still applies, you will need a workaround.
> 
> The X-offset workaround suggested there seems very fragile.
> 
> So here is a hack that hangs a markup on the left side of the ossia.
> It needs some fine tuning, but should illustrate the principle.
> 
> 
> Cheers,
> Robin

Hi Robin,

Thank you for the code workaround. 

Do you know how I could use your snippet and adjust the instrument name
vertically as well? 

I'd like to move it down a bit so it's centered with the middle staff line,
like the other names are. Is this possible? 

I don't quite understand the Scheme aspect in your example, like how I would
go about adding the Y somehow (in the addOssia "2" area, or up in the
function?)

Thanks!

%%%%%%%%%
\version "2.19.80"

addOssiaName =                                                    
#(define-scheme-function (name padding) (markup? number?) 
  #{
    \override Staff.StaffSymbol.stencil = #(lambda (grob)
      (ly:stencil-combine-at-edge (ly:staff-symbol::print grob)
        X LEFT (grob-interpret-markup grob name) padding))     
  #})

  
\score {
  <<
    \new Staff = "Testing"
    \with { instrumentName = "Top"  }
    \relative c'' { c1 | c | c | c |  }
   
    \new StaffGroup
    \relative c'' {
      \new Staff \with { instrumentName = "Bottom"  }
      { c1 | c <<
      { c1 | d  }
     
      \new Staff \with { alignAboveContext = "Testing" }                        
       
          { \once \omit Staff.TimeSignature 
            \addOssiaName "Violin" 2
             c1 | b }
                    >>
      }
    }
  >>
}




-----
composer | sound designer | asmr artist 
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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