lilypond-user
[Top][All Lists]
Advanced

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

Re: Replace clef symbol


From: Thomas Morley
Subject: Re: Replace clef symbol
Date: Sun, 14 Sep 2014 12:56:34 +0200

2014-09-13 21:31 GMT+02:00 Jakob Schöttl <address@hidden>:
> Hello,
>
> I'd like to have a staff in violin clef but not with a violin clef symbol
> but a tabulature symbol. Only another SYMBOL should be displayed!
>
> This is for a tabulature for diatonic harmonica. And I have to write it in
> normal violin clef because I use Python with Abjad which can only output
> notes in violin clef today.
>
> I found out how do hide the violin clef:
>
> \version "2.19.7"
> {
>    %\omit Staff.Clef % like CSS display:none
>    %\hide Staff.Clef % like CSS visibility:hidden
>    c1 \break c
> }
>
>
> But how can I display one of this tabulature symbols instead in a normal
> staff:
>
> \version "2.19.7"
> \new TabStaff { \clef tab s \clef moderntab }
>
> ?Thanks!
>
> -- Jakob

How about the code below.
Comments included.

%%%%%%%%%%%%%%%%%%%%%%%%%


\version "2.18.2"

%% Print @code{\clef moderntab}, if wanted
\layout {
  \context {
    \Staff
    \override Clef.stencil =
      #clef::print-modern-tab-if-set
  }
}

clef-settings = {
    \set Staff.middleCPosition = #-6
    \set Staff.middleCClefPosition = #-6
}

%%%%%%%%%%%%%%%
%% EXAMPLES
%%%%%%%%%%%%%%%

{
   \key bes \major

   %% adjust the glyph
   \override Staff.Clef.font-size = #-3
   \clef tab
   %% must be inserted after @code{\clef tab}
   %% in order to override the predefined settings of
   %% @code{\clef tab}
   \clef-settings

   c1 \break cis'
}

{
   \key bes \major

   %% @code{\clef moderntab} adjusts automatically
   %% see `customTabClef' in tablature.scm
   \clef moderntab
   %% must be inserted after @code{\clef moderntab}
   %% in order to override the predefined settings of
   %% @code{\clef moderntab}
   \clef-settings

   c1 \break cis'
}

{
  \key bes \major
  \override Staff.Clef.font-size = #-3
  \clef tab
  \clef-settings
  cis'
  \revert Staff.Clef.font-size
  \clef moderntab
  \clef-settings
  des'
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%

HTH,
  Harm



reply via email to

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