Re: Overriding staff-padding for MeasureCounter fails

2014-02-15 Thread Ed Gordijn

Hi Keith,


The code that implements staff-padding is used only when requested with

  \override MeasureCounter #'Y-offset =
#side-position-interface::y-aligned-side


Thank you, this works. Would it be useful to enhance the current snippet 
Numbering groups of measures. See the attachment.


Greetings, Ed
%% Generated by lilypond-book.py
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include lilypond-book-preamble.ly


% 
% Start cut--pastable-section
% 



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.00) (* mm 1))
}

%{
\layout {
  
}
%}




% 
% ly snippet:
% 
\sourcefilename numbering-groups-of-measures.ly
\sourcefileline 0
% DO NOT EDIT this file manually; it is automatically
% generated from Documentation/snippets/new
% Make any changes in Documentation/snippets/new/
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
%% Note: this file works from version 2.17.7
\version 2.18.0

\header {
%% Translation of GIT committish: 4d9770a67176122b9779426cf540ad1694f07f61
  texidoces = 
Este fragmento de código muestra el uso del grabador
@code{Measure_counter_engraver} para numerar grupos de compases
sucesivos.  Se puede numerar cualquier período de compases tanto si
tiene repeticiones como si no.

Se debe añadir el grabador al contexto adecuado.  Aquí se usa un
contexto @code{Staff}; otra posibilidad sería un contexto
@code{Dynamics}.

El contador se inicia con @code{\\startMeasureCount} y finaliza con
@code{\\stopMeasureCount}.  La numeración comienza con @code{1}, de
forma predeterminada, pero se puede modificar este comportamiento
sobreescribiendo la propiedad @code{count-from}.

Cuando un compás se extiende más allá de un salto de línea, el número
aparece dos veces, la segunda vez entre paréntesis.


  doctitlees = Numerar grupos de compases

  lsrtags = contexts-and-engravers, editorial-annotations, repeats, staff-notation

  texidoc = 
This snippet demonstrates the use of the @code{Measure_counter_engraver} to
number groups of successive measures.  Any stretch of measures may be numbered,
whether consisting of repetitions or not.

The engraver must be added to the appropriate context.  Here, a @code{Staff}
context is used; another possibility is a @code{Dynamics} context.

If you want to manualy overide the @code{staff-padding} you must enable
the @code{side-position-interface} as well.

The counter is begun with @code{\\startMeasureCount} and ended with
@code{\\stopMeasureCount}.  Numbering will start by default with @code{1}, but
this behavior may be modified by overriding the @code{count-from} property.

When a measure extends across a line break, the number will appear twice, the
second time in parentheses.


  doctitle = Numbering groups of measures
} % begin verbatim


\layout {
  \context {
\Staff
\consists #Measure_counter_engraver
\override MeasureCounter #'Y-offset = #side-position-interface::y-aligned-side
  }
}

\new Staff {
  \startMeasureCount
  \repeat unfold 7 {
c'4 d' e' f'
  }
  \stopMeasureCount
  \bar ||
  g''4 f'' e'' d''
  \override Staff.MeasureCounter.count-from = #2
  \startMeasureCount
  \override Staff.MeasureCounter.staff-padding = #1
  \repeat unfold 5 {
g''4 f'' e'' d''
  }
  g''4 f''
  \bar 
  \break
  e''4 d''
  \repeat unfold 7 {
g''4 f'' e'' d''
  }
  \stopMeasureCount
}



% 
% end ly snippet
% 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Overriding staff-padding for MeasureCounter fails

2014-02-14 Thread Ed Gordijn

Hi,

I tried to align the numbers of the MeasureCounter engraver but the 
override doesn't have effect. Is this a bug or am I doing something 
wrong here?


Greetings, Ed


\version 2.18.0

{
  \override Staff.MeasureCounter.staff-padding = #4
  \startMeasureCount
  \repeat percent 4 { g''4 g'' g'' g'' }
  \stopMeasureCount
}

\layout {
  \context {
\Staff
\consists #Measure_counter_engraver
% \override MeasureCounter.staff-padding = #4  % doesn't work either
  }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Overriding staff-padding for MeasureCounter fails

2014-02-14 Thread David Nalesnik
Hi,


On Fri, Feb 14, 2014 at 3:33 AM, Ed Gordijn ed.klari...@gmail.com wrote:

 Hi,

 I tried to align the numbers of the MeasureCounter engraver but the
 override doesn't have effect. Is this a bug or am I doing something wrong
 here?

 Greetings, Ed


 \version 2.18.0

 {
   \override Staff.MeasureCounter.staff-padding = #4
   \startMeasureCount
   \repeat percent 4 { g''4 g'' g'' g'' }
   \stopMeasureCount
 }

 \layout {
   \context {
 \Staff
 \consists #Measure_counter_engraver
 % \override MeasureCounter.staff-padding = #4  % doesn't work either
   }
 }


Huh--that's strange.  This will involve some investigation to get at the
cause, determine if there's a bug.

Anyway, overriding outside-staff-padding instead should give you what you
want:

\override Staff.MeasureCounter.outside-staff-padding = #4

HTH,
David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Overriding staff-padding for MeasureCounter fails

2014-02-14 Thread Ed Gordijn

Hi David,

Huh--that's strange.  This will involve some investigation to get at 
the cause, determine if there's a bug.


Anyway, overriding outside-staff-padding instead should give you what 
you want:


\override Staff.MeasureCounter.outside-staff-padding = #4


This has effect but the numbers don't align. The padding is relative to 
the notes as well.


Greetings, Ed

attachment: bug measurecounter.png\version 2.18.0

{
  %\override Staff.MeasureCounter.staff-padding = #4  doesn't work
  \override Staff.MeasureCounter.outside-staff-padding = #2
  % \override Staff.MeasureCounter.count-from = #2 %this works
  \startMeasureCount
  \repeat percent 4 { g''4 g'' g'' g'' }
  \stopMeasureCount
}

\layout {
  \context {
\Staff
\consists #Measure_counter_engraver
% \override MeasureCounter.staff-padding = #4  % doesn't work either
  }
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Overriding staff-padding for MeasureCounter fails

2014-02-14 Thread David Nalesnik
Hi Ed,


On Fri, Feb 14, 2014 at 8:05 AM, Ed Gordijn ed.klari...@gmail.com wrote:

 Hi David,


  Huh--that's strange.  This will involve some investigation to get at the
 cause, determine if there's a bug.

 Anyway, overriding outside-staff-padding instead should give you what you
 want:

 \override Staff.MeasureCounter.outside-staff-padding = #4


 This has effect but the numbers don't align. The padding is relative to
 the notes as well.


True.  In that case your best bet its to use a Dynamics context:



\version 2.18.0

 \layout {

  \context {

\Dynamics

\consists #Measure_counter_engraver

% to control the distance of the Dynamics context from the staff:

\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #4

  }

}


 

  \new Dynamics {

\startMeasureCount

s1*4

\stopMeasureCount

  }

  \new Staff {

\repeat percent 4 { g''4 g'' g'' g'' }

  }







(Based on Centered measure numbers
http://www.lilypond.org/doc/v2.19/Documentation/snippets/repeats)


--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Overriding staff-padding for MeasureCounter fails

2014-02-14 Thread Keith OHara
David Nalesnik david.nalesnik at gmail.com writes:

 On Fri, Feb 14, 2014 at 3:33 AM, Ed Gordijn ed.klarinet at gmail.com 
wrote:Hi,
     % \override MeasureCounter.staff-padding = #4  % doesn't work either
 
 Huh--that's strange.  This will involve some investigation to get at the 
cause, determine if there's a bug.

The code that implements staff-padding is used only when requested with

 \override MeasureCounter #'Y-offset = 
   #side-position-interface::y-aligned-side



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user