Re: Headers Placement

2013-01-19 Thread Jérôme Plût
Decimo quinto Kalendas Februarias MMXIII scripsit Thomas Morley :
 LilyPond supports two kinds of headers: book-header and score-header.
 
 a) book-header (top-level!):
 
 \header { ... }
 \score { ... }
 
 b) score-header:
 
 \score {
   some-music
   \header { ... }
 }

I was going to ask more or less the same question as Mark, so thanks
for the explanation. I find the whole header system extremely
confusing (for example, why must the score-header be at the *end* of
the corresponding score, this is a mystery) and would prefer
sectioning commands that work in the LaTeX way, inserting markup where
they are called instead of defining some magic values:

\title #'((title . Concerto) (author . Me))

\title #'((section . I. Allegro ma non troppo))

\score { ... }

\title #'((section . II. Andantino))

\score { ... }

This I can do with Scheme, but maybe something equivalent already
exists?

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


Re: Headers Placement

2013-01-19 Thread Nick Payne

On 19/01/13 19:42, Jérôme Plût wrote:

Decimo quinto Kalendas Februarias MMXIII scripsit Thomas Morley :

LilyPond supports two kinds of headers: book-header and score-header.

a) book-header (top-level!):

\header { ... }
\score { ... }

b) score-header:

\score {
   some-music
   \header { ... }
}

I was going to ask more or less the same question as Mark, so thanks
for the explanation. I find the whole header system extremely
confusing (for example, why must the score-header be at the *end* of
the corresponding score, this is a mystery) and would prefer
sectioning commands that work in the LaTeX way, inserting markup where
they are called instead of defining some magic values:

\title #'((title . Concerto) (author . Me))

\title #'((section . I. Allegro ma non troppo))

\score { ... }

\title #'((section . II. Andantino))

\score { ... }

This I can do with Scheme, but maybe something equivalent already
exists?


You can use bookparts, as in the attached example. Header fields 
redefined in a bookpart header override those in the overall header.


Nick
\version 2.17.6

date = #(strftime %d/%m/%Y (localtime (current-time)))

\paper {
	#(define (print-positive-page-number layout props arg)
		(if ( (chain-assoc-get 'page:page-number props -1) 0)
			(create-page-number-stencil layout props arg)
			empty-stencil))

	#(define (not-last-page layout props arg)
		(if (and (chain-assoc-get 'page:is-bookpart-last-page props #f)
			(chain-assoc-get 'page:is-last-bookpart props #f))
			empty-stencil
			(interpret-markup layout props arg)))

	first-page-number = -1
	oddHeaderMarkup = \markup \fill-line {   }
	evenHeaderMarkup = \markup \fill-line {   }
	oddFooterMarkup = \markup \fill-line { \column { \fontsize #-1
		\on-the-fly #not-first-page \on-the-fly #not-last-page 
		\on-the-fly #print-positive-page-number \fromproperty #'page:page-number-string
		\on-the-fly #last-page \fromproperty #'header:tagline
	} }
	evenFooterMarkup = \markup \fill-line { \column { \fontsize #-1
		\on-the-fly #not-first-page \on-the-fly #not-last-page 
		\on-the-fly #print-positive-page-number \fromproperty #'page:page-number-string
		\on-the-fly #last-page \fromproperty #'header:tagline
	} }
}

\header {
	title = Overall Title
	subtitle = \markup { 
		\left-align \center-column {
			Overall Subtitle
			\lower #2   % to space ToC away from title/subtitle
		}
	}
	tagline = \markup {
		\fontsize #-3.5 {
			\override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column {
\line {
	Engraved on \date using \with-url #http://lilypond.org/;
	\line {
		LilyPond \simple #(lilypond-version) (http://lilypond.org/)
	}
}
			}
		}
	}
}

\markuplist \table-of-contents
\pageBreak
\markup \null

\bookpart {
	\paper {
		print-page-number = ##t
	}
	\header { 
		title = Piece One % overrides overall title
		subtitle = ##f % prevent overall subtitle from appearing
		composer = Composer One
	} 
	\tocItem \markup { 1. Piece One }
	\relative c' { c1 }
}

\bookpart {
	\paper {
		print-page-number = ##t
	}
	\header { 
	  title = ##f % prevent overall title appearing for this piece
		subtitle = Piece Two % overrides overall subtitle
		composer = Composer Two
	}
	\tocItem \markup { 1. Piece Two }
	\relative c' { c1 }
}

\bookpart {
	\paper {
		print-page-number = ##t
	}
	\header {
		subtitle = Piece Three 
		composer = Composer Three
	}
	\tocItem \markup { 3. Piece Three }
	\relative c' { c1 }
}

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


Re: tupletSpannerDuration

2013-01-19 Thread David Kastrup
Nick Payne nick.pa...@internode.on.net writes:

 On 19/01/13 18:04, Mark Stephen Mrotek wrote:

 Hello:

 From the manual:

 \relative c' {

 \time 2/4

 \set tupletSpannerDuration = #(ly:make-moment 1 4)

 \times 2/3 { c8 c c c c c }

 }

 I understand everything except how the “1” and “4” relate to
 the notation.
 

 Have a look at the section of the documentation on time administration
 (http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmic-
 concerns#time-administration): ly:make-moment n m constructs a
 duration of n/m of a whole note. For example, ly:make-moment 1 8 is an
 eighth note duration and ly:make-moment 7 16 is the duration of seven
 sixteenths notes.

 BTW, both #(ly:make-moment 1 4) and #(ly:make-moment 1/4) are valid,
 and both forms can be found in the documentation (see
 http://lilypond.org/doc/v2.17/Documentation/learning/types-of-properties)
 for examples of the second.

Probably because I wrote that.

 Is one form preferred over the other? If so, maybe that should be
 consistently used throughout the documentation.

The rational form is pretty new.  There actually was one previous
occurence of (ly:make-moment 0 0) in the part combiner, and by a
combination of shoestring and magic it actually managed to do the
intended thing, more by accident than anything else.

The change was
commit 9d1653ba738b9a9d6cf1ff4502f875988f632503
Author: David Kastrup d...@gnu.org
Date:   Mon Jul 23 12:25:26 2012 +0200

Issue 2692: Let ly:make-moment accept rationals for main and grace timing

For compatibility reasons, it remains possible to write two numbers
specifying numerator and denominator instead of the rationals.  These
forms cannot be mixed, and the two-argument form is disambiguated by
the sign of the second argument: if it is positive, it can only be a
denominator and not a grace timing.

so it already was done in 2.15.42 (huh, would have thought it was 2.17
material).  However, there has been no systematic attempt of making the
other code and the documentation follow suit.  I actually am a bit
surprised since I distinctly remember juggling with some convert-ly
patterns, but it would seem that I never got around to finishing the
change.

At any rate, due to its better mnemonic value (and the availability of
ly:moment-main and ly:moment-grace also from around that time), I think
we should preferably aim for the rational form.

-- 
David Kastrup


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


RE: Unwanted new page at end of score

2013-01-19 Thread Peter Gentry
Thanks for your reply James. The trouble is the issue dosen't appear without 
the whole score.
 
My problem was that the last but one page had space at the bottom of the page 
for another line of score but this had been shunted
onto a new page. When I tried to control matters with \pageBreak or \pageTurn I 
enterd the problem of herding cats as far as the
page layouts was concerned.
 
After much puzzlement I finally got some sense by using only \pageTurn in the 
music files. Is there any way of changing spacing
between lines of music at arbitray places in the music data. I seem to be stuck 
with setting spacing globally for all movememnts.
 
By the way I have found that changing padding is the easiest way to control 
the vertical spacing - but would like to do it on the
fly as it where.


  _  

From: james [mailto:james.lilyp...@googlemail.com] 
Sent: Wednesday, January 16, 2013 9:03 PM
To: Peter Gentry
Cc: lilypond-user@gnu.org
Subject: Re: Unwanted new page at end of score



On Jan 16, 2013, at 12:45 PM, Peter Gentry wrote:


I cannot suppress a page break which looks unnecessary - what am I doing wrong?.

I have included the example in the attached file which I hope does not contain 
too much unnecessary data.

I would welcome helpful advice on presenting such information to the list.

regards
Peter Gentry 

Last page spacing issue.xml



Out of curiosity, I decided to see what was in the file, yeah, I'm avoiding 
work I should be doing.
I'd say this looks like a debug report, for some reason sent as an .xml file 
created by microsoft word so as to make it readable
across systems. It even includes an image of what the output is. 
The code included will not compile as-is. If you include code, even in an 
attached file, please make sure that it can compile on its
own, independent of any other settings. Ideally, the code would contain just 
enough information to make the problem apparent. This
goes under the heading, Creating  
http://www.lilypond.org/doc/v2.17/Documentation/web/tiny-examples Tiny 
Examples. (Note the bit
that says you should include which version you're using.) 
In this case, you would need a file that includes enough information to show 
that the music is on two pages. Or at the very least,
what overrides you've set to try and reduce the number of pages. 
The best I can make of this is this:
\paper {
annotate-spacing = ##t
two-sided = ##t
top-margin = 10\mm
bottom-margin = 10\mm 
inner-margin = 20 \mm
outer-margin = 15 \mm
binding-offset = 5 \mm
first-page-number = #1
blank-after-score-page-force = #100 % no change in output whatever value is 
specified here
page-breaking = #ly:page-turn-breaking 
ragged-bottom = ##t 
indent = 5\mm
print-page-number = ##t
print-first-page-number = ##f
oddHeaderMarkup = \markup \null
evenHeaderMarkup = \markup \null
oddFooterMarkup = \markup {
\fill-line {
\null \fontsize #2 \fromproperty #'header:mycustomtext 
\on-the-fly #print-page-number-check-first
\fontsize #2 \fromproperty #'page:page-number-string
} % end of fill line 
} % end of markup block
evenFooterMarkup = \oddFooterMarkup
} % end of paper block

\score {
   {
  \mark \default d''8 \f [ bes'8 bes'8 bes'8 ] c''8 [ bes'8 d''8 bes'8 ] | 
% 236
  ees''8 [ g''8 ees''8 c''8 ] d''8 [ c''8 e''8 c''8 ] | % 237
  f''8 [ c''8 a''8 f''8 ] g''8 [ f''8 a''8 f''8 ] | % 238
  bes''8 [ f''8 bes''8 f''8 ] c''8 [ f''8 d''8 f''8 ] | % 239
  ees''4 r4 r2 | % 240
  f''2 \p ( e''4 ees''4 ) | % 241
  d''4 r4 r2 | % 242
  r8 f''8 [ f''8 f''8 ] f''8 [ ees''8 d''8 c''8 ] | % 243
  bes''8 r4. r2 | % 244
  f'2 ( e'4 ees'4 | % 245
  d'4 ) r4 r2 | % 246
  r8 f''8 [ f''8 f''8 ] f''8 [ ees''8 d''8 c''8 ] | % 247
  bes'4 r4 r2 | % 248
  f''2 ( e''4 ees''4 ) | % 249
  d''4 r4 r2 | % 250
  d''2 ( des''4 c''4 ) | % 251
  bes'4 r4 r2 | % 252
  r8 f''8 \pp [ f''8 f''8 ] g''8 [ f''8 a''8 f''8 ] | % 253
  bes''4 r4 r2 \bar |.
   }
}

I don't know if this truly is what you were hoping to show, but this is the 
best I could make of it.

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


Re: General bar setup for score

2013-01-19 Thread james

On Jan 18, 2013, at 11:26 AM, Maarten de Keijzer wrote:

 
 Am 16.01.2013 08:51, schrieb Maarten de Keijzer:
 
 Hi,
 
 Is it possible to create some general setup for the total number of 
 bars within the score, including time changes? 
 
 In the example I have a score with two voices on the right (piano) 
 staff with 6/8 and 3/8 bars.
 
 When I create in one voice some rhythmic accents (like grace notes or
 acciaccatura) the new time indicator gets duplicated.
 
 This is a very annoying bug in lilypond IIRC.
 
 You can use an invisible \grace in the other voice as a workaround: 
 
 rightOne = \relative c'' {
  \global
  c2. |
   \time 3/8 bes16as es as bes c |
  \time 6/8 \acciaccatura  { bes16[ c16] } bes4.~ bes |
  g8 bes es g bes es |
 }
 rightTwo = \relative c'' {
  \global
  a2. |
 \time 3/8 f8 s f |
  \time 6/8 \grace  { s8 } f4 f g |
  g4. r |
 }
 
 HTH,
 
 Marc
 
 Thanks Marc,
 I tried it successfully, but I wonder if this the only solution for this
 problem.
 Having a piano score with two voices in the right hand and one for the left,
 I have to create extra 'articulations' in two other parts.
 How would that be for even more complex (multi staff) scores?


I put all of my time signatures in an extra variable. It allows me to see all 
of the time changes in one place, and change them all in one place, if need be. 
I also put barline changes (\bar :) in this variable:
\version 2.16.1

global = {
   \time 6/8   s2.
   \time 3/8   s4.
   \time 6/8   \grace { s8 } s2.*2
}

rightOne = \relative c'' {
 c2. |
 bes16as es as bes c |
 \acciaccatura  { bes16[ c16] } bes4.~ bes |
 g8 bes es g bes es |
}
rightTwo = \relative c'' {
 a2. |
 f8 s f |
 f4 f g |
 g4. r |
}

\score {
   \new Staff 
  \global
  \new Voice { \voiceOne \rightOne }
  \new Voice { \voiceTwo \rightTwo }
   
   \layout {}
}


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


Re: tupletSpannerDuration

2013-01-19 Thread Trevor Daniels

David Kastrup wrote Saturday, January 19, 2013 9:10 AM


 Nick Payne nick.pa...@internode.on.net writes:
 
 BTW, both #(ly:make-moment 1 4) and #(ly:make-moment 1/4) are valid,

 Is one form preferred over the other? If so, maybe that should be
 consistently used throughout the documentation.
 
 At any rate, due to its better mnemonic value (and the availability of
 ly:moment-main and ly:moment-grace also from around that time), I think
 we should preferably aim for the rational form.

I agree.

Bug Squad: please raise an issue for this so it doesn't get forgotten.

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


Re: prall with accidental

2013-01-19 Thread Werner LEMBERG

 Of course, you can easily write the tweak version instead:
 
 prallSharp =
 -\tweak Script.text \markup {
   \override #'(baseline-skip . 1.2) \center-column {
 \fontsize #-4 \sharp
 \musicglyph #scripts.prall
   } }
 -\tweak Script.stencil #ly:text-interface::print \prall

I plead for adding this and related macros to LilyPond.  Three reasons:

  . The definition is non-trivial.

  . It is quite frequent.

  . It should be extended to work with articulate.ly, and as such the
macro names need to be standardized.


 Werner

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


Re: prall with accidental

2013-01-19 Thread Jay Anderson
On Sat, Jan 19, 2013 at 8:21 AM, Werner LEMBERG w...@gnu.org wrote:
 I plead for adding this and related macros to LilyPond.

I have a bunch of turns defined like this:

turnXS =
#(make-music
   'TextScriptEvent
   'tweaks '((avoid-slur . inside) (outside-staff-priority . #f))
   'direction 1
   'text #{ \markup { \override #'(baseline-skip . 1) \center-column {
\musicglyph #scripts.turn {\tiny \smaller \sharp} } } #})

X - nothing
S - sharp
F - flat
N - natural

The first letter says what's above the turn. The second is below. Then
I have similar turns defined. (Though I should make the accidentals
smaller like you have in the pralls.)

I agree that adding modified pralls, turns and the like to lilypond
proper would be nice (whatever the naming scheme). It's very common
notation.

-Jay

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


RE: tupletSpannerDuration

2013-01-19 Thread Mark Stephen Mrotek
Mr. Payne:

 

My thanks to you and Mr. Kastrup for addressing my inquiry.

 

Please check my understanding. The 1 and the 4 refer to a quarter note,
the span over which the command \times 2/3 acts. Therefore, in the example
(attached) the tuplets are in the span of a quarter note. If I had wanted
the tuplets over the spam of a 16th note, I would use 1 and 16. Am I
correct?

 

Thank you for your kind attention.

 

Mark 

 

From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Nick Payne
Sent: Friday, January 18, 2013 11:23 PM
To: lilypond-user@gnu.org
Subject: Re: tupletSpannerDuration

 

On 19/01/13 18:04, Mark Stephen Mrotek wrote:

Hello:

 

From the manual:

 

\relative c' {

  \time 2/4

  \set tupletSpannerDuration = #(ly:make-moment 1 4)

  \times 2/3 { c8 c c c c c }

}

 

I understand everything except how the 1 and 4 relate to the notation.


Have a look at the section of the documentation on time administration
(http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmic-conce
rns#time-administration): ly:make-moment n m constructs a duration of n/m
of a whole note. For example, ly:make-moment 1 8 is an eighth note duration
and ly:make-moment 7 16 is the duration of seven sixteenths notes.

BTW, both #(ly:make-moment 1 4) and #(ly:make-moment 1/4) are valid, and
both forms can be found in the documentation (see
http://lilypond.org/doc/v2.17/Documentation/learning/types-of-properties)
for examples of the second. Is one form preferred over the other? If so,
maybe that should be consistently used throughout the documentation.

Nick

attachment: lily-8e8aeee6.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output with lilypond book

2013-01-19 Thread Stefan Thomas
Dear Julien,
unfortunately the blank line (do Yoy mean \\?) doesn't help!

On 18/01/2013 4:56 PM, Stefan Thomas wrote:
  Dear community,
  when I compile the following file with latex and lilypondbook, it looks
  quite strange.
  There's is a break after every bar of the lilypond example.
  I think it has to do with the input-command.
  Here is the code of the latex-file:
 
  \documentclass[a4paper,12pt]{
 article}
  \usepackage[ngerman]{babel}
  \usepackage[utf8]{inputenc}
 
 
 \usepackage[paper=a4paper,left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
  \input{./semester.tex}
  \author{Myself}
  \title{Examination \Semester }
  \date{ \Datummontag }
  \begin{document}
  \maketitle
  \begin{flushright}
  Name, Vorname:
  \end{flushright}

 It would help to insert a paragraph break (blank line) here...

  \textbf{First exercise:}

 and/or here.

  \begin{lilypond}
\relative { c d e f g2 e  g 4 f e d e2 c }
  \end{lilypond}
  \end{document}
 
 

 Cheers,
 Julien

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


Re: strange output with lilypond book

2013-01-19 Thread Julien Rioux

On 19/01/2013 1:17 PM, Stefan Thomas wrote:

Dear Julien,
unfortunately the blank line (do Yoy mean \\?) doesn't help!



I mean a blank, empty line.

%---snippet---
\begin{flushright}
Name, Vorname:
\end{flushright}

\textbf{First exercise:}

\begin{lilypond}
 \relative { c d e f g2 e  g 4 f e d e2 c }
\end{lilypond}
%---snippet---

Cheers,
Julien

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


Re: tupletSpannerDuration

2013-01-19 Thread David Kastrup
Mark Stephen Mrotek carsonm...@ca.rr.com writes:

 On 19/01/13 18:04, Mark Stephen Mrotek wrote:

 Hello:

 From the manual:

 \relative c' {

 \time 2/4

 \set tupletSpannerDuration = #(ly:make-moment 1 4)

 \times 2/3 { c8 c c c c c }

 }

 I understand everything except how the “1” and “4” relate to
 the notation.

 Have a look at the section of the documentation on time administration
 (http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmic-
 concerns#time-administration): ly:make-moment n m constructs a
 duration of n/m of a whole note. For example, ly:make-moment 1 8 is an
 eighth note duration and ly:make-moment 7 16 is the duration of seven
 sixteenths notes.

 Please check my understanding. The “1” and the “4” refer to a quarter
 note, the span over which the command “\times 2/3” acts. Therefore, in
 the example (attached) the tuplets are in the span of a quarter note.
 If I had wanted the tuplets over the spam of a 16th note, I would use
 “1” and “16.” Am I correct?

Sounds like it.  Once issue 3095
URL:http://code.google.com/p/lilypond/issues/detail?id=3095 passes,
you can write

\tuplet 3/2 4 { c8 c c c c c }

and that hopefully needs less of an explanation.  Of course, that
explanation still needs to be done (there is no user-level documentation
yet short of the music function appendix), but it will hopefully be more
obvious.

-- 
David Kastrup


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


RE: tupletSpannerDuration

2013-01-19 Thread Mark Stephen Mrotek
Mr. Kastrup:

Thank you.

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of David 
Kastrup
Sent: Saturday, January 19, 2013 10:39 AM
To: lilypond-user@gnu.org
Subject: Re: tupletSpannerDuration

Mark Stephen Mrotek carsonm...@ca.rr.com writes:

 On 19/01/13 18:04, Mark Stephen Mrotek wrote:

 Hello:

 From the manual:

 \relative c' {

 \time 2/4

 \set tupletSpannerDuration = #(ly:make-moment 1 4)

 \times 2/3 { c8 c c c c c }

 }

 I understand everything except how the “1” and “4” relate to
 the notation.

 Have a look at the section of the documentation on time 
 administration
 (http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmi
 c-
 concerns#time-administration): ly:make-moment n m constructs a 
 duration of n/m of a whole note. For example, ly:make-moment 1 8 is 
 an eighth note duration and ly:make-moment 7 16 is the duration of 
 seven sixteenths notes.

 Please check my understanding. The “1” and the “4” refer to a quarter 
 note, the span over which the command “\times 2/3” acts. Therefore, in 
 the example (attached) the tuplets are in the span of a quarter note.
 If I had wanted the tuplets over the spam of a 16th note, I would use 
 “1” and “16.” Am I correct?

Sounds like it.  Once issue 3095
URL:http://code.google.com/p/lilypond/issues/detail?id=3095 passes, you can 
write

\tuplet 3/2 4 { c8 c c c c c }

and that hopefully needs less of an explanation.  Of course, that explanation 
still needs to be done (there is no user-level documentation yet short of the 
music function appendix), but it will hopefully be more obvious.

--
David Kastrup


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


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