Re: input code

2019-12-11 Thread Noeck
Hi,

I am not really familiar with the parser, but I think LilyPond uses
Bison¹ and the input syntax is defined in lilypond/lily/parser.yy

¹: https://www.gnu.org/software/bison/

Best,
Joram



Re: input code

2019-12-11 Thread Andrew Bernard
\include  ?

What do you really want to do?

Andrew

On Thu, 12 Dec 2019 at 14:38, Freeman Gilmore  wrote:
>
> Where could i find the code that would reads the input file just i.e. { cis'4 
> }?



input code

2019-12-11 Thread Freeman Gilmore
Where could i find the code that would reads the input file just i.e. {
cis'4 }?

Thank you,
ƒg


Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Stefano Troncaro
Hi everyone

No. In fact I realized that it's not necessary anymore. I'm currently using
> the "class" attribute, set by Lilypond on the svg element, and I set it to
> the same value for all the slurs I want to modify.


Paolo, I see you wrote this while I was drafting a snippet. Here it is in
case you find it useful somehow:

\version "2.19.83"
> \language "english"
> \score {
>   <<
> \new Staff \relative { c''4( d) e( f) }
> \new PianoStaff <<
>   \new Staff \relative { 2( ) }
>   \new Staff \relative { \clef F c'2( c,) }
> >>
>   >>
>   \layout {
> \context {
>   \Score
>   \override Slur.after-line-breaking =
>   #(lambda (grob)
>  (let* ((cps (ly:grob-property grob 'control-points))
> (id "slur_1")) ;need to find how to enumerate slurs
>(ly:grob-set-nested-property! grob '(output-attributes id) id)
>(for-each
> (lambda (cp num)
>   (let* ((prefix (string-append "data-cp_" (number->string
> num)))
>  (pfx (string->symbol (string-append prefix "_x")))
>  (pfy (string->symbol (string-append prefix "_y"
> (ly:grob-set-nested-property! grob `(output-attributes
> ,pfx) (car cp))
> (ly:grob-set-nested-property! grob `(output-attributes
> ,pfy) (cdr cp))
>   ))
> cps
> '(1 2 3 4
> }
>   }
> }


It's not the most elegant but it saves the metadata in the svg file. I
couldn't figure out quickly how to enumerate the slurs but I know it can be
done, I just have to research a bit.

Let me know if I can be of use, shaping slurs is currently the most tedious
aspect of Lilypond for me, and the feature you are working on would be a
great help, so I would love to help in any way I can! Integrating it in
Frescobaldi would be even better.

El mié., 11 dic. 2019 a las 17:33, Paolo Pr ()
escribió:

>
>
> On Wed, Dec 11, 2019 at 9:13 PM Urs Liska  wrote:
>
>> Hi Paolo,
>> Am 11.12.19 um 20:36 schrieb Paolo Pr:
>>
>> Hi Urs,
>>
>> I had another idea meanwhile, which is much easier and it's 100%
>> Javascript (generated by Lilypond) inside the SVG file (then, only a common
>> browser is required, no Inkscape, Frescobaldi etc.). I'm implementing it
>> and I'll share the code with the community in the next days.
>>
>>
>> Please go ahead with whatever brings the ecosystem forward!
>>
>> However, let me state that using Frescobaldi as a framework for that
>> functionality was not a "generous offer" but rather a question. We would
>> *very* much appreciate adding such graphic curve shaping in Frescobaldi.
>> There you'd basically work in a browser too, with the added benefit of
>> having Frescobaldi's knowledge of the LilyPond language to write the tweak
>> back to the original file.
>>
>
> This is true, but given that the code is 100% Javascript I don't want to
> couple it to Frescobaldi  *for now*. When the code wil be completed (and
> working), we'll see how to integrate it in that editor.
>
>
>> Just two comments on your original post:
>>
>> 1)
>> Do you really need the IDs of the curve's control points? wouldn't they
>> somehow be available from the SVG curve object somehow?
>>
>
> No. In fact I realized that it's not necessary anymore. I'm currently
> using the "class" attribute, set by Lilypond on the svg element, and I set
> it to the same value for all the slurs I want to modify.
>
> 2)
>> For the modification please use the \shape function that is built into
>> LilyPond itself, not an LSR snippet. From the calculation perspective it's
>> probably identical to what you suggested but the input syntax is different.
>> Please have a look at
>> http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes.en.html#modifying-ties-and-slurs
>>
>>
> Thanks. This makes the template shorter to write/test
>
> Best,
>
>


Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Urs Liska


Am 11.12.19 um 21:31 schrieb Paolo Pr:



On Wed, Dec 11, 2019 at 9:13 PM Urs Liska > wrote:


Hi Paolo,

Am 11.12.19 um 20:36 schrieb Paolo Pr:

Hi Urs,

I had another idea meanwhile, which is much easier and it's 100%
Javascript (generated by Lilypond) inside the SVG file (then,
only a common browser is required, no Inkscape, Frescobaldi
etc.). I'm implementing it and I'll share the code with the
community in the next days.



Please go ahead with whatever brings the ecosystem forward!

However, let me state that using Frescobaldi as a framework for
that functionality was not a "generous offer" but rather a
question. We would *very* much appreciate adding such graphic
curve shaping in Frescobaldi. There you'd basically work in a
browser too, with the added benefit of having Frescobaldi's
knowledge of the LilyPond language to write the tweak back to the
original file.


This is true, but given that the code is 100% Javascript I don't want 
to couple it to Frescobaldi  *for now*. When the code wil be completed 
(and working), we'll see how to integrate it in that editor.



Fair point. Of course I didn't intend to discourage you in any way.



Just two comments on your original post:

1)
Do you really need the IDs of the curve's control points? wouldn't
they somehow be available from the SVG curve object somehow?


No. In fact I realized that it's not necessary anymore. I'm currently 
using the "class" attribute, set by Lilypond on the svg element, and I 
set it to the same value for all the slurs I want to modify.


2)
For the modification please use the \shape function that is built
into LilyPond itself, not an LSR snippet. From the calculation
perspective it's probably identical to what you suggested but the
input syntax is different. Please have a look at

http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes.en.html#modifying-ties-and-slurs


Thanks. This makes the template shorter to write/test



and especially it makes the resulting code work with regular LilyPond. 
Requiring external code like an LSR snippet would not be a good idea.


Best
Urs




Best,



Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Paolo Pr
On Wed, Dec 11, 2019 at 9:13 PM Urs Liska  wrote:

> Hi Paolo,
> Am 11.12.19 um 20:36 schrieb Paolo Pr:
>
> Hi Urs,
>
> I had another idea meanwhile, which is much easier and it's 100%
> Javascript (generated by Lilypond) inside the SVG file (then, only a common
> browser is required, no Inkscape, Frescobaldi etc.). I'm implementing it
> and I'll share the code with the community in the next days.
>
>
> Please go ahead with whatever brings the ecosystem forward!
>
> However, let me state that using Frescobaldi as a framework for that
> functionality was not a "generous offer" but rather a question. We would
> *very* much appreciate adding such graphic curve shaping in Frescobaldi.
> There you'd basically work in a browser too, with the added benefit of
> having Frescobaldi's knowledge of the LilyPond language to write the tweak
> back to the original file.
>

This is true, but given that the code is 100% Javascript I don't want to
couple it to Frescobaldi  *for now*. When the code wil be completed (and
working), we'll see how to integrate it in that editor.


> Just two comments on your original post:
>
> 1)
> Do you really need the IDs of the curve's control points? wouldn't they
> somehow be available from the SVG curve object somehow?
>

No. In fact I realized that it's not necessary anymore. I'm currently using
the "class" attribute, set by Lilypond on the svg element, and I set it to
the same value for all the slurs I want to modify.

2)
> For the modification please use the \shape function that is built into
> LilyPond itself, not an LSR snippet. From the calculation perspective it's
> probably identical to what you suggested but the input syntax is different.
> Please have a look at
> http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes.en.html#modifying-ties-and-slurs
>
>
Thanks. This makes the template shorter to write/test

Best,


Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Urs Liska

Hi Paolo,

Am 11.12.19 um 20:36 schrieb Paolo Pr:

Hi Urs,

I had another idea meanwhile, which is much easier and it's 100% 
Javascript (generated by Lilypond) inside the SVG file (then, only a 
common browser is required, no Inkscape, Frescobaldi etc.). I'm 
implementing it and I'll share the code with the community in the next 
days.



Please go ahead with whatever brings the ecosystem forward!

However, let me state that using Frescobaldi as a framework for that 
functionality was not a "generous offer" but rather a question. We would 
*very* much appreciate adding such graphic curve shaping in Frescobaldi. 
There you'd basically work in a browser too, with the added benefit of 
having Frescobaldi's knowledge of the LilyPond language to write the 
tweak back to the original file.


Just two comments on your original post:

1)
Do you really need the IDs of the curve's control points? wouldn't they 
somehow be available from the SVG curve object somehow?


2)
For the modification please use the \shape function that is built into 
LilyPond itself, not an LSR snippet. From the calculation perspective 
it's probably identical to what you suggested but the input syntax is 
different. Please have a look at 
http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes.en.html#modifying-ties-and-slurs


Best
Urs




On Wed, Dec 11, 2019 at 6:42 PM Urs Liska > wrote:


Hi Gerard,

Am 11.12.19 um 14:46 schrieb Gerard McConnell:

I get the impression that most of the serious Lilypond users want
to use only Lilypond for editing their scores.



This is partly true.



I used Lilypond with Inkscape for years, for my purposes it was
an ideal combination since I could create absolutely any graphic
effect or edit on the scores; no extra programming required, just
editing with Inkscape.  I think the reason that more people don't
work that way is because they can publish more easily using
Lilypond alone, extract parts, or make changes in the music any
time.



This is true but does not apply to Paolo's suggestion. The problem
many LilyPond users see is that when you need to make tweaks
afterwards you are essentially blocked from updating the content
without having to redo all the post-processing.

Paolo's idea would integrate the results of the post-processing
into the LilyPond input files and would therefore not suffer from
this problem.

I'll have to find the time to continue with my initial comment
about integrating this into Frescobaldi.

Urs




On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr mailto:paolopr...@gmail.com>> wrote:

Perhaps I found an easy way to modify slurs with any svg
editor, and automatically (or semi-automatically) correct the
.ly file with the changes made.
The procedure is the following, and I need a little help for
the programming parts in the Scheme language (I know it too
badly to write the functions myself, but I can take care of
the rest of the code, see the steps below)

1) For each slur, I visually generate the control points,
using the excellent function written by Aaron:

https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html

2) [Need help!] For each group of four control_points, I need
to associate four IDs obtained with a global variable that is
incremented with each new slur. For example, if I have two
slurs in my score, the control points IDs will be:

slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,

slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4

This ID must be set in the SVG object corresponding to each
control point. Can anyone modify the previous lilybin snippet
to get this result?
I know it is possible to do this, from what I read on this page:


http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats

3) I open with an editor (for example: Inkscape) the
generated SVG file; next to each slur to be corrected, I draw
the correct slur (bezier curve), and I associate to this slur
(always with the editor) an ID equal to the ID of the
respective control points, without the final substrting. For
example, if the control points have id equal to "slur_1_cp_1
(/ 2/3/4)", I will assign to the slur drawn with the editor
ID = "slur_1"

4) At this point (I can write a script in Python or some
other programming language), I can parser the new svg file
(with some xml library) and calculate for each slur created
with Inkscape, identified with IDSLUR, the difference of
coordinates (x, y) between its control points and control
points with ID = IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3,
IDSLUR_cp_4

5) Once these differences are 

Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Paolo Pr
Hi Urs,

I had another idea meanwhile, which is much easier and it's 100% Javascript
(generated by Lilypond) inside the SVG file (then, only a common browser is
required, no Inkscape, Frescobaldi etc.). I'm implementing it and I'll
share the code with the community in the next days.

On Wed, Dec 11, 2019 at 6:42 PM Urs Liska  wrote:

> Hi Gerard,
> Am 11.12.19 um 14:46 schrieb Gerard McConnell:
>
> I get the impression that most of the serious Lilypond users want to use
> only Lilypond for editing their scores.
>
>
> This is partly true.
>
>
> I used Lilypond with Inkscape for years, for my purposes it was an ideal
> combination since I could create absolutely any graphic effect or edit on
> the scores; no extra programming required, just editing with Inkscape.  I
> think the reason that more people don't work that way is because they can
> publish more easily using Lilypond alone, extract parts, or make changes in
> the music any time.
>
>
> This is true but does not apply to Paolo's suggestion. The problem many
> LilyPond users see is that when you need to make tweaks afterwards you are
> essentially blocked from updating the content without having to redo all
> the post-processing.
>
> Paolo's idea would integrate the results of the post-processing into the
> LilyPond input files and would therefore not suffer from this problem.
>
> I'll have to find the time to continue with my initial comment about
> integrating this into Frescobaldi.
>
> Urs
>
>
>
> On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr  wrote:
>
>> Perhaps I found an easy way to modify slurs with any svg editor, and
>> automatically (or semi-automatically) correct the .ly file with the changes
>> made.
>> The procedure is the following, and I need a little help for the
>> programming parts in the Scheme language (I know it too badly to write the
>> functions myself, but I can take care of the rest of the code, see the
>> steps below)
>>
>> 1) For each slur, I visually generate the control points, using the
>> excellent function written by Aaron:
>>
>> https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html
>>
>> 2) [Need help!] For each group of four control_points, I need to
>> associate four IDs obtained with a global variable that is incremented with
>> each new slur. For example, if I have two slurs in my score, the control
>> points IDs will be:
>>
>> slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,
>>
>> slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4
>>
>> This ID must be set in the SVG object corresponding to each control
>> point. Can anyone modify the previous lilybin snippet to get this result?
>> I know it is possible to do this, from what I read on this page:
>>
>>
>> http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats
>>
>> 3) I open with an editor (for example: Inkscape) the generated SVG file;
>> next to each slur to be corrected, I draw the correct slur (bezier curve),
>> and I associate to this slur (always with the editor) an ID equal to the ID
>> of the respective control points, without the final substrting. For
>> example, if the control points have id equal to "slur_1_cp_1 (/ 2/3/4)", I
>> will assign to the slur drawn with the editor ID = "slur_1"
>>
>> 4) At this point (I can write a script in Python or some other
>> programming language), I can parser the new svg file (with some xml
>> library) and calculate for each slur created with Inkscape, identified with
>> IDSLUR, the difference of coordinates (x, y) between its control points and
>> control points with ID = IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3, IDSLUR_cp_4
>>
>> 5) Once these differences are obtained, I can apply this function (taken
>> from http://lsr.di.unimi.it/LSR/Item?id=777  ) for each slur to modify:
>>
>> \shapeSlur # '(x1 y1 x2 y2 x3 y3 x4 y4)
>>
>> Where x1 y1 x2 y2 x3 y3 x4 y4 are precisely the differences between the
>> control points coordinates, just calculated.
>>
>> What do you think? Is it worth it? If someone can write the function of
>> point 2) (it shouldn't be difficult, nor time-consuming), I can take care
>> of point 4)
>>
>


Re: Cleanly showing every measure number

2019-12-11 Thread Rick Kimpel
Sam,
This doesn't really answer your question, but it might provide a different 
perspective. In handbell music, it is standard to number each measure centered 
over the barlines. Normally the number should be above ties, slurs and notes, 
as shown in your MWE. I think it helps readability.

I use:
  \override Score.BarNumber.break-visibility = ##(#f #t #t)
  \override Score.BarNumber.self-alignment-X = #CENTER

Regards,
Rick


From: Sam Bivens 
Sent: Monday, December 9, 2019 1:37 PM
To: lilypond-user 
Subject: Cleanly showing every measure number

Hi everyone,
For pedagogical reasons, I want to include every measure number in my scores. 
I've been using the LSR's consistently left-aligned numbers available at 
http://lsr.di.unimi.it/LSR/Item?id=840
But this causes problems with slurs, ledger lines, etc., which push the measure 
numbers up high above the given measure (see the attached MWE).
Thus I have two related questions:

  *   How might I adjust \consistentlyLeftAlignedMeasureNumbers to keep them 
consistently near the staff, no matter what the music is?
  *   Alternatively, if there are others that require every number to be 
measured, how have you solved this problem? I'm unfortunately not too keen on 
the solution shown in the recent "bar numbers at top of score" thread.

Thanks,
Sam

--
Sam Bivens, Ph.D.
Music Theory Faculty
Cleveland Institute of Music
11021 East Boulevard
Cleveland, OH 44106
sam.biv...@cim.edu


Re: polyrhythm with multiple tempi

2019-12-11 Thread Devin Ulibarri
On Wed, 2019-12-11 at 15:22 -0300, Stefano Troncaro wrote:
> I've nothing to add to the discussion, but I felt the need to express
> that I am completely impressed by how easily Lilypond manages this.
> This is awesome!
> 
Me too!
Devin
> 


Re: polyrhythm with multiple tempi

2019-12-11 Thread Stefano Troncaro
I've nothing to add to the discussion, but I felt the need to express that
I am completely impressed by how easily Lilypond manages this. This is
awesome!

El mié., 11 dic. 2019 a las 11:10, Kieren MacMillan (<
kieren_macmil...@sympatico.ca>) escribió:

> Hi there,
>
> > \scaleDurations does not scale the measure length as well. Try inserting
> >   \set Timing.measureLength = #(ly:make-moment 12/8)
> > in the \slower part.
>
> That’s great! Thanks.
>
> Note for future readers: the order of operations is important! The
> override must happen *after* the \time command. So the final [working]
> snippet is
>
> %%%  SNIPPET BEGINS
> \version "2.19.83"
>
> \layout {
>   \context {
> \Score
> \remove "Timing_translator"
> \remove "Default_bar_line_engraver"
> \remove "Metronome_mark_engraver"
>   }
>   \context {
> \Staff
> \consists "Timing_translator"
> \consists "Default_bar_line_engraver"
> \consists "Metronome_mark_engraver"
>   }
> }
>
> slower = {
>   \time 4/4
>   \tempo 4=90
>   \set Timing.measureLength = #(ly:make-moment 12/9)
>   \scaleDurations 120/90 {
> \repeat unfold 16 { c'4 }
>   }
> }
>
> faster = {
>   \time 4/4
>   \tempo 4=120
>   \repeat unfold 20 { c'4 }
> }
>
> \score {
>   <<
> \new Staff \slower
> \new Staff \faster
>   >>
> }
> %%%  SNIPPET ENDS
>
> > See you in Salzburg!
>
> Looking forward to it!
> Kieren.
> 
>
> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
>
>
>


Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Urs Liska

Hi Gerard,

Am 11.12.19 um 14:46 schrieb Gerard McConnell:
I get the impression that most of the serious Lilypond users want to 
use only Lilypond for editing their scores.



This is partly true.


I used Lilypond with Inkscape for years, for my purposes it was an 
ideal combination since I could create absolutely any graphic effect 
or edit on the scores; no extra programming required, just editing 
with Inkscape.  I think the reason that more people don't work that 
way is because they can publish more easily using Lilypond alone, 
extract parts, or make changes in the music any time.



This is true but does not apply to Paolo's suggestion. The problem many 
LilyPond users see is that when you need to make tweaks afterwards you 
are essentially blocked from updating the content without having to redo 
all the post-processing.


Paolo's idea would integrate the results of the post-processing into the 
LilyPond input files and would therefore not suffer from this problem.


I'll have to find the time to continue with my initial comment about 
integrating this into Frescobaldi.


Urs




On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr > wrote:


Perhaps I found an easy way to modify slurs with any svg editor,
and automatically (or semi-automatically) correct the .ly file
with the changes made.
The procedure is the following, and I need a little help for the
programming parts in the Scheme language (I know it too badly to
write the functions myself, but I can take care of the rest of the
code, see the steps below)

1) For each slur, I visually generate the control points, using
the excellent function written by Aaron:

https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html

2) [Need help!] For each group of four control_points, I need to
associate four IDs obtained with a global variable that is
incremented with each new slur. For example, if I have two slurs
in my score, the control points IDs will be:

slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,

slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4

This ID must be set in the SVG object corresponding to each
control point. Can anyone modify the previous lilybin snippet to
get this result?
I know it is possible to do this, from what I read on this page:


http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats

3) I open with an editor (for example: Inkscape) the generated SVG
file; next to each slur to be corrected, I draw the correct slur
(bezier curve), and I associate to this slur (always with the
editor) an ID equal to the ID of the respective control points,
without the final substrting. For example, if the control points
have id equal to "slur_1_cp_1 (/ 2/3/4)", I will assign to the
slur drawn with the editor ID = "slur_1"

4) At this point (I can write a script in Python or some other
programming language), I can parser the new svg file (with some
xml library) and calculate for each slur created with Inkscape,
identified with IDSLUR, the difference of coordinates (x, y)
between its control points and control points with ID =
IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3, IDSLUR_cp_4

5) Once these differences are obtained, I can apply this function
(taken from http://lsr.di.unimi.it/LSR/Item?id=777 ) for each slur
to modify:

\shapeSlur # '(x1 y1 x2 y2 x3 y3 x4 y4)

Where x1 y1 x2 y2 x3 y3 x4 y4 are precisely the differences
between the control points coordinates, just calculated.

What do you think? Is it worth it? If someone can write the
function of point 2) (it shouldn't be difficult, nor
time-consuming), I can take care of point 4)



Re: problems with cues

2019-12-11 Thread David Kastrup
Thomas Morley  writes:

> Am Mi., 11. Dez. 2019 um 15:16 Uhr schrieb David Kastrup :
>>
>> "Peter Gentry"  writes:
>>
>> > It seems that the issue reared its head as a result of my "erroneous"
>> > assumption that
>> >
>> > \book {
>> >
>> >  Page layout stuff for front page
>> >
>> > }
>> >
>> > \bookpart {
>> >
>> > Header & music
>> >
>> > }
>> >
>> > \bookpart {
>> >
>> > Header & music
>> >
>> > }
>> >
>> > Was a way to go.
>> >
>> >
>> >
>> > Although this has worked over the years it doesn't today.
>>
>> A toplevel \bookpart belongs to the "default" book, and a toplevel \book
>> introduces a non-default book.
>>
>> Can someone with access to older versions check whether this was
>> different at some not-too-distant point of time in history?  If it was,
>> something intended to be a "refactoring" might have been an actual
>> change.  I am not ruling that out, but should be surprised if it were
>> so.
>
> I think bookparts were introduced with:
>
> commit dbefd4b8d0249c6a739d09118f3e0a71001c1c52
>
> Likely in 2.11.65, so obviously 2.10.33 can't cope with them, for
> 2.12.3 I can confirm David W's findings.

So for now I'd say that Peter's findings, troubling as they may appear,
cannot be traced to some fundamental unintended change of behavior of
LilyPond.  We'll definitely need something more definite and/or
reproducible to work with to propose any sensible remedy for the
problems he currently is encountering.

-- 
David Kastrup



Re: problems with cues

2019-12-11 Thread Thomas Morley
Am Mi., 11. Dez. 2019 um 15:16 Uhr schrieb David Kastrup :
>
> "Peter Gentry"  writes:
>
> > It seems that the issue reared its head as a result of my "erroneous"
> > assumption that
> >
> > \book {
> >
> >  Page layout stuff for front page
> >
> > }
> >
> > \bookpart {
> >
> > Header & music
> >
> > }
> >
> > \bookpart {
> >
> > Header & music
> >
> > }
> >
> > Was a way to go.
> >
> >
> >
> > Although this has worked over the years it doesn't today.
>
> A toplevel \bookpart belongs to the "default" book, and a toplevel \book
> introduces a non-default book.
>
> Can someone with access to older versions check whether this was
> different at some not-too-distant point of time in history?  If it was,
> something intended to be a "refactoring" might have been an actual
> change.  I am not ruling that out, but should be surprised if it were
> so.
>
> --
> David Kastrup

I think bookparts were introduced with:

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.

Likely in 2.11.65, so obviously 2.10.33 can't cope with them, for
2.12.3 I can confirm David W's findings.

Cheers,
  Harm



Re: problems with cues

2019-12-11 Thread David Wright
On Wed 11 Dec 2019 at 15:16:04 (+0100), David Kastrup wrote:
> "Peter Gentry"  writes:
> > It seems that the issue reared its head as a result of my "erroneous"
> > assumption that
> > \book {
> >  Page layout stuff for front page
> > } 
> > \bookpart {
> > Header & music
> > }
> > \bookpart {
> > Header & music
> > }
> >
> > Was a way to go.
> >
> > Although this has worked over the years it doesn't today.
> 
> A toplevel \bookpart belongs to the "default" book, and a toplevel \book
> introduces a non-default book.
> 
> Can someone with access to older versions check whether this was
> different at some not-too-distant point of time in history?  If it was,
> something intended to be a "refactoring" might have been an actual
> change.  I am not ruling that out, but should be surprised if it were
> so.

I just installed 2.12.3 and ran the attached. It gives the same
documents as 2.19.83 although their appearance is obviously different
wrt scaling of objects. 2.10.33 didn't understand \bookpart.

Cheers,
David.
\version "2.18.2"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\book {
  \header { instrument = "Flute 2 layout 12" }
  \score {
\new Staff \fluteII
\layout {
  #(layout-set-staff-size 12)
}
  }
}

#(set-global-staff-size 17)
\bookpart {
  \header { instrument = "Full Score global 17" }
  \score {
\new StaffGroup <<
  \new Staff \with { instrumentName = "Fl. 1" } \fluteI
  \new Staff \with { instrumentName = "Fl. 2" } \fluteII
>>
  }
}

\bookpart {
  \header { instrument = "Flute 1 layout in mod 24" }
  \score {
\new Staff \fluteI
\layout {
  #(layout-set-absolute-staff-size-in-module
(current-module) (* 24 (eval 'pt (current-module
}
  }
}

\bookpart {
  \header { instrument = "Flute 2 layout 8" }
  \score {
\new Staff \fluteII
\layout {
  #(layout-set-staff-size 8)
}
  }
}


Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Urs Liska
I'm at work right now, but that looks like something we could work on  within 
Frescobaldi. In fact we had already made some attempts in that durection.

Urs


Am 11. Dezember 2019 15:11:18 MEZ schrieb Paolo Pr :
>Of course, but the trial-and-error method for placing the slurs is
>really
>time consuming. Maybe the only one that needs a help with a GUI editor.
>The
>method I described is not difficult, really. I think it requires few
>additional lines of code to an already implemented function (
>\showControlPoints ). Parsing a SVG file by ID is easy as well. Then
>I'm
>curious to see the result...
>
>On Wed, Dec 11, 2019 at 2:46 PM Gerard McConnell 
>wrote:
>
>> I get the impression that most of the serious Lilypond users want to
>use
>> only Lilypond for editing their scores.   I used Lilypond with
>Inkscape for
>> years, for my purposes it was an ideal combination since I could
>create
>> absolutely any graphic effect or edit on the scores; no extra
>programming
>> required, just editing with Inkscape.  I think the reason that more
>people
>> don't work that way is because they can publish more easily using
>Lilypond
>> alone, extract parts, or make changes in the music any time.
>>
>> On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr 
>wrote:
>>
>>> Perhaps I found an easy way to modify slurs with any svg editor, and
>>> automatically (or semi-automatically) correct the .ly file with the
>changes
>>> made.
>>> The procedure is the following, and I need a little help for the
>>> programming parts in the Scheme language (I know it too badly to
>write the
>>> functions myself, but I can take care of the rest of the code, see
>the
>>> steps below)
>>>
>>> 1) For each slur, I visually generate the control points, using the
>>> excellent function written by Aaron:
>>>
>>>
>https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html
>>>
>>> 2) [Need help!] For each group of four control_points, I need to
>>> associate four IDs obtained with a global variable that is
>incremented with
>>> each new slur. For example, if I have two slurs in my score, the
>control
>>> points IDs will be:
>>>
>>> slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,
>>>
>>> slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4
>>>
>>> This ID must be set in the SVG object corresponding to each control
>>> point. Can anyone modify the previous lilybin snippet to get this
>result?
>>> I know it is possible to do this, from what I read on this page:
>>>
>>>
>>>
>http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats
>>>
>>> 3) I open with an editor (for example: Inkscape) the generated SVG
>file;
>>> next to each slur to be corrected, I draw the correct slur (bezier
>curve),
>>> and I associate to this slur (always with the editor) an ID equal to
>the ID
>>> of the respective control points, without the final substrting. For
>>> example, if the control points have id equal to "slur_1_cp_1 (/
>2/3/4)", I
>>> will assign to the slur drawn with the editor ID = "slur_1"
>>>
>>> 4) At this point (I can write a script in Python or some other
>>> programming language), I can parser the new svg file (with some xml
>>> library) and calculate for each slur created with Inkscape,
>identified with
>>> IDSLUR, the difference of coordinates (x, y) between its control
>points and
>>> control points with ID = IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3,
>IDSLUR_cp_4
>>>
>>> 5) Once these differences are obtained, I can apply this function
>(taken
>>> from http://lsr.di.unimi.it/LSR/Item?id=777  ) for each slur to
>modify:
>>>
>>> \shapeSlur # '(x1 y1 x2 y2 x3 y3 x4 y4)
>>>
>>> Where x1 y1 x2 y2 x3 y3 x4 y4 are precisely the differences between
>the
>>> control points coordinates, just calculated.
>>>
>>> What do you think? Is it worth it? If someone can write the function
>of
>>> point 2) (it shouldn't be difficult, nor time-consuming), I can take
>care
>>> of point 4)
>>>
>>

-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Re: problems with cues

2019-12-11 Thread Phil Holmes
If I replace the bits in the book/bookparts section with a single markup, 
the only difference I can see between 2.19.80 and 2.12.3 is that the top 
margin is slightly different and the later version includes a page number.


--
Phil Holmes


- Original Message - 
From: "David Kastrup" 

To: "Peter Gentry" 
Cc: ; "Lilypond Users" 
Sent: Wednesday, December 11, 2019 2:16 PM
Subject: Re: problems with cues



"Peter Gentry"  writes:


It seems that the issue reared its head as a result of my "erroneous"
assumption that

\book {

 Page layout stuff for front page

}

\bookpart {

Header & music

}

\bookpart {

Header & music

}

Was a way to go.



Although this has worked over the years it doesn't today.


A toplevel \bookpart belongs to the "default" book, and a toplevel \book
introduces a non-default book.

Can someone with access to older versions check whether this was
different at some not-too-distant point of time in history?  If it was,
something intended to be a "refactoring" might have been an actual
change.  I am not ruling that out, but should be surprised if it were
so.

--
David Kastrup







Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Gerard McConnell
I get the impression that most of the serious Lilypond users want to use
only Lilypond for editing their scores.   I used Lilypond with Inkscape for
years, for my purposes it was an ideal combination since I could create
absolutely any graphic effect or edit on the scores; no extra programming
required, just editing with Inkscape.  I think the reason that more people
don't work that way is because they can publish more easily using Lilypond
alone, extract parts, or make changes in the music any time.

On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr  wrote:

> Perhaps I found an easy way to modify slurs with any svg editor, and
> automatically (or semi-automatically) correct the .ly file with the changes
> made.
> The procedure is the following, and I need a little help for the
> programming parts in the Scheme language (I know it too badly to write the
> functions myself, but I can take care of the rest of the code, see the
> steps below)
>
> 1) For each slur, I visually generate the control points, using the
> excellent function written by Aaron:
>
> https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html
>
> 2) [Need help!] For each group of four control_points, I need to associate
> four IDs obtained with a global variable that is incremented with each new
> slur. For example, if I have two slurs in my score, the control points IDs
> will be:
>
> slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,
>
> slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4
>
> This ID must be set in the SVG object corresponding to each control point.
> Can anyone modify the previous lilybin snippet to get this result?
> I know it is possible to do this, from what I read on this page:
>
>
> http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats
>
> 3) I open with an editor (for example: Inkscape) the generated SVG file;
> next to each slur to be corrected, I draw the correct slur (bezier curve),
> and I associate to this slur (always with the editor) an ID equal to the ID
> of the respective control points, without the final substrting. For
> example, if the control points have id equal to "slur_1_cp_1 (/ 2/3/4)", I
> will assign to the slur drawn with the editor ID = "slur_1"
>
> 4) At this point (I can write a script in Python or some other programming
> language), I can parser the new svg file (with some xml library) and
> calculate for each slur created with Inkscape, identified with IDSLUR, the
> difference of coordinates (x, y) between its control points and control
> points with ID = IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3, IDSLUR_cp_4
>
> 5) Once these differences are obtained, I can apply this function (taken
> from http://lsr.di.unimi.it/LSR/Item?id=777  ) for each slur to modify:
>
> \shapeSlur # '(x1 y1 x2 y2 x3 y3 x4 y4)
>
> Where x1 y1 x2 y2 x3 y3 x4 y4 are precisely the differences between the
> control points coordinates, just calculated.
>
> What do you think? Is it worth it? If someone can write the function of
> point 2) (it shouldn't be difficult, nor time-consuming), I can take care
> of point 4)
>


Re: How to remove all notes and only show Chords and Lyrics?

2019-12-11 Thread Kieren MacMillan
Hi Aaron,

> I would probably use a \paper section like this to evenly spread lines across 
> the page:

Hmmm… As a typesetter, I would much prefer in this case to have ragged-bottom = 
##t, and then deal with the “line leading” properly/correctly. I’ll poke around 
to see if that can be done well.

And of course the inter-lyric gaps still need handling/fixing…

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




Re: problems with cues

2019-12-11 Thread David Kastrup
"Peter Gentry"  writes:

> It seems that the issue reared its head as a result of my "erroneous"
> assumption that
>
> \book {
>
>  Page layout stuff for front page
>
> } 
>
> \bookpart {
>
> Header & music
>
> }
>
> \bookpart {
>
> Header & music
>
> }
>
> Was a way to go.
>
>  
>
> Although this has worked over the years it doesn't today.

A toplevel \bookpart belongs to the "default" book, and a toplevel \book
introduces a non-default book.

Can someone with access to older versions check whether this was
different at some not-too-distant point of time in history?  If it was,
something intended to be a "refactoring" might have been an actual
change.  I am not ruling that out, but should be surprised if it were
so.

-- 
David Kastrup



Re: (Pheraps) a not difficult way for modifying slurs with any SVG editor and feed Lilypond with modifications

2019-12-11 Thread Paolo Pr
Of course, but the trial-and-error method for placing the slurs is really
time consuming. Maybe the only one that needs a help with a GUI editor. The
method I described is not difficult, really. I think it requires few
additional lines of code to an already implemented function (
\showControlPoints ). Parsing a SVG file by ID is easy as well. Then I'm
curious to see the result...

On Wed, Dec 11, 2019 at 2:46 PM Gerard McConnell 
wrote:

> I get the impression that most of the serious Lilypond users want to use
> only Lilypond for editing their scores.   I used Lilypond with Inkscape for
> years, for my purposes it was an ideal combination since I could create
> absolutely any graphic effect or edit on the scores; no extra programming
> required, just editing with Inkscape.  I think the reason that more people
> don't work that way is because they can publish more easily using Lilypond
> alone, extract parts, or make changes in the music any time.
>
> On Wed, Dec 11, 2019 at 4:19 AM Paolo Pr  wrote:
>
>> Perhaps I found an easy way to modify slurs with any svg editor, and
>> automatically (or semi-automatically) correct the .ly file with the changes
>> made.
>> The procedure is the following, and I need a little help for the
>> programming parts in the Scheme language (I know it too badly to write the
>> functions myself, but I can take care of the rest of the code, see the
>> steps below)
>>
>> 1) For each slur, I visually generate the control points, using the
>> excellent function written by Aaron:
>>
>> https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00266.html
>>
>> 2) [Need help!] For each group of four control_points, I need to
>> associate four IDs obtained with a global variable that is incremented with
>> each new slur. For example, if I have two slurs in my score, the control
>> points IDs will be:
>>
>> slur_1_cp_1, slur_1_cp_2, slur_1_cp_3, slur_1_cp_4,
>>
>> slur_2_cp_1, slur_2_cp_2, slur_2_cp_3, slur_2_cp_4
>>
>> This ID must be set in the SVG object corresponding to each control
>> point. Can anyone modify the previous lilybin snippet to get this result?
>> I know it is possible to do this, from what I read on this page:
>>
>>
>> http://lilypond.org/doc/v2.19/Documentation/notation/alternative-output-formats
>>
>> 3) I open with an editor (for example: Inkscape) the generated SVG file;
>> next to each slur to be corrected, I draw the correct slur (bezier curve),
>> and I associate to this slur (always with the editor) an ID equal to the ID
>> of the respective control points, without the final substrting. For
>> example, if the control points have id equal to "slur_1_cp_1 (/ 2/3/4)", I
>> will assign to the slur drawn with the editor ID = "slur_1"
>>
>> 4) At this point (I can write a script in Python or some other
>> programming language), I can parser the new svg file (with some xml
>> library) and calculate for each slur created with Inkscape, identified with
>> IDSLUR, the difference of coordinates (x, y) between its control points and
>> control points with ID = IDSLUR_cp_1, IDSLUR_cp_2, IDSLUR_cp_3, IDSLUR_cp_4
>>
>> 5) Once these differences are obtained, I can apply this function (taken
>> from http://lsr.di.unimi.it/LSR/Item?id=777  ) for each slur to modify:
>>
>> \shapeSlur # '(x1 y1 x2 y2 x3 y3 x4 y4)
>>
>> Where x1 y1 x2 y2 x3 y3 x4 y4 are precisely the differences between the
>> control points coordinates, just calculated.
>>
>> What do you think? Is it worth it? If someone can write the function of
>> point 2) (it shouldn't be difficult, nor time-consuming), I can take care
>> of point 4)
>>
>


Re: polyrhythm with multiple tempi

2019-12-11 Thread Kieren MacMillan
Hi there,

> \scaleDurations does not scale the measure length as well. Try inserting
>   \set Timing.measureLength = #(ly:make-moment 12/8)
> in the \slower part.

That’s great! Thanks.

Note for future readers: the order of operations is important! The override 
must happen *after* the \time command. So the final [working] snippet is

%%%  SNIPPET BEGINS
\version "2.19.83"

\layout {
  \context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
\remove "Metronome_mark_engraver"
  }
  \context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
\consists "Metronome_mark_engraver"
  }
}

slower = {
  \time 4/4
  \tempo 4=90
  \set Timing.measureLength = #(ly:make-moment 12/9)
  \scaleDurations 120/90 {
\repeat unfold 16 { c'4 }
  }
}

faster = {
  \time 4/4
  \tempo 4=120
  \repeat unfold 20 { c'4 }
}

\score {
  <<
\new Staff \slower
\new Staff \faster
  >>
}
%%%  SNIPPET ENDS

> See you in Salzburg!

Looking forward to it!
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




problems with cues

2019-12-11 Thread Peter Gentry
It seems that the issue reared its head as a result of my "erroneous"
assumption that

\book {

 Page layout stuff for front page

} 

\bookpart {

Header & music

}

\bookpart {

Header & music

}

Was a way to go.

 

Although this has worked over the years it doesn't today.

If I just use \bookpart for each section all is well.

My trap was finding something that worked and using that as a template..

 

I have just  tried another old file and that too has failed, so possibly a
recent minor change somewhere in  Lily,Fresco,or Windows  has highlighted my
original sin.

There is no profit in trying to find the reason.

 

 Regards Peter

 



Re: How to remove all notes and only show Chords and Lyrics?

2019-12-11 Thread Aaron Hill

On 2019-12-10 10:10 pm, Dominic Sonntag wrote:

Hi Kieren,

we're coming closer! But running your snippet as-is through lilypond I
still have some
gaps (see attached screenshot).

Now they are (probably) no more between chords and lyrics but between
the whole lines.

Using annotate-spacing I see that there is a greater "extra dist
(system-system-spacing)"
between some lines. In most lines it is less than 2, but the two gaps
have 5.21 or 27.86.
How can I reduce those? I can't find a reason for those gaps being that 
big ...


This seems to help things behave a little better w.r.t. system-system 
spacing:



  % Do not use zero lines, but keep one around and hide it.
  \override StaffSymbol.line-count = 1
  \override StaffSymbol.transparent = ##t


I would probably use a \paper section like this to evenly spread lines 
across the page:



  \paper {
indent = 0
ragged-right = ##t
ragged-bottom = ##f
ragged-last-bottom = ##f
system-system-spacing =
  #'((basic-distance . 0) (minimum-distance . 0)
 (padding . 0) (stretchability . 250))
last-bottom-spacing =
  #'((basic-distance . 0) (minimum-distance . 0)
 (padding . 0) (stretchability . 1000))
  }


This uses the strechability feature to divide the remaining space 
between the bottom of the page and between the systems.



-- Aaron Hill