Re: Slur over single note?

2016-07-18 Thread Andrew Bernard
Hi Joel

Use a laissezvibrer tie. I have a function to extend them, Away from the
computer right now. Will send later. Can't remember if it is on LSR.

Andrew

On Tuesday, 19 July 2016, Joel C. Salomon  wrote:

> Still from the John Crook’s Peter Pan score project, but a different
> piece (“The Flying Away”, page 12 in the score at
> ):
>
> As show in the attached image, there seems to be a slur drawn over a
> single whole-note.  It’s very clearly over that note, not over the other
> voice in that measure—which doesn’t seem reasonable to me.
>
> Can someone explain to me what’s going on there, and how to achieve this
> in LilyPond?  I was thinking to use something like
>
> \graceAfter a1(  { s32) }
>
> but if this is a semi-standard musical construction I’m unfamiliar with,
> there might be a better way to code this.
>
> —Joel C. Salomon
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Slur over single note?

2016-07-18 Thread Joel C. Salomon
Still from the John Crook’s Peter Pan score project, but a different
piece (“The Flying Away”, page 12 in the score at
):

As show in the attached image, there seems to be a slur drawn over a
single whole-note.  It’s very clearly over that note, not over the other
voice in that measure—which doesn’t seem reasonable to me.

Can someone explain to me what’s going on there, and how to achieve this
in LilyPond?  I was thinking to use something like

\graceAfter a1(  { s32) }

but if this is a semi-standard musical construction I’m unfamiliar with,
there might be a better way to code this.

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


Slurs within & across \repeat tremolo

2016-07-18 Thread Joel C. Salomon
At

is my current effort toward recreating the original score, but I’m
having trouble with the opening bars (image attached).

I can imitate the _look_ of the score simply enough:

a16( gs a gsa gsa gs\repeat tremolo 4 { a gs) } | 
\kluge |
\voiceOne
\repeat tremolo 4 { f( d }  \repeat tremolo 4 { f d) }  | 
\kluge |

and so on (see the file for details on the `\kluge`; not related to this
question), but as `\unfoldRepeats` (e.g., for MIDI generation)
indicates, the slur is actually terminated the first time the
close-parenthesis is expanded; the effect is that of

a( ba  ba  ba  bc  d)   c  dc  dc  d

when it “ought” to be

a( ba  ba  ba  bc  dc  dc  dc  d)

instead.  Possibly I’m quibbling over something that doesn’t matter (the
generated MIDI doesn’t sound different to my ears, but perhaps I need to
include articulate.ly for that?) but I’d like to know the right way of
writing this.

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


Re: 17th century English kbd ornaments

2016-07-18 Thread Andrew Bernard
Hi Pierre,

Wouldn’t it be better to do these are actual ornaments instead of just
markup? I say this because there is a page on the lilyond blog regarding
this, but it is only partially complete. If we did them as ornaments the
possibility would arise of being able to use them to set English Virginal
Music which uses the slash and double slash, through the stem, extensively
- although as folks have noted, nobody really knows what they mean.

Since I am a harpsichord player I am one day going to do all the many
varieties of the French keyboard ornaments, a rich and flowering garden, so
I  have just now taken an interest in this thread.

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


Re: 17th century English kbd ornaments

2016-07-18 Thread Pierre Perol-Schneider
You're welcome Michael.
However, I noticed I made a typo. So please change the code so:

purcell = ^\markup\stencil
 #(make-path-stencil
  '(M -0.20  0.05 L  1.55  0.51 M -0.31  0.43 L  1.45  0.90
;; uncomment the line hereunder if necessary:
;; M -0.69 -0.10 L -1.15  1.70
)
  0.17 1 1 #f) %% <= and not #t !!

It won't change anything though, but it was definitely a mistake.

Cheers,
Pierre

2016-07-18 16:38 GMT+02:00 Michael Rivers :

> That looks great. Thanks so much!
>
>
>
> --
> View this message in context:
> http://lilypond.1069038.n5.nabble.com/17th-century-English-kbd-ornaments-tp148407p192792.html
> Sent from the User mailing list archive at Nabble.com.
>
> ___
> 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


Re: funny construction

2016-07-18 Thread David Wright
On Mon 18 Jul 2016 at 08:23:21 (-0700), tisimst wrote:
> BGM & David,
> On Mon, Jul 18, 2016 at 8:35 AM, David Wright [via Lilypond] <
> ml-node+s1069038n192791...@n5.nabble.com> wrote:
> > On Mon 18 Jul 2016 at 08:41:13 (-0500), Br. Gabriel-Marie | SSPX wrote:
> > > I have a song that goes like this:
> > > --
> > > soprano
> > > alto
> > > 15 lyric verses in between
> > > tenor
> > > bass
> > >
> > > soprano
> > > alto
> > > just one lyric in between - it's the chorus
> > > tenor
> > > bass
> > >
> > >
> > > soprano
> > > alto
> > > 15 lyric verses in between \repeatOfFourWords
> > > tenor
> > > bass
> >
> > If the material is sufficiently heterogeneous, it can
> > make sense to concatenate multiple scores.
> >
> 
> True, but I'm pretty sure multiple \score blocks aren't needed here, but
> rather make the notes/lyrics sequential.

You're quite right. But the way my mailboxes are arranged,
I was prejudiced by possible aversion to skips
http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00343.html
and need for extra annotations
http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00380.html
and thought we'd already come up with a solution like yours:
http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00350.html
...or, rather, its predecessors. I get very confused about
whether to take account of previous context or treat every
thread as a fresh start.

I thought the main problem was the accidental inclusion of the << >>.
I found the correct usage of << >> and the way it interacts with \\
to be one of the harder things to get my head around when I was
first learning LP. But that's an aside.

Cheers,
David.

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


Re: Behaviour of \paper and \layout in ly:book-process

2016-07-18 Thread David Kastrup
Urs Liska  writes:

> Am 18.07.2016 um 13:46 schrieb David Kastrup:
>
>> The defaultpaper argument of ly:book-process is only consulted when the
>> book argument does not already have a paper block of its own, and every
>> \book block takes the global \paper block when nothing else is given.
>
> Thank you for the hint.
>
>>
>> If you really want to pass the paper block in yourself during
>> ly:book-process (rather than incorporating it in the \book explicitly),
>
> No, I didn't do that intentionally but was misled by the fact that I
> have to supply that default-paper and -layout arguments.

Well, I wrote:

>> If that sounds like I have any clue about how the hierarchy of books
>> and bookparts is supposed to work, that would be misleading.  That's
>> basically just a report on what some code does.  Why one would want
>> it to do that, I have no idea.

and indeed I did not have any clue about this difference until you
popped the question and I looked into the code for the answer.  I don't
think that there is any reasonable other way to discover that.

And I could not really write useful documentation for this since I fail
to understand the underlying design.

The commits are

commit e9b10d6b0e1549a3d3d9ca81c63e1b2d9b431910
Merge: 3dbfeb1 c45e558
Author: Nicolas Sceaux 
Date:   Sun Nov 16 23:32:33 2008 +0100

Book parts: \bookpart implementation

Book parts aim at splitting a book into several parts, in order to be
able to use eg. different page breaking functions, or to make the page
breaking problem less difficult and more likely to finish.

- Book and Paper_book instances respectively are nestable: children
  book or paper_book are added to the bookparts_ slot;

- the paper_ slot of a child Book (or Book_paper) is created empty,
  and has its parent set to the paper object of the parent Book (or
  Paper_book), so that default paper properties are got from the
  higher level paper object, and child objects only store part-wide
  overrides. This way, we ensure that fonts are loaded in the higher
  level paper object, so that the output framework can get all the
  loaded fonts from the top level book;

- a Paper_book::top_paper() method is added to access the higher level
  paper object, to access properties that are book-wide, for instance
  the table used to store labels and page numbers;

- in the parser, \bookpart blocks are introduced, which can be used at
  toplevel, or inside a \book block. It can contain the same things as
  \book blocks (except \bookpart blocks, though that would be
  possible). The associated handlers are added.

- in header and footer markups, the following predicates can be used
  to determine if a page is the first or the last one in a book part:
  part-first-page, part-last-page.

commit dbefd4b8d0249c6a739d09118f3e0a71001c1c52
Author: Nicolas Sceaux 
Date:   Sat Aug 23 18:34:30 2008 +0200

Book parts: nestable book parts

- Book and Paper_book instances respectively are nestable: children
  book or paper_book are added to the bookparts_ slot;

- the paper_ slot of a child Book (or Book_paper) is created empty,
  and has its parent set to the paper object of the parent Book (or
  Paper_book), so that default paper properties are got from the
  higher level paper object, and child objects only store part-wide
  overrides. This way, we ensure that fonts are loaded in the higher
  level paper object, so that the output framework can get all the
  loaded fonts from the top level book;

- a Paper_book::top_paper() method is added to access the higher level
  paper object, to access properties that are book-wide, for instance
  the table used to store labels and page numbers;

- in the parser, \bookpart blocks are introduced, which can be used at
  toplevel, or inside a \book block. It can contain the same things as
  \book blocks (except \bookpart blocks, though that would be
  possible). The associated handlers are added.


-- 
David Kastrup

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


Re: funny construction

2016-07-18 Thread Abraham Lee
On Mon, Jul 18, 2016 at 11:22 AM, David Wright 
wrote:

> On Mon 18 Jul 2016 at 08:23:21 (-0700), tisimst wrote:
> > BGM & David,
> > On Mon, Jul 18, 2016 at 8:35 AM, David Wright [via Lilypond]
> > > If the material is sufficiently heterogeneous, it can
> > > make sense to concatenate multiple scores.
> > >
> >
> > True, but I'm pretty sure multiple \score blocks aren't needed here, but
> > rather make the notes/lyrics sequential.
>
> You're quite right. But the way my mailboxes are arranged,
> I was prejudiced by possible aversion to skips
> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00343.html
> and need for extra annotations
> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00380.html
> and thought we'd already come up with a solution like yours:
> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00350.html
> ...or, rather, its predecessors. I get very confused about
> whether to take account of previous context or treat every
> thread as a fresh start.
>
> I thought the main problem was the accidental inclusion of the << >>.
>

Yes, it appears it might just be a accidental mis-use of outer << >> in
this case instead of { } since it's obvious that the three sections were
meant to be sequential and not simultaneous.


> I found the correct usage of << >> and the way it interacts with \\
> to be one of the harder things to get my head around when I was
> first learning LP. But that's an aside.
>

FWIW, in case anyone cares to know how I do things, when it comes to using
\\ with << >>, I only use them in less complex, non-lyric-associated voices
and even then it's only when I need something temporarily and there aren't
ties/slurs/phrasing slurs/other spanners that I want to attach something
to. In almost every other case, I explicitly use instantiate voices, like

<<
  { \voiceOne ... }
  \new Voice { \voiceTwo ... }
>>

so I know exactly where the voices start and stop. It almost always makes
things clearer and easier to debug.

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


Re: Behaviour of \paper and \layout in ly:book-process

2016-07-18 Thread Urs Liska


Am 18.07.2016 um 13:46 schrieb David Kastrup:
> Urs Liska  writes:
>
>> I am once more experimenting with ly:book-process. The background is
>> that I have managed to generate my complete score within a Scheme
>> function, but now I need the function to produce more than just one
>> \score (namely an alternation between multiple scores and top-level
>> markups).
>>
>> But it seems somewhat unpredictable how the \paper and \layout blocks
>> behave.
>>
>> In the following example the \paper block is not respected while the
>> \layout block is:
>>
>> \version "2.19.45"
>>
>> engrave =
>> #(define-void-function ()()
>> (let*
>>   ((book
>> #{
>>   \book {
>> \markup "Movement title (to be generated)"
>> \score {
>>   \new Staff { c' d' }
>> }
>>   }
>> #}))
>>   (ly:book-process
>>book
>>#{
>>  \paper {
>>indent = 0\cm
>>  }
>>#}
>>#{
>>  \layout {
>>\context {
>>  \Score {
>>\override NoteHead.color = #blue
>>  }
>>}
>>  }
>>#}
>>(ly:parser-output-name (*parser*)
>>
>> \engrave
> The defaultpaper argument of ly:book-process is only consulted when the
> book argument does not already have a paper block of its own, and every
> \book block takes the global \paper block when nothing else is given.

Thank you for the hint.

>
> If you really want to pass the paper block in yourself during
> ly:book-process (rather than incorporating it in the \book explicitly),

No, I didn't do that intentionally but was misled by the fact that I
have to supply that default-paper and -layout arguments.

Now I moved the \paper block inside \book (or rather at an earlier point
I stored a paper block in the option tree and now call it from there),
and it seems to work.

Now to the \layout block ...

Best
Urs

> you need to use \bookpart instead of \book: in a \bookpart, the \paper
> block is indeed optional and (unless specified) will be left out instead
> of taking the global \paper block.
>
> If that sounds like I have any clue about how the hierarchy of books and
> bookparts is supposed to work, that would be misleading.  That's
> basically just a report on what some code does.  Why one would want it
> to do that, I have no idea.
>


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


Re: funny construction

2016-07-18 Thread tisimst
BGM & David,

On Mon, Jul 18, 2016 at 8:35 AM, David Wright [via Lilypond] <
ml-node+s1069038n192791...@n5.nabble.com> wrote:

> On Mon 18 Jul 2016 at 08:41:13 (-0500), Br. Gabriel-Marie | SSPX wrote:
>
> > I have a song that goes like this:
> > --
> > soprano
> > alto
> > 15 lyric verses in between
> > tenor
> > bass
> >
> > soprano
> > alto
> > just one lyric in between - it's the chorus
> > tenor
> > bass
> >
> >
> > soprano
> > alto
> > 15 lyric verses in between \repeatOfFourWords
> > tenor
> > bass
>
> Your outermost enclosing << .. >> says play the enclosed structures
> simultaneously. They shouldn't be there.
>
> Replace:
>
> \score {
> <<
> \new StaffGroup ...
> \new StaffGroup ...
> \new StaffGroup ...
> >>
> \layout { }
> }
>
> by:
>
> \score {
> \new StaffGroup ...
> \layout { }
> }
> \score {
> \new StaffGroup ...
> \layout { }
> }
> \score {
> \new StaffGroup ...
> \layout { }
> }
>
> If the material is sufficiently heterogeneous, it can
> make sense to concatenate multiple scores.
>

True, but I'm pretty sure multiple \score blocks aren't needed here, but
rather make the notes/lyrics sequential. How about the following structure,
BGM?



\version "2.18.2"

altoTop = { c'1 c' c' c' }
altoCenter = { d'1 d' d' d' }
altoBottom = { e'1 e' e'2 e' f' f' }

bassTop = { \clef bass g1 g g g }
bassCenter = { f1 f f f }
bassBottom = { e1 e e2 e d d }

altoNotes = {
  \altoTop \break
  \altoCenter \break
  \altoBottom \bar "|."
}

bassNotes = {
  \bassTop
  \bassCenter
  \bassBottom
}

verseCenter = \lyricmode {
  Cen -- ter verse here
}

centerSkips = \lyricmode { \repeat unfold 4 { \skip 4 } }

choruslet = \lyricmode {
  Cho -- rus!
}

verseOne = \lyricmode {
  Verse one on top,
  % only needed in one of the verses
  \verseCenter
  Verse one be -- low:
  % no need to add skips here since nothing follows
}

% ... verses 2-7 (similar structure to verseFifteen below)

verseEight = \lyricmode {
  Verse eight on top,
  % used to jump over the chorus part since it is already in verseOne
  \centerSkips
  Verse eight be -- low:
  % put this here for convenient vertical alignment
  \choruslet
}

% ... verses 9-14 (similar structure to verseFifteen below)

verseFifteen = \lyricmode {
  Verse fif -- teen top,
  \centerSkips
  Verse fif -- teen low:
  % no need to add skips here since nothing follows
}

\score {
  \new ChoirStaff <<
\new Staff {
  \new Voice = alto \altoNotes
}
\new Lyrics \lyricsto alto \verseOne
% ...
\new Lyrics \lyricsto alto \verseEight
% ...
\new Lyrics \lyricsto alto \verseFifteen
\new Staff {
  \new Voice = bass \bassNotes
}
  >>
  \layout {
\override Lyrics.VerticalAxisGroup #'staff-affinity = #CENTER
  }
}



HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/funny-construction-tp192789p192794.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


function to end melody with rests to end of measure

2016-07-18 Thread Jim Tisdall
I need to fill in the end of a score (a melody) with
rests to the end of the final measure, if needed.

Any ideas for how to do that, like writing a new function or ...?
Thanks,
Jim


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


Re: 17th century English kbd ornaments

2016-07-18 Thread Michael Rivers
That looks great. Thanks so much!



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/17th-century-English-kbd-ornaments-tp148407p192792.html
Sent from the User mailing list archive at Nabble.com.

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


Re: funny construction

2016-07-18 Thread David Wright
On Mon 18 Jul 2016 at 08:41:13 (-0500), Br. Gabriel-Marie | SSPX wrote:
> I have a song that goes like this:
> --
> soprano
> alto
> 15 lyric verses in between
> tenor
> bass
> 
> soprano
> alto
> just one lyric in between - it's the chorus
> tenor
> bass
> 
> 
> soprano
> alto
> 15 lyric verses in between \repeatOfFourWords
> tenor
> bass

Your outermost enclosing << .. >> says play the enclosed structures
simultaneously. They shouldn't be there.

Replace:

\score {
<<
\new StaffGroup ...
\new StaffGroup ...
\new StaffGroup ...
>>
\layout { }
}

by:

\score {
\new StaffGroup ...
\layout { }
}
\score {
\new StaffGroup ...
\layout { }
}
\score {
\new StaffGroup ...
\layout { }
}

If the material is sufficiently heterogeneous, it can
make sense to concatenate multiple scores.

Cheers,
David.

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


Cross staff stems between notes of different durations

2016-07-18 Thread Andrew Bernard
If one wants to have cross staff stems between notes of different
durations, found often in the contemporary music I set, is there a
lilypond setting of some sort to do this? Currently I have to use the
technique shown in the MWE here. This works fine - it is just when
there are a large number of these occurrences it becomes tedious.

Andrew

== snip

\version "2.19.45"

treble = {
  \clef treble
  \time 1/4
  \stemDown
  \crossStaff { a'2 }
}

bass =  {
  \clef bass
  \time 1/4
  \autoBeamOff
  <<
{
  b8 b
}
\new Voice
{
  \voiceTwo
  b2*1/2
}
  >>
  b4
}

\score {
  \new PianoStaff
  <<
\new Staff = "treble" \with {
}
{ \treble }

\new Staff = "bass" \with {
}
{ \bass }
  >>

  \layout {
\context {
  \PianoStaff
  \consists #Span_stem_engraver
}
  }
}


== snip

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


funny construction

2016-07-18 Thread Br. Gabriel-Marie | SSPX

I'm stuck, y'all.

I have a song that goes like this:
--
soprano
alto
15 lyric verses in between
tenor
bass

soprano
alto
just one lyric in between - it's the chorus
tenor
bass


soprano
alto
15 lyric verses in between \repeatOfFourWords
tenor
bass
--
How do I lay this out?  I have two problems:
1. How do I get the center staff to be not connected to the 
other two?
2. How do I make three separate staffs?  The code I have 
right now makes one giant staff and tries to play all three 
of them at once.


Right now, I've got this, which is wrong -


\score {
<<
\new StaffGroup <<
\new Staff<<
\new Voice = "altoTop" \altoTop
\break
>>
\new Lyrics \lyricsto "versesTop" { lyrics... }
\new Lyrics \lyricsto "versesTop" { lyrics... }
\new Staff<<
\new Voice = "bassTop" \bassTop
\break
>>
>>

\new StaffGroup <<
\new Staff<<
\new Voice = "altoCenter" \altoCenter
\break
>>
\new Lyrics \lyricsto "versesCenter" { Ti -- 
rou -- li, ra -- ta -- plan, ra -- ta -- plan. }

\new Staff<<
\new Voice = "bassCenter" \bassCenter
\break
>>
>>


\new StaffGroup<<
\new Staff<<
\new Voice = "altoBottom" \altoBottom
>>
\new Lyrics \lyricsto "versesBottom" { 
lyrics... \choruslet   }
\new Lyrics \lyricsto "versesBottom" { 
lyrics \choruslet   }


\new Staff<<
\new Voice = "bassBottom" \bassBottom
>>

>>
>>
\layout {
\override Lyrics.VerticalAxisGroup #'staff-affinity 
= #CENTER

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


Re: Start music at specified measure without having to fill the previous.

2016-07-18 Thread dtsmarin
Hi Jan-Peter,

I think the \timespan code is enough for me. 

Thanks to all of you!!! 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Start-music-at-specified-measure-without-having-to-fill-the-previous-tp192758p192788.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Vertical clash of contents

2016-07-18 Thread David Kastrup
Mojca Miklavec  writes:

> On 18 July 2016 at 14:01, Andrew Bernard wrote:
>> Hi Mojca,
>>
>> Why can’t you simply use the lilypond fingering instruction? You can stack
>> fingerings as per your MWE, and they are easy to enter.
>
> 1.) I want to enter both finger number *and* button name. So something
> like "2 B4" (where 2 is the finger number and B4 is the button name).
> In addition it is usually helpful to have a bit more control about
> whether or not finger numbers are actually typeset, their style
> (potentially different from button name to be distinguishable with
> ease) and placement.
>
> I totally agree that fingerings alone are much easier to enter and I
> would prefer to be able to write something like
> 
> but as far as I understand this is currently not really supported.

Well, those are text scripts and not fingerings, but one may do
something akin to

"\\-" = #(define-event-function (m) (markup?)
	  #{ \tweak text \markup \normal-text #m -1 #})

{  }

> I also totally agree that the fingerings are *the most sensible* place
> where this information should be entered. (Placing the information
> inside the lyrics is "kind-of horrible" idea, but I don't know how to
> achieve the desired layout if I start from fingerings.)

I thought that what made you go to lyrics etc was alignment: having
everything appear at one height.
>
> 2.) Even if I somehow tweak this to work with some complex syntax, it
> will look like "drunken lyrics" because I have absolutely no control
> of the vertical placement.

Ah yes, you were coming to that.

> I would really like all the buttons / fingers to be aligned
> vertically, otherwise it looks horrible (I can post the example
> again). But if someone can show me how to tweak the fingerings
> properly to satisfy my needs, I'll gladly use those instead.

I don't think this will work according to your desires, namely providing
a semi-independently readable rendering of the button sequences.

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


Re: Vertical clash of contents

2016-07-18 Thread David Kastrup
Mojca Miklavec  writes:

> Hello,
>
> I'm experiencing a weird (ugly) vertical clash inside the scores and
> don't quite understand why.
>
> I'm "misusing" lyrics above the stave to add button names. (I
> initially tried with "^\markup{}", but didn't know how to vertically
> align it.)
>
> The same trick works if the line with lyrics is full, but as soon as I
> need to add the third annotation just every now and then (and need to
> start an almost empty third line), I get a clash.
>
> I prepared a "somewhat minimal" example in the attachment.
>
> Mojca
>
> PS: please CC me

As a general hint: for these kinds of collision problems it is sometimes
a good idea to figure out LilyPond's idea of the involved outlines.  For
that, running lilypond with the option -ddebug-skylines can be real
helpful (the outline info appears in the PDF itself).

In this particular case, it does not do much more than change "WTF?" to
"WTF?!?!?".  I'm not entirely sure here but I think Keith might have
been one of those people more actively recent with the skyline code so
maybe he has some idea here?  Both regarding what may be going on and/or
wrong and with regard to possible workarounds?

-- 
David Kastrup

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


Re: Behaviour of \paper and \layout in ly:book-process

2016-07-18 Thread David Kastrup
Urs Liska  writes:

> I am once more experimenting with ly:book-process. The background is
> that I have managed to generate my complete score within a Scheme
> function, but now I need the function to produce more than just one
> \score (namely an alternation between multiple scores and top-level
> markups).
>
> But it seems somewhat unpredictable how the \paper and \layout blocks
> behave.
>
> In the following example the \paper block is not respected while the
> \layout block is:
>
> \version "2.19.45"
>
> engrave =
> #(define-void-function ()()
> (let*
>   ((book
> #{
>   \book {
> \markup "Movement title (to be generated)"
> \score {
>   \new Staff { c' d' }
> }
>   }
> #}))
>   (ly:book-process
>book
>#{
>  \paper {
>indent = 0\cm
>  }
>#}
>#{
>  \layout {
>\context {
>  \Score {
>\override NoteHead.color = #blue
>  }
>}
>  }
>#}
>(ly:parser-output-name (*parser*)
>
> \engrave

The defaultpaper argument of ly:book-process is only consulted when the
book argument does not already have a paper block of its own, and every
\book block takes the global \paper block when nothing else is given.

If you really want to pass the paper block in yourself during
ly:book-process (rather than incorporating it in the \book explicitly),
you need to use \bookpart instead of \book: in a \bookpart, the \paper
block is indeed optional and (unless specified) will be left out instead
of taking the global \paper block.

If that sounds like I have any clue about how the hierarchy of books and
bookparts is supposed to work, that would be misleading.  That's
basically just a report on what some code does.  Why one would want it
to do that, I have no idea.

-- 
David Kastrup

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


Re: How to create a thick horizontal line (as its own staff)?

2016-07-18 Thread Mojca Miklavec
On 14 July 2016 at 23:59, David Nalesnik wrote:
> On Thu, Jul 14, 2016 at 10:24 AM, Mojca Miklavec wrote:
>
>>> Ah, OK.  Good.  I assumed that the push applied to both staves and so 
>>> should be
>>> centered like many piano dynamics. But as I say I know nothing about
>>> accordion notation!
>>
>> Yes, push applies to both staves of course (with a bit of humour:
>> pushing open part and pulling the other would probably result in
>> translation of the instrument rather than music :) :) :) :).
>
> That puts it into perspective :)
>
>
>> I checked one of the scores I got and the lines are in fact not
>> aligned vertically. They might indeed be "centered in the empty space
>> between the staves", but the effect is not noticeable because the
>> differences in line heights are just minor ones.
>
> I think you will be able to do much more with alignment putting the
> line into its own context.  In the attached example, I
> put it into a Dynamics context.  You have to use spacers to get the
> attachments right--redundant information, but I think that
> the advantages make the extra trouble worth it.
>
> That is if you can come to grips with the complex vertical spacing engine :)

Thank you very much. It took me some time to debug some of my own bugs
in the code, but I managed to typeset a couple of different real
scores successfully with your code.

Apart from the annoyance that it takes some redundant information to
define where the horizontal line should be, the visual output looks
exactly as I want it to be. No "vertical line jumping" (unless really
required) and no undesired clashing with anything from the top or
bottom stave.

>> Thank you. But now the line from the 8th bar on is too close to the
>> bottom stave (and in the second example the last horizontal line is
>> too close to the upper stave).
>>
>> It looks slightly better if I add >c'< to the basses of the first
>> example or >c< to the main melody of the second example.
>
> Again, you have complete control over vertical spacing with the line
> in its own context.
>
> [coloring objects affected by push/pull}
>
>>
>> What I meant was rather the following:
>>
>> \new PianoStaff <<
>>   \new Staff {
>> f'1
>> \startPush
>> f'
>> \startPull
>> f'
>>   }
>>   \new Staff {
>> \clef bass
>> f1
>> f % some magic to make this one red automatically
>> f
>>   }

>
> Oh, OK, not trivial at all to do this automatically.  Probably you
> will end up just doing it manually.

Thank you. Given that "\repeat volta" has a way to work properly, I
didn't entirely give up on the idea yet. I now understand that it's
tricky and difficult, but I'll try to keep exploring ...

> Please see the attached example, where I recreate the PNG you attach
> down-thread.  I omitted several elements
> which are easily handled by extra Dynamics or Lyrics contexts.

Thanks again!

>> The "best" scores for beginners contain all of the following elements:
>> - all the pitches in both staves (melody + basses), even if everyone
>> ignores them
>> - all button names for both staves
>> - all finger numbers (at least for the upper stave)
>> - lyrics
>> - playing direction
>
> Thank you for the explanation.  My reaction is that it would be nice
> to be able to present different
> "editions" which provide this and that information but omit details
> which, say, an experienced player wouldn't need.  Judging by the PNG,
> these scores are cluttered and possibly a bit
> overwhelming for the player?

Not entirely joking, but ... experienced players don't need scores :)
They just play :)

Usually the finger numbers are not needed by experienced players.
Those who can read the usual notation (most don't, or at least cannot
do the translation between the accordion buttons and the notation) may
not need the aid of button numbers, but then those people don't need
*anything* beyond the "regular scores". So most users would request at
least the button numbers to be able to learn with ease. (Basses could
also be represented with numbers or names instead of scores to save
space.)

I will try to talk to some teachers and let you know if I find some
examples of music as would be requested by the most experienced
musicians on this instrument.

> I hope that the attached will give you what you need.  It didn't take
> me long at all to recreate what I did of the score example.

Yes, so far this seems to work perfectly well for me.

Is there a chance that after giving it some thought and time to
"ripe", think about potential optimization and configuration, the code
would be included in an official Lilypond library, avoiding the need
to copy-paste all those 200 lines?

Thank you,
Mojca

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


Re: Vertical clash of contents

2016-07-18 Thread Mojca Miklavec
On 18 July 2016 at 14:01, Andrew Bernard wrote:
> Hi Mojca,
>
> Why can’t you simply use the lilypond fingering instruction? You can stack
> fingerings as per your MWE, and they are easy to enter.

1.) I want to enter both finger number *and* button name. So something
like "2 B4" (where 2 is the finger number and B4 is the button name).
In addition it is usually helpful to have a bit more control about
whether or not finger numbers are actually typeset, their style
(potentially different from button name to be distinguishable with
ease) and placement.

I totally agree that fingerings alone are much easier to enter and I
would prefer to be able to write something like

but as far as I understand this is currently not really supported.

I also totally agree that the fingerings are *the most sensible* place
where this information should be entered. (Placing the information
inside the lyrics is "kind-of horrible" idea, but I don't know how to
achieve the desired layout if I start from fingerings.)

2.) Even if I somehow tweak this to work with some complex syntax, it
will look like "drunken lyrics" because I have absolutely no control
of the vertical placement. I would really like all the buttons /
fingers to be aligned vertically, otherwise it looks horrible (I can
post the example again). But if someone can show me how to tweak the
fingerings properly to satisfy my needs, I'll gladly use those
instead.

> I am sorry I have not been following your accordion thread as this is an
> instrument I know nothing about, so I apologise if this idea has already
> been rejected for accordion specific reasons.

There are no "accordion-specific" reasons.

Mojca

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


Re: Vertical clash of contents

2016-07-18 Thread Andrew Bernard
Hi Mojca,

Why can’t you simply use the lilypond fingering instruction? You can stack
fingerings as per your MWE, and they are easy to enter. It would seem to be
a fine solution.

I am sorry I have not been following your accordion thread as this is an
instrument I know nothing about, so I apologise if this idea has already
been rejected for accordion specific reasons.

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


Vertical clash of contents

2016-07-18 Thread Mojca Miklavec
Hello,

I'm experiencing a weird (ugly) vertical clash inside the scores and
don't quite understand why.

I'm "misusing" lyrics above the stave to add button names. (I
initially tried with "^\markup{}", but didn't know how to vertically
align it.)

The same trick works if the line with lyrics is full, but as soon as I
need to add the third annotation just every now and then (and need to
start an almost empty third line), I get a clash.

I prepared a "somewhat minimal" example in the attachment.

Mojca

PS: please CC me


vertical-clash.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Behaviour of \paper and \layout in ly:book-process

2016-07-18 Thread Urs Liska
I am once more experimenting with ly:book-process. The background is
that I have managed to generate my complete score within a Scheme
function, but now I need the function to produce more than just one
\score (namely an alternation between multiple scores and top-level
markups).

But it seems somewhat unpredictable how the \paper and \layout blocks
behave.

In the following example the \paper block is not respected while the
\layout block is:

\version "2.19.45"

engrave =
#(define-void-function ()()
(let*
  ((book
#{
  \book {
\markup "Movement title (to be generated)"
\score {
  \new Staff { c' d' }
}
  }
#}))
  (ly:book-process
   book
   #{
 \paper {
   indent = 0\cm
 }
   #}
   #{
 \layout {
   \context {
 \Score {
   \override NoteHead.color = #blue
 }
   }
 }
   #}
   (ly:parser-output-name (*parser*)

\engrave

However, in my actual file the \layout block isn't respected either.

I can't give more details about the latter issue right now, but if I get
the first issue sorted out (which works with the MWE) I might get an
idea to get a step further with that.

Thanks for any hints
Urs

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


Re: Start music at specified measure without having to fill the previous.

2016-07-18 Thread Jan-Peter Voigt

Hi Urs,



Am 17.07.2016 um 22:45 schrieb Urs Liska:

Hi Dimitris,

...
First I must say I threw in the comment about the edition-engraver from
my mobile, without any further checks. And it seems that right now my
idea doesn't work.

That's right.


The edition-engraver is a tool that can insert music expressions at
specific positions in a score. That means these elements don't have to
be coded within the music. One typical use case is to do this with
overrides, to separate the engraving tweaks from the musical content. Or
one can insert elements like rehearsal marks or line breaks externally.

So I thought that - when the "mods" are entered as "LilyPond music
expressions" this might also be used to insert actual music at that
specific point in time (the edition-engraver addresses measures by
number, regardless of how "much" time has gone by so far). A quick test
showed that this doesn't work - yet. But I think this would be a
terrific option for many use cases, so one might try if using "music" as
a mod might be made to work. Jan-Peter, what do you think?
What I want is the possibility to insert cues with the edition-engraver. 
I wouldn't suggest entering whole scores that way. The problem is, that 
the edition-engraver needs to track time and follow a music stream 
beside the one triggering the main events. The edition-engraver is 
called only on moments, where there is an event triggered in the main 
stream.

For example (incomplete pseudo code):

{ c''1 }
\editionMod cues 1 2/8 Staff { e''8 d'' }

First the mod isn't triggered at all, because there is no event on that 
moment triggering the engraver-slots. Second, if there would be an 
event, how shall the second note get triggered?
That might all be possible, but IISC it leads to a reimplementation of 
the translation process. So Simons suggest of gridly or the like seams 
more usable. (There is a longstanding item on my agenda to document my 
lalily template approach and to produce an openlilylib module for it.)
Back to the topic, I would rather suggest extending the methods of 
assembling music expressions.


Best
Jan-Peter


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


Re: Start music at specified measure without having to fill the previous.

2016-07-18 Thread Jan-Peter Voigt

Hello Dimitris, hello Carl,

if you split your global/meta-variable with all you your timesigs, you 
can make use of $(mmrest-of-length globalA) to create 
multi-measure-rests, which fill all measures in global:


%

globalA = {
  \time 3/4
  \repeat unfold 3 s1*3/4
  \time 5/8
  \repeat unfold 2 s1*5/8
}
globalB = {
  \time 5/8
  \repeat unfold 1 s1*5/8
  \time 7/4
  \repeat unfold 2 s1*7/4
}

global = { \globalA \globalB }

\new Staff <<
  \global
  { $(mmrest-of-length globalA) c''8 b' d'' c'' a' }
>>

%

To shorten the input, you might use a function like this:

%

% to create skips instead of multimeasure-rests, substitute 'R' with 's'
timespan =
#(define-music-function (num frac)(integer? fraction?)
   #{ \time $frac \repeat unfold $num R$(ly:make-duration 0 0 (car 
frac)(cdr frac)) #})


%%%

{ \timespan 3 7/8 }

%

I thought about extending the edition-engraver. I'll post a comment as 
an answer to Urs message.


HTH
Jan-Peter


Am 18.07.2016 um 05:15 schrieb Carl Sorensen:



On 7/17/16 9:40 AM, "dtsmarin"  wrote:


Hello,

I'm working with a lot of time signature changes and it's very frustrating
to calculate all the rests needed to fill the measures before.
Is it possible to tell Lilypond start inserting music after a specified
number of measures even if they have different time signatures?


Can you define the time signatures to put in parallel with some other
content?

timesigs = {
\time 3/4
\repeat unfold 7 s1*3/4
\time 6/8
\repeat unfold 6 s1*6/8
\time 5/8
}


mynotes = {
\repeat unfold 103 c'8
}

\score {
   \new Staff
   <<
  \timesigs
  \mynotes
   >>
}


By using s1* you get a full measure skip.
By using \repeat unfold N, you N measures.

I realize that it is not quite as nice as saying "set the skip at measure
73", but it seems to me to not be that hard.

It would also be not too hard to create a Scheme function that could take
a list of (measure number, time signature) pairs and return something like
the timesigs variable above.  This would automate the process and get
almost exactly what you want.

HTH,

Carl


___
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