Re: addFingering

2017-01-16 Thread David Wright
On Mon 16 Jan 2017 at 12:08:28 (+0100), Gianmaria Lari wrote:
> I'm sorry, clearly there is a misunderstanding and it is probably from my
> side, my apologies.
> 
> Let's me try to explain what I mean. Try to have a look to this code and
> the related output (it is attached).

There seem to be two directions in which you want to change LP.
The first, which my comment was directed at, was to force writing
an unnecessary \relative { } inside another \relative { } construction,
going from (in your example)

\relative c' {
somemusic.
\repeat unfold 4 { c e g }
somemusic.
 }

to

{
  \repeat unfold 2 \relative c' {c e g}
}

That's what I directed my "What side effect and exceptional behaviour?
The orthogonality between what and what?" at.

But your response here addresses a second point, the
interpretation of \repeat unfold. Looking at my attached
example, it seems to me that you want "\repeat unfold 2 { foo }"
to behave like "foo foo" (B and C). But, if that's what you want,
why not write "foo foo"? "foo foo" duplicates the notes in the
source, but it isn't a textual repeat in the LP sense (like
FR, A, D and E).

And if you want to automate it for n≫2, find/write a function
to do it.

I think one source of confusion might be that it's easy to use
\repeat unfold as a shorthand for what you want here, and it does
work that way at one level. However, it's really something different.
Look at the parallels between FR&A, and D&E.

People get hoisted on a vaguely similar petard when they think
that R1 * 5 is five whole-note-rests when it's more accurate
to say it's one five-whole-note-duration-rest that usually gets
set as five whole-note-rests.

Cheers,
David.
\include "addFingering.ly"

fragment = {c' d' e' f'}

%%\markup "Plain" {\fragment}

%%\markup "Inversion" {\inversion  c' c' \fragment}
%%\markup "Transpose"{\transpose  c c, \fragment}
%%\markup "T(I())"{\transpose c c, {\inversion  c' c' \fragment }}
%%\markup "I(T())"{ \inversion c' c' {\transpose  c c, \fragment }}

%%\markup "repeat" {\repeat unfold 2 \fragment}
\markup "addFingering" {\addFingering \fragment #"12"}
\markup "R(F())" {\repeat unfold 2 {\addFingering \fragment #"12"}}
\markup "F(R())" {\addFingering {\repeat unfold 2 \fragment} #"12"}
\markup "A"  {\addFingering {\repeat percent 2 \fragment} #"12"}
\markup "B"  {\addFingering {\fragment \fragment} #"12"}
\markup "C"  {\addFingering {\fragment \fragment} #"12345"}
\markup "D"  {\addFingering {\repeat unfold 2 \fragment} #"12345"}
\markup "E"  {\addFingering {\repeat percent 2 \fragment} #"12345"}


unfold.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Extracting symbol location

2017-01-16 Thread Lukas Tuggener
Hi David,
thanks a lot for the update, it really helped me out greatly.

Thanks
Lukas

David Nalesnik  schrieb am Mo., 9. Jan. 2017 um
16:11 Uhr:

> Lukas,
>
> On Mon, Jan 9, 2017 at 8:43 AM, David Nalesnik 
> wrote:
>
> > The new output-attibutes property allows you to create multiple
> > attributes, so why not adapt the labeling routines to return something
> > like
> >
> > value of output-attributes = '((name . someGrob) (moment . whenIAm)
> > (x-pos . xCoordinate) (y-pos . yCoordinate))
>
> A way to do this is attached.
>
> An excerpt from the SVG:
>
>  y-pos="-7.552">
>
> -David
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Another lyrics problem

2017-01-16 Thread David Sumbler
On Mon, 2017-01-16 at 08:00 -0500, Kieren MacMillan wrote:
> Hi David,
> 
> > 
> > Can somebody show me a working version of the above?  And/or a way
> > of piecing together lyrics using variables?
> Something like this?
> 
> \version "2.19.48"
> 
> lyricsA = \lyricmode { First set of words; }
> lyricsB = \lyricmode { se -- cond set of words. }
> 
> <<
>   \new Staff {
> \relative {
>   c'2 d4 e | f1 |
>   g4 f e d| c1 |
> }
> \addlyrics { \lyricsA \lyricsB }
>   }
>   \new Staff {
> R1*4 |
>   }
> > 
> > > 
> > > 
> Hope that helps!
> Kieren.

Thanks, that's brilliant - just what I was looking for.

David


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


Re: Another lyrics problem

2017-01-16 Thread Kieren MacMillan
Hi David,

> Can somebody show me a working version of the above?  And/or a way of piecing 
> together lyrics using variables?

Something like this?

\version "2.19.48"

lyricsA = \lyricmode { First set of words; }
lyricsB = \lyricmode { se -- cond set of words. }

<<
  \new Staff {
\relative {
  c'2 d4 e | f1 |
  g4 f e d| c1 |
}
\addlyrics { \lyricsA \lyricsB }
  }
  \new Staff {
R1*4 |
  }
>>

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Prevent "orphan" markup

2017-01-16 Thread Vaughan McAlley
On 16 January 2017 at 19:59, Urs Liska  wrote:
> Hi all,
>
> I have a multi-movement work (or rather numerous ones) where the
> movement titles are printed using an automatically generated top-level
> markup. The overall structure looks like:
>
> \book {
>   \markup { "overall title" }
>   \bookpart {
> % (first work in group)
> \markup { "work title" }
> \markup { "Title of first movement" }
> \score {
>   % first movement
> }
> \markup { "Title of second movement" }
> \score {
>   % second movement
> }
> % etc
>   } % end bookpart
>   \bookpart {
>   % second work in group
>   % ...
>   }
> }
>
> Each "work" is wrapped in a bookpart and will consequently start on a
> new page.
> I didn't want to do the same with the movements because there will be
> cases where a new movement should better continue on the same page.
>
> The problem is that *usually* the title of the next movement fits on the
> same page as the end of the previous one but no music, so I have the
> title of the next movement sitting on the bottom of a page.
>
> So: is there a way that a top-level markup block can determine if there
> will be at least one system of music coming on the same page?
>
> I would really like to have an automatic way to handle this problem as I
> expect to have a three-digit number of movements and quite different
> configurations (full score, choral/continuo, parts) and perhaps also
> different output targets/formats. Forcing all movements to start on a
> new page would be a pity but seems the only workaround if I can't get a
> proper automatic solution to run.
>
> Any suggestions?
> Urs
>
> --
> u...@openlilylib.org
> https://openlilylib.org
> http://lilypondblog.org
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi Urs,

Is there any reason you can't have:

\score {
  \secondMovementMusic
  \header {
subtitle = \mySecondMovementTitleMarkup
  }
  \layout {}
}

This should never orphan the movement's title AFAIK,

Vaughan

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


Re: addFingering

2017-01-16 Thread Gianmaria Lari
I'm sorry, clearly there is a misunderstanding and it is probably from my
side, my apologies.

Let's me try to explain what I mean. Try to have a look to this code and
the related output (it is attached).

\version "2.19.54"
\include "addFingering.ly"

fragment = {c' d' e' f'}

\markup "Plain" {\fragment}

\markup "Inversion" {\inversion  c' c' \fragment}
\markup "Transpose"{\transpose  c c, \fragment}
\markup "T(I())"{\transpose c c, {\inversion  c' c' \fragment }}
\markup "I(T())"{ \inversion c' c' {\transpose  c c, \fragment }}

\markup "repeat" {\repeat unfold 2 \fragment}
\markup "addFingering" {\addFingering \fragment #"12"}
\markup "R(F())" {\repeat unfold 2 {\addFingering \fragment #"12"}}
\markup "F(R())" {\addFingering {\repeat unfold 2 \fragment} #"12"}

Is it more clear now?
My apologies if it seems I was shortchanging, I never had this intention.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Another lyrics problem

2017-01-16 Thread David Sumbler
%%%
\version "2.19.48"

<<
  \new Staff {
\relative {
  c'2 d4 e | f1 |
}
\addlyrics { First set of words; }
\relative {
  g'4 f e d| c1 |
}
\addlyrics { se -- cond set of words. }
  }
  \new Staff {
R1*4 |
  }
>>

%%%

The above works as I would like it to, except that the second set of
lyrics appears below the lower stave even though they are correctly
lined up with the notes in the first stave.  Further sections of music
with lyrics appear lower still on the page.

I have tried many different ways of getting what I want (some involving
"\new Lyrics" and "lyricsto"), but I can't get the result I want.

The reason for wanting to split the music and the lyrics in this way is
because the piece I am setting falls naturally into a number of
sections; but they are not separate movements, so I want the music and
the staves to be continuous.  I like to split things up so that I can
use variables and includes to compile only the section(s) I am working
on - this speeds the process up when I am checking the validity of my
input.

The actual music isn't a problem: I can control this using variables:
e.g.
flute = { }
flute = { \flute \fluteSectionOne }
flute = { \flute \fluteSectionTwo }
flute = { \flute \fluteSectionThree
}
etc.

and commenting out as desired.  But I can't get this to work with the lyrics, 
so I am having to include the lyrics with the music of each section.

Can somebody show me a working version of the above?  And/or a way of piecing 
together lyrics using variables?

David

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


Re: Prevent "orphan" markup

2017-01-16 Thread Toine Schreurs
> The problem is that *usually* the title of the next movement fits on the
> same page as the end of the previous one but no music, so I have the
> title of the next movement sitting on the bottom of a page.
> 
> So: is there a way that a top-level markup block can determine if there
> will be at least one system of music coming on the same page?

What about:
 \markup { "Title of second movement" }
 \noPageBreak
 \score {
   % second movement
 }
Then at least one system of music follows the title.

Toine Schreurs

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


Prevent "orphan" markup

2017-01-16 Thread Urs Liska
Hi all,

I have a multi-movement work (or rather numerous ones) where the
movement titles are printed using an automatically generated top-level
markup. The overall structure looks like:

\book {
  \markup { "overall title" }
  \bookpart {
% (first work in group)
\markup { "work title" }
\markup { "Title of first movement" }
\score { 
  % first movement 
}
\markup { "Title of second movement" }
\score {
  % second movement
}
% etc
  } % end bookpart
  \bookpart {
  % second work in group
  % ...
  }
}

Each "work" is wrapped in a bookpart and will consequently start on a
new page.
I didn't want to do the same with the movements because there will be
cases where a new movement should better continue on the same page.

The problem is that *usually* the title of the next movement fits on the
same page as the end of the previous one but no music, so I have the
title of the next movement sitting on the bottom of a page.

So: is there a way that a top-level markup block can determine if there
will be at least one system of music coming on the same page?

I would really like to have an automatic way to handle this problem as I
expect to have a three-digit number of movements and quite different
configurations (full score, choral/continuo, parts) and perhaps also
different output targets/formats. Forcing all movements to start on a
new page would be a pity but seems the only workaround if I can't get a
proper automatic solution to run.

Any suggestions?
Urs

-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org


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