Re: Changing transposition during a score

2024-11-02 Thread David Sumbler
On Sat, 2024-11-02 at 19:22 +0100, David Kastrup wrote:
> David Sumbler  writes:
> 
> > I have a piece which is in D-flat major, with a middle section
> > which is
> > in C-sharp minor.  Both of these keys are more easily written a
> > semitone lower so I have tried to use \transposition, but I can't
> > get
> > this to work.
> > 
> > For instance, with the following code, Lilypond throws out a
> > "Spurious
> > expression in \score" error message when it meets the 2nd
> > \transposition line:
> > 
> > \version "2.24.3"
> > \language "english"
> > 
> > \score {
> >   \transpose c df {
> >     \relative c'' {
> >       \key c \major
> >       c
> >     }
> >   }
> >   \transpose c cs {
> >     \relative c'' {
> >       \key c \minor
> >       c
> >     }
> >   }
> > }
> > 
> > What am I doing wrong?
> 
> Putting two music expressions in one \score.  \score only accepts a
> single music expression.
> 
> This has nothing to do with transpositions.  You are missing an
> enclosing { ... } around both of your parts in order to form a single
> sequential music expression from them.

Ah - I wasn't aware of this rule, although now that I have been told I
can see that it makes sense.   And I have now found it in the NR.

Thanks for your swift and clear reply.  Problem solved!

David


Changing transposition during a score

2024-11-02 Thread David Sumbler
I have a piece which is in D-flat major, with a middle section which is
in C-sharp minor.  Both of these keys are more easily written a
semitone lower so I have tried to use \transposition, but I can't get
this to work.

For instance, with the following code, Lilypond throws out a "Spurious
expression in \score" error message when it meets the 2nd
\transposition line:

\version "2.24.3"
\language "english"

\score {
  \transpose c df {
    \relative c'' {
      \key c \major
      c
    }
  }
  \transpose c cs {
    \relative c'' {
      \key c \minor
      c
    }
  }
}

What am I doing wrong?

David


Re: Creating space at the top of a page

2024-10-19 Thread David Sumbler
Thank you both for your helpful replies.  I now have things working
just as I had hoped.

David

On Fri, 2024-10-18 at 07:03 -0400, Kieren MacMillan wrote:
> Hi David,
> 
> As Xavier points out:
> > It's not odd-header-markup but oddHeaderMarkup (same for even).
> 
> I also thought I would just offer this snippet, which shows a
> possible structure using bookpart:
> 
> %%%  SNIPPET BEGINS
> \version "2.24.3"
> 
> 
> %%  GLOBAL PAPER DEFINITIONS
> \paper {
>   oddHeaderMarkup = \markup { \fromproperty #'header:title }
>   evenHeaderMarkup = \markup { \fromproperty #'header:piece }
> }
> 
> 
> %%  MUSIC VARIABLES (can be \include-d from other files!)
> 
> hello = { c''1 }
> 
> goodbye = { \clef bass c,,1 }
> 
> 
> %%  THE SCORE
> \book {
> 
>   %%  BOOKPART FOR FIRST PIECE
>   \bookpart {
> 
>     \header {
>   title = "Hello (title)"
>   piece = "Hello (piece)"
>     }
>     
>     \score {
>   \new Staff \hello
>     }
>   }
>   
>   %%  BOOKPART FOR SECOND PIECE
>   \bookpart {
> 
>     \header {
>   title = "Goodbye (title)"
>   piece = "Goodbye (piece)"
>     }
>     
>     \score {
>   \new Staff \goodbye
>     }
>   }
>   
> }
> %%%  SNIPPET ENDS
> 
> This is the kind of thing I do with my large-scale scores (but
> obviously with custom titles!).
> 
> As I said in my last email, if you’re splitting a single score across
> multiple pages — as opposed to having individual scores (like my
> example above) — then the \bookpart method won’t work for you. In
> that case, I would recommend either customizing the titling (to avoid
> the piece header appearing on the first page!), or use a custom
> header parameter:
> 
> %%%  SNIPPET BEGINS
> \version "2.24.3"
> 
> 
> %%  GLOBAL PAPER DEFINITIONS
> \paper {
>   oddHeaderMarkup = \markup { \fromproperty #'header:title }
>   evenHeaderMarkup = \markup { \fromproperty #'header:RH-header }
> }
> 
> 
> %%  MUSIC VARIABLES (can be \include-d from other files!)
> 
> hello = { c''1 \pageBreak c''1 }
> 
> 
> %%  THE SCORE
> \book {
> 
>   %%  BOOKPART FOR SPLIT PIECE
>   \bookpart {
> 
>     \header {
>   title = "Hello (title)"
>   RH-header = "Goodbye (piece)"
>     }
>     
>     \score {
>   \new Staff \hello
>     }
>   }
>   
> }
> %%%  SNIPPET ENDS
> 
> Hope that helps!
> Kieren.
> __
> 
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal
> working hours.
> 



Re: Creating space at the top of a page

2024-10-18 Thread David Sumbler
On Fri, 2024-10-18 at 12:56 +0200, Xavier Scheuer wrote:
> On Fri, 18 Oct 2024 at 12:48, David Sumbler 
> wrote:
> >
> > One of these 2 solutions would almost certainly work for me, if
> only I could get the basics sorted out.  But after a lot of
> experimentation, I cannot get one header on page 1 and another on
> page 2.  Clearly I am doing something fundamentally wrong.
> 
> > 
> Hello,
> 
> It's not odd-header-markup but oddHeaderMarkup (same for even).
> 
> Kind regards,
> Xavier

Doh!  How stupid of me.  Apologies for wasting time, but thanks for
your quick response.

David





Re: Creating space at the top of a page

2024-10-18 Thread David Sumbler
On Thu, 2024-10-17 at 13:32 -0400, Kieren MacMillan wrote:
> Hi David,
> 
> > > So, for example, I would like the following:
> > > Page 1, containing items 1 and 2: header shows '1&2'
> > > Pages 2-3, each containing a single item: headers show '3' and
> > > '4'
> > > respectively
> > > Pages 4-5, containing item 5 spread over the 2 pages: headers
> > > show '5'
> > > and '(5)'
> > > I don't want the actual page numbers shown at all.
> 
> I do this all the time in my large-scale scores (musicals, operas,
> songbooks, etc.) — it just requires a careful and intentional use of
> \bookpart and \header.
> 
> > Maybe Jean's great code in
> > https://lists.gnu.org/archive/html/lilypond-user/2022-12/msg00095.html
> > could be used here?
> 
> That would definitely work better (i.e., at all!) if you’re changing
> headers mid-score.
> 
> Hope that helps!

One of these 2 solutions would almost certainly work for me, if only I
could get the basics sorted out.  But after a lot of experimentation, I
cannot get one header on page 1 and another on page 2.  Clearly I am
doing something fundamentally wrong.

The following code gives me both headers on page 1, and neither on page
2, which of course is not what I want.  What am I doing wrong?

\version "2.24.3"

\header {
  title = "Hello"
  piece = "Goodbye"
}

\paper{
  odd-header-markup = \markup { \fromproperty #'header:title }
  even-header-markup = \markup { \fromproperty #'header:piece }
}

\new Staff {
  s1
  \pageBreak
  s1
}

David


Re: Creating space at the top of a page

2024-10-17 Thread David Sumbler
Thank you for the suggestions so far (one of them was off-list).  They
should enable me to do what I asked for, i.e. to leave a blank space at
the top of certain right-hand pages.

But even what I asked for isn't what I would really like in a perfect
world, which is as follows.

The items are numbered sequentially, starting with number 1.  At the
top of each page, I would like to have (in fairly large print) the
number(s) of the item(s) contained on that page, placed at the outer
edge of the page.  Sometimes there might be 2 items on a page.  Other
items might take up 1 or 2 pages, possibly more.  So, for example, I
would like the following:

Page 1, containing items 1 and 2: header shows '1&2'
Pages 2-3, each containing a single item: headers show '3' and '4'
respectively
Pages 4-5, containing item 5 spread over the 2 pages: headers show '5'
and '(5)'
I don't want the actual page numbers shown at all.

I'm not sure that there is any way of doing this in Lilypond.  Clearly
I need to specify the contents of the page header separately for each
item, but so far as I can see I can only have page headers which repeat
through the whole book.  If I specify oddHeaderMarkup etc. in the files
for individual items, which are called by my top-level file, I find
that the last one is applied to the whole document.

Is there some way of doing what I want which would still allow me to
end up with a single output file?

David

On Wed, 2024-10-16 at 22:03 +0100, David Sumbler wrote:
> I am setting a series of items for a single melody instrument (i.e.
> using one stave).  These items are generally quite short and will fit
> on one page.  Sometimes I can even get 2 on a page.
> 
> But a few of them require 2 pages, and naturally I try to arrange
> things so that they cover a left-hand page and a right-hand page in
> that order.
> 
> At the head of each item I have a markup which takes up something
> like 2 cm. of space.  I would like to create a similar empty space on
> the right-hand page of a 2-page item, so that the first stave of the
> 2nd page is roughly lined up with the top stave on the left-hand
> page.
> 
> I can't add a markup in the middle of a score unless it is somehow
> attached to a stave.  I could perhaps do something like create an
> invisible staccato dot on a note in the top stave of the page, and
> give it an extreme Y-offset.
> 
> But I can't help feeling there must be a more elegant and orthodox
> way of doing what I want.  Suggestions, please?
> 
> David



Creating space at the top of a page

2024-10-16 Thread David Sumbler
I am setting a series of items for a single melody instrument (i.e.
using one stave).  These items are generally quite short and will fit
on one page.  Sometimes I can even get 2 on a page.

But a few of them require 2 pages, and naturally I try to arrange
things so that they cover a left-hand page and a right-hand page in
that order.

At the head of each item I have a markup which takes up something like
2 cm. of space.  I would like to create a similar empty space on the
right-hand page of a 2-page item, so that the first stave of the 2nd
page is roughly lined up with the top stave on the left-hand page.

I can't add a markup in the middle of a score unless it is somehow
attached to a stave.  I could perhaps do something like create an
invisible staccato dot on a note in the top stave of the page, and give
it an extreme Y-offset.

But I can't help feeling there must be a more elegant and orthodox way
of doing what I want.  Suggestions, please?

David


Re: Vertical positions of slurs and accents

2024-09-27 Thread David Sumbler


On Fri, 2024-09-27 at 07:54 -0700, Knute Snortum wrote:
> 
> On Fri, Sep 27, 2024 at 7:42 AM David Sumbler 
> wrote:
> > How do I persuade Lilypond to position all accent marks inside
> > slurs?  At the moment, in a passage containing numerous accents and
> > slurs, I am finding that some accents are outside the slur and some
> > inside, which looks a mess!
> > 
> 
> 
> It's hard to help you with a Minimum WorkingExample (MWE,
> see https://lilypond.org/tiny-examples.html) but a sledgehammer
> approach would be to use...
> 
> \override Script.avoid-slur = #'inside
> 
> This will force ALL Scripts inside of the slurs, but that means other
> things like pralls and turns too.  You could do them one by one with:
> 
> \tweak avoid-slur = #'inside
> 
> Post a MWE for us to work with and we'll give you a better answer.

Thanks - that's perfect.  The difficulty I had was that I couldn't
figure out what class of object an accent is.  I had already tried

 \override TextScript.avoid-slur = #'inside

but this of course doesn't work.  I couldn't find out from the
documentation how accents etc. are classified, although I expect it is
there somewhere.

David


Vertical positions of slurs and accents

2024-09-27 Thread David Sumbler
How do I persuade Lilypond to position all accent marks inside slurs?
 At the moment, in a passage containing numerous accents and slurs, I
am finding that some accents are outside the slur and some inside,
which looks a mess!

David



Re: Manual page-breaking

2024-09-24 Thread David Sumbler


On Tue, 2024-09-24 at 22:07 +0200, Xavier Scheuer wrote:
> On Tue, 24 Sept 2024 at 16:41, David Sumbler 
> wrote:
> >
> > The best solution I have come up with is adding \autoPageBreaksOff
> at the start of each Score block, and adding \noPageBreak between
> markup items etc. which come outside of the Score block.  So far,
> this seems to be working.
> 
> Hello,
> 
> You could replace all your \autoPageBreaksOff by a single top-level
> \layout {
>   \context {
>     \Score
>     \override NonMusicalPaperColumn.page-break-permission = ##f
>   }
> }
> 
> Kind regards,
> Xavier

Thanks - that works nicely!

David




Re: Omitting an accidental

2024-09-24 Thread David Sumbler
On Tue, 2024-09-24 at 22:03 +0200, Xavier Scheuer wrote:
> On Tue, 24 Sept 2024 at 21:53, David Sumbler 
> wrote:
> >
> > I am having difficulty with the new repeat structure.  The code
> below
> > produces the result I want except that the repeat should only be 2
> bars
> > long.  In other words, the ":|." bar line at the end of the inner
> > repeat should come at the end of the 1st time bar (after the note
> F)
> > not 2 bars later after the A.
> 
> Hello,
> 
> If I understood correctly what you want, you have to put the a'1
> outside of the \repeat volta 2 block (but inside the volta 1 of your
> repeat segno block).
> 
> \version "2.24.3"
> \language "english"
> 
> \score {
>   \repeat segno 2 {
>     c'1 d'
>     \volta 2 \fine
>     \volta 1 {
>       \repeat volta 2 {
>         e'1
>         \alternative {
>           \volta 1 { f'1 }
>           \volta 2 { g'1 }
>         }
>       }
>       a'1
>     }
>   }
> }
> 
> Kind regards,
> Xavier

Doh!  Stupid of me, I suppose, but all these nested curly brackets do
my head in a bit.  Anyway, thank you very much for solving it for me.

David



Omitting an accidental

2024-09-24 Thread David Sumbler
I am having difficulty with the new repeat structure.  The code below
produces the result I want except that the repeat should only be 2 bars
long.  In other words, the ":|." bar line at the end of the inner
repeat should come at the end of the 1st time bar (after the note F)
not 2 bars later after the A.

\version "2.24.3"
\language "english"

\score {
  \repeat segno 2 {
c'1 d'
\fine
\volta 2

\volta 1 {
  \repeat volta 2 {
e'1
\alternative {
  \volta 1 { f'1 }
  \volta 2 { g'1 }
}
a'1
  }
}
  }
}

I have tried omitting  the inner "\volta 1" and "\volta 2",
corresponding to another example in Notation Ref. 1.4.1, but I get
exactly the same result.

Can somebody explain what I am doing wrong?

David



Re: Manual page-breaking

2024-09-24 Thread David Sumbler
On Mon, 2024-09-23 at 10:05 +0100, David Sumbler wrote:
> Is there a way that I can take *total* control of page breaking?

Thanks to those who responded to my question.  Judging from these
responses, the answer to my question is "No" -- at least they don't
seem to be readily applicable to the case I was describing.  There
doesn't seem to be a way to tell Lilypond "don't worry about finding
places for page breaks -- just put them where I tell you", which is
what I was hoping for.

The best solution I have come up with is adding \autoPageBreaksOff at
the start of each Score block, and adding \noPageBreak between markup
items etc. which come outside of the Score block.  So far, this seems
to be working.

David



Manual page-breaking

2024-09-23 Thread David Sumbler
Is there a way that I can take *total* control of page breaking?

I have a file in the form:

\version "2.24.3"
\include "file1" \noPageBreak
\include "file2" \pageBreak
% lots more lines like the above
\include "fileN"

and individual files such as:

% file1
\score {
  \autoPageBreaksOff
  %music
}

Despite my autoPageBreaksOff instruction, I find that Lilypond still
sometimes puts page breaks in where I don't want them.

What I want Lilypond to do is to put everything on to one page (of
course with suitable warnings about compressing over-sized pages, where
appropriate), and only make a page break if and where I specifically
add \pageBreak, either between individual files (as shown in my
example), or within the individual files.

In other words, if I have 50 individual files each with 1,000 bars, I
want them all to appear on one page unless I have specified \pageBreak
from place to place.  Obviously this would produce a ridiculous output,
but I want to be able to have complete control over the location of
page breaks.

Is there a way of disabling automatic page-breaking completely?

David


Re: Simple ternary da capo structure

2024-09-18 Thread David Sumbler
On Wed, 2024-09-18 at 13:25 +0100, Timothy Lanfear wrote:

>  
>  
> On 18/09/2024 11:57, David Sumbler wrote:
>  
> > 
> > Thank you both for your help.  I'm still struggling with one thing,
> > though.  I want "D.C." at the end of the 'B' section, rather than
> > "D.C. al Fine".  The best thing I have managed so far was to put
> > \jump "D.C." at the end, but of course that doesn't remove the
> > other marking.  I have tried "\set Score.dalSegnoTextFormatter =
> > #format-dal-segno-text-brief" but that doesn't seem to make any
> > difference.  Any suggestions?
> >  
> >  
>  
> I'm not completely clear about what you are looking for, but maybe
> this will give you some ideas on how to proceed.
>  
> \version "2.24.0"
> 
> \layout {
>   \context {
>     \Score
>     \override SectionLabel.direction = #DOWN
>     \override SectionLabel.self-alignment-X = #RIGHT
>   }
>   \set Score.finalFineTextVisibility = ##t
>   \set Score.fineText = \markup \larger "D. C. al fine"
> }
> 
> {
>   R1*4
>   \sectionLabel \markup \italic "Fine"
>   \section
>   R1*4
>   \fine
> }
>  
This certainly produces the result I wanted.  Here we appear to be
using "section" syntax as distinct from the "repeat" syntax used in
earlier suggestions.  However it seems to me that somehow we are
abusing the system by using fineText to define not the "Fine" marking
itself, but actually the "D.C." marking.  This surely can't be what one
is intended to do.

In my experience the form [music--Fine--music--D.C.] is about the most
common structure there is in written music, other than simple repeats.
 And yet there doesn't seem to be an obvious or straightforward way of
producing this in the new syntax.

In the past, of course, I have added Fine and D.C. markings simply as
printed marks which Lilypond isn't expected to understand.  Perhaps I
should simply go back to doing that, although of course it doesn't work
for midi output.  Still, that doesn't really matter, since I only use
midi for checking the accuracy of my input. 

-- 
David Sumbler 




Re: Simple ternary da capo structure

2024-09-18 Thread David Sumbler
On Tue, 2024-09-17 at 16:06 -0700, Knute Snortum wrote:
> 
> On Tue, Sep 17, 2024 at 12:11 PM Xavier Scheuer 
> wrote:
> > On Tue, 17 Sept 2024 at 17:03, Knute Snortum 
> > wrote:
> > >
> > > Here's what I came up with:
> > 
> > Hello,
> > 
> > Actually there is a property for the fine bar type.
> > \set Score.fineBarType = "||"
> > and you don't need to put explicitly the \bar "||" at Fine.
> > 
> 
> 
> Nice!
> 
> Interestingly, the thin double bar line doesn't show up in the
> unfoldRepeats part of the snippet when you use the property.
> 
> 
> --
> Knute Snortum

Thank you both for your help.  I'm still struggling with one thing,
though.  I want "D.C." at the end of the 'B' section, rather than "D.C.
al Fine".  The best thing I have managed so far was to put \jump "D.C."
at the end, but of course that doesn't remove the other marking.  I
have tried "\set Score.dalSegnoTextFormatter = #format-dal-segno-text-
brief" but that doesn't seem to make any difference.  Any suggestions?


-- 
David Sumbler 




Simple ternary da capo structure

2024-09-17 Thread David Sumbler
It's a while since I did much on Lilypond, but I have now started a new
small project.  I am running xubuntu 24.04, and to keep things simple I
have installed Lilypond from the distro's repository - version 24.3,
which is pretty up to date.  There seem to be quite a lot of new
features in Lilypond since I last delved into it, including \section
and \fine.

I am trying to set a simple piece in ternary form.  I want a light
double bar (thin-thin) at the end of the 'A' section with a "Fine"
marking, and at the end of the 'B' section I want a full (thin-thick)
double bar with "D.C." marked (or perhaps "D.C. al Fine", which is what
the original has).

Section 1.4.1 of the Notation Reference has numerous complex varieties
of repeats and dal segnos, but I haven't yet managed to get the result
I want.  I'm sure it must be quite simple, but could someone show me
how it is done, please?

David



Re: Can't compile Lilypond files

2024-03-24 Thread David Sumbler
On Sun, 2024-03-24 at 21:55 +0100, Lukas-Fabian Moser wrote:
> Hi David,
> 
> David Sumbler  schrieb am So., 24. März 2024,
> 21:29:
> > I am running xubuntu  22.04.  When I last used Lilypond (November
> > 2023) I was probably running a recent version of Ubuntu Unity.  But
> > my /home folder has not changed significantly, and Lilypond 2.24.1,
> > downloaded from lilypond.org, is installed there.
> > 
> > I don't quite understand the question about PATH.  The command
> > lilypond is set up to invoke bin/lilypond in my home folder; this
> > is a short script to call my latest version of lilypond in its
> > folder which is a subfolder of my home folder.  And clearly it is
> > doing this.
> > 
> > What do I get as an error message?  I as sorry if I was not clear,
> > but I do not get any error message at all.  No error reported, no
> > warnings, no compilation; merely the same output I would get if I
> > simply typed the command 'lilypond'.
> 
> But this sounds as if your script in bin does not pass command line
> arguments to lilypond, doesn't it?
> 
> So, is this script self-written? And what does its source code look
> like?
> 
> Lukas

You've found the answer!  No, my script wasn't passing command line
arguments, and Ctrl-C Ctrl_L in Emacs lilypond-mode was naturally also
using my one-line script.  Having corrected the script, it now works as
expected.

What I don't understand is why or how it always used to work, but I
suppose there's no point in worrying about that.

Anyway, thanks for finding the solution!

David


Re: Can't compile Lilypond files

2024-03-24 Thread David Sumbler
I am running xubuntu  22.04.  When I last used Lilypond (November 2023)
I was probably running a recent version of Ubuntu Unity.  But my /home
folder has not changed significantly, and Lilypond 2.24.1, downloaded
from lilypond.org, is installed there.

I don't quite understand the question about PATH.  The command lilypond
is set up to invoke bin/lilypond in my home folder; this is a short
script to call my latest version of lilypond in its folder which is a
subfolder of my home folder.  And clearly it is doing this.

What do I get as an error message?  I as sorry if I was not clear, but
I do not get any error message at all.  No error reported, no warnings,
no compilation; merely the same output I would get if I simply typed
the command 'lilypond'.

David

On Sun, 2024-03-24 at 20:39 +0100, Valentin Petzel wrote:
> Hello David,
> 
> it apears your Lilypond installation has some issue. What OS are you
> currently 
> on? How did you install Lilypond? If you are using some Linux
> distribution 
> there might be a version mismatch between the libraries the binaries
> have been 
> compiled against and the ones installed on your system. If so this
> should be a 
> dependency / packaging issue of your distribution. Have you tried
> using the 
> statically linked binaries from lilypond.org?
> 
> Cheers,
> Valentin

On Sun, 2024-03-24 at 20:42 +0100, Xavier Scheuer wrote:
> Hello,
> 
> How have you installed LilyPond? From the official binaries or from a
> package from your Linux distribution (I guess, since you mention
> Emacs, that you are under Linux)?
> Do you know that the last versions of LilyPond do not update your
> PATH? So are you invoking lilypond with the path where you extracted
> the binaries?
> And when you say you can't compile, what do you get as error message?
> It is not clear at all.
> 
> Kind regards,
> Xavier

> Am Sonntag, 24. März 2024, 17:13:03 CET schrieb David Sumbler:
> > I haven't used Lilypond for a while, but I have currently got
> > v.2.24.1
> > 
> > I started a new, very small, project today, but I can't compile
> > anything.  Thinking I must have forgotten even the basics of
> > writing
> > Lilypond files, I tried a few of my previous project files which I
> > have
> > successfully compiled in the past.  But nothing will compile.
> > 
> > If I use the bash command line, with, for example,  'lilypond -V
> > file.ly' I get no compilation, and the output is identical to what
> > I
> > get if I just enter 'lilypond' with no option and no file.
> > 
> > If I try to compile from Emacs, using Ctrl-C Ctrl-L, I get exactly
> > the
> > same output as above, with "Compilation exited abnormally with code
> > 2
> > at Sun Mar 24 15:54:38" or similar suffixed.
> > 
> > What can possibly be wrong?  Lilypond isn't giving me any clues.
> > 
> > David
> 



Re: Can't compile Lilypond files

2024-03-24 Thread David Sumbler
I include my code below - this is as far as I got before discovering
the problem.  Jakob, I don't seeing the code will help: if there were a
significant problem with it, then normally Lilypond would report
warnings and errors upon compilation.  But as I said, it reports
nothing!

And yes, Hans, I was definitely using a capital 'V', and I also tried
other versions such as 'lilypond -l DEBUG Cloud/LilyPond/file.ly', with
the same result every time: nothing gets compiled, and no anomalies are
reported.

Here is the file so far:

\version "2.24.1"
\language "english"

\score {
 \relative {
 \time 4/4
 \key d \major
 \partial 8
 d'''8 |
 cs d cs d c d c d |
 b d b d bf d bf d |
 a d a d as d b d |
 c d cs a d2 "|."
 }
}

On Sun, 2024-03-24 at 17:54 +0100, Jakob Pedersen wrote:
> Hi David,
> 
> It might be beneficial if you would share your lilypond file, or
> shortened version of it, so that the smart folks here can look at it
> and point you in the right direction.
> 
> Best wishes,
> Jakob

On Sun, 2024-03-24 at 19:21 +0100, Hans Aikema wrote:
> 
> David, are you sure you’re using a capital V? Because if you use a
> lower-case V you end up in the —version mode of Lilypond, which will
> indeed output similar output as the usage info printed when you
> invoke lilypond without any argument (though the latter will include
> usage instructions, where lilypond -v will only print the version
> header)
> 
> Extract from lilypond —help:
> 
> -v, --version                    show version number and exit
> -V, --verbose                    be verbose (equivalent to --
> loglevel=DEBUG)



Can't compile Lilypond files

2024-03-24 Thread David Sumbler
I haven't used Lilypond for a while, but I have currently got v.2.24.1

I started a new, very small, project today, but I can't compile
anything.  Thinking I must have forgotten even the basics of writing
Lilypond files, I tried a few of my previous project files which I have
successfully compiled in the past.  But nothing will compile.

If I use the bash command line, with, for example,  'lilypond -V
file.ly' I get no compilation, and the output is identical to what I
get if I just enter 'lilypond' with no option and no file.

If I try to compile from Emacs, using Ctrl-C Ctrl-L, I get exactly the
same output as above, with "Compilation exited abnormally with code 2
at Sun Mar 24 15:54:38" or similar suffixed.

What can possibly be wrong?  Lilypond isn't giving me any clues.

David




Re: French Horn - transposing

2024-03-10 Thread David Sumbler
> Thank you all for your suggestions and time. I ended up using
> \transpose which was the easiest for me to understand, and worked
> great it seems.
> 
> Cheers!
> tjk :)

It's worth noting that, at least in an orchestral context, horns are
conventionally written without a key signature.  In other words, every
non-natural note needs an accidental (unless it already occurred in the
same bar).

David


Re: Simple instructions for installing Lilypond

2023-05-14 Thread David Sumbler
On Sun, 2023-05-14 at 13:31 +0200, Jean Abou Samra wrote:
> Le dimanche 14 mai 2023 à 12:15 +0100, David Sumbler a écrit :
> > It's a while since I used Lilypond.  I have a bit of tweaking I
> > want to do to some scores, so thought I should download the latest
> > version.  In the end, I decided to use v2.24.1, rather than 2.25.4,
> > although I have mostly used the "unstable" versions in the past.
> > 
> > Lilypond used to use a global install, and it was the work of a few
> > minutes to download and install this on my Linux machines,
> > including all the documentation too if one added the -d flag.
> > 
> > I have managed to install Lilypond, and even the docs, a couple of
> > times since it changed to a sort of flatpack design.  Each time it
> > has taken me a long time to get it all working.  Today I have spent
> > well over an hour messing about, and I have now managed to get
> > lilypond installed and also the documentation.
> > 
> > But convert-ly doesn't work: I get a
> > "/home/david/lilypond/usr/bin/python3: not found" error.  This is
> > probably because the convert-ly script I have in my ~/bin/  folder
> >  needs amending, but I can see myself having to spend another hour
> > or two trying to sort out what is going wrong and how to change it.
> > 
> > What seems to be missing is a simple to find and to follow set of
> > instructions on how to install Lilypond.  I was surprised to see
> > that the Learning Manual now encourages users to use a package from
> > their distro.  This seems to be a change of policy: previously, the
> > website discouraged users from doing this, because the repositories
> > usually have out of date versions.  But perhaps this is the path I
> > should go down, simply to save time.
> > 
> > Sorry, this is just a grumble about having to mess about so much to
> > get Lilypond functioning.  But surely there ought to be some sort
> > of instructions on the download site about how to get everything
> > installed and working.
> 
> 
> What does “install” mean to you?
> 
> This is a serious question, not hair splitting. Depending on what you
> actually want to do with LilyPond, the way to “install” it can be
> vastly different.
> 
> If you just want to run it from the command line, then you don't need
> to install it in any way, you can just run
> "~/where/you/unpacked/the/archive/bin/lilypond".
> 
> If you want to use it *regularly* from the terminal, or if you want
> some tool (e.g., Emacs) to find it as just "lilypond", you can just
> prepend the right directory to your PATH by adding this to your shell
> startup file (e.g., ~/.bashrc):
> 
> export PATH=/where/you/unpacked/the/archive/bin:$PATH
> 
> and this will make it callable as "lilypond".
> 
> If you want to use it with Frescobaldi, that's in the learning
> manual, but I suppose you saw that.
> 
> For the documentation there is no real "installation" process in any
> case (OK, except maybe if you want the Info documentation).
> 
> To me, the problem with “there should be a simple way to install
> LilyPond” is that “install LilyPond” is not something well-defined at
> all. There is also a purely psychological issue that some people
> think it's a must to “install” something in some way before being
> able to use it.
> 
> There are good reasons why the script that used to be shipped isn't
> shipped anymore (for example: it would not work well with having
> several versions in parallel).

OK - point taken!

After writing my previous moaning message, I decided to see what
version of Lilypond I would get if I installed my Linux distro's
version (I'm using Ubuntu-Unity 23.04).  Rather to my surprise I found
that it is v.2.24.1, the latest "stable" version, and the same as I
downloaded earlier from the Lilypond download site.  I also downloaded
the docs.

And magically it all seems to work.  convert-ly worked straight away,
and all is well.  No doubt this is why new users are now encouraged to
use their distro's version, the opposite advice to what used to be
given.  So in future I'll probably stick with this policy.  Since I
tend to install new versions of Ubuntu fairly frequently, my Lilypond
versions shouldn't be too out of date.

David



Simple instructions for installing Lilypond

2023-05-14 Thread David Sumbler
It's a while since I used Lilypond.  I have a bit of tweaking I want to
do to some scores, so thought I should download the latest version.  In
the end, I decided to use v2.24.1, rather than 2.25.4, although I have
mostly used the "unstable" versions in the past.

Lilypond used to use a global install, and it was the work of a few
minutes to download and install this on my Linux machines, including
all the documentation too if one added the -d flag.

I have managed to install Lilypond, and even the docs, a couple of
times since it changed to a sort of flatpack design.  Each time it has
taken me a long time to get it all working.  Today I have spent well
over an hour messing about, and I have now managed to get lilypond
installed and also the documentation.

But convert-ly doesn't work: I get a
"/home/david/lilypond/usr/bin/python3: not found" error.  This is
probably because the convert-ly script I have in my ~/bin/  folder
 needs amending, but I can see myself having to spend another hour or
two trying to sort out what is going wrong and how to change it.

What seems to be missing is a simple to find and to follow set of
instructions on how to install Lilypond.  I was surprised to see that
the Learning Manual now encourages users to use a package from their
distro.  This seems to be a change of policy: previously, the website
discouraged users from doing this, because the repositories usually
have out of date versions.  But perhaps this is the path I should go
down, simply to save time.

Sorry, this is just a grumble about having to mess about so much to get
Lilypond functioning.  But surely there ought to be some sort of
instructions on the download site about how to get everything installed
and working.

David



Re: Installing Lilypond 2.23.10

2022-07-21 Thread David Sumbler


On Wed, 2022-07-20 at 16:52 +0100, David Sumbler wrote:
> On Tue, 2022-07-19 at 23:56 +0200, Jean Abou Samra wrote:
> > Le 19/07/2022 à 18:26, David Sumbler a écrit :
> > > My usual work pattern is to edit .ly files etc. in emacs, and
> > > then to 
> > > use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF
> > > or 
> > > Postscript file.  Unfortunately I found that this now just
> > > produces an 
> > > error message, such as:
> > > 
> > > lilypond /home/david/Cloud/LilyPond/test.ly
> > > /bin/bash: line 1: lilypond: command not found
> > > 
> > > Compilation exited abnormally with code 127 at Tue Jul 19
> > > 16:07:42
> > > 
> > > I eventually realized that having the alias included in .bashrc
> > > was 
> > > not working because this is only for interactive shells.  But I
> > > have 
> > > tried putting it in .bash_profile, logging out and then logging
> > > in 
> > > again, and this doesn't work either.
> > 
> > 
> > An alias only has effect in the shell, not on the system
> > in general. You'd need to set up actual scripts in a place
> > where they will be found. One way to do so is to add
> > symlinks in a directory that is on your PATH, like ~/bin.
> > 
> > ln -s /path/to/lilypond-2.23.10/bin/* ~/bin
> > 
> > Though, in my opinion, the best way is to actually point
> > your editor to the executable, see below.
> > 
> > 
> > 
> > > If somebody can suggest how I get emacs-mode Lilypond-command-
> > > lilypond 
> > > and Lilypond-command-formatps to work, it will be very much 
> > > appreciated, as always.
> > 
> > 
> > Try this:
> > 
> > Edit any .ly file in Emacs
> > 
> > M-x customize-variable
> > 
> > In minibuffer, enter 'LilyPond-lilypond-command'
> > 
> > A customization screen appears, click on the arrow on the
> > left to expand the variable. On the right, write the full
> > path to LilyPond:
> > 
> > /.../lilypond-2.23.10/bin/lilypond
> > 
> > Now C-x C-s to save, and q to quit Custom.
> > 
> > After that, try C-c C-l on the .ly file. It should
> > be compiled with the lilypond executable you specified.
> 
> This worked perfectly, although I don't fully understand it.  At
> first I assumed that your 'LilyPond-lilypond-command' was a typo for
> 'LilyPond-command-lilypond', but that wasn't recognized as a command
> whereas your version was.  I now see that your version is a Lilypond-
> mode command, and my version is a Lilypond-mode Lisp function.  No
> wonder I couldn't figure it out for myself.
> 
> Anyway, thanks for all your help.  It looks as if I now have Lilypond
> up and running again.
> 
> David
> 
> 
> 



Re: Installing Lilypond 2.23.10

2022-07-19 Thread David Sumbler
On Mon, 2022-07-18 at 11:15 +0200, Jean Abou Samra wrote:
> Le 17/07/2022 à 17:03, David Sumbler a écrit :
> > 
> > Is it the intention that the next "stable" version of Lilypond will
> > be 
> > packaged in this new way?  Will the shell script be done away with 
> > there too?
> > 
> > Even if not, what are the perceived advantages of this change for
> > the 
> > development versions, at least?
> 
> Yes, all new versions of LilyPond will use this packaging. Getting
> rid of the .sh script was not the only change; it was actually a
> wholesale switch to a new compilation system, which is now 100×
> simpler and more reliable, and now creates static binaries. Before,
> a .sh installer was required, because once installed the binaries
> couldn't be moved around. Now that they can, it is just unnecessary.
> 
> Not having a .sh installer has other advantages, too. It avoids
> conflicts with distro packages. It makes the installation process
> exactly the same across all OSes. It prevents people from shooting
> themselves in the foot by not realizing that several versions of
> LilyPond can be installed in parallel.

I should think that most users only use one version at a time, unless
they have the understanding to help in testing development versions, in
which case they would probably know that they can have several
versions.

> I think you are overcomplicating things by trying to mimic
> the previous installation process with the new binaries.
> Changing /usr/local/ is normally done by package managers
> and dedicated tools, not by hand. If you don't know what
> you're doing there, don't touch it. (This kind of advice applies
> to any command using sudo, actually.)

I merely moved the new installation to the place where it would have
been put by the script, had there been one.  I have successfully
administered my own Linux boxes for the last 20 years or so without any
major mishaps...

> Instead, follow these simple steps. (I agree that _finding_ them
> is not simple, but again it will eventually be in the learning
> manual, with screenshots. That change has landed and will appear
> in the next release.)
> 
> 1. Download the archive.
> 2. Unpack it.
> 3. Move the lilypond-2.23.10 directory inside it in your
>     home folder.
> 4. In your .emacs, change the path in (expand-file-name ...)
>     to "~/lilypond-2.23.10/share/emacs/site-lisp".
> 
> And that's all.

Thanks for those clear instructions.  And having set up an alias, as
suggested by David W., I found that typing 'lilypond' in a bash
terminal produces the expected result.  However, this is not something
I often do.

My usual work pattern is to edit .ly files etc. in emacs, and then to
use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF or
Postscript file.  Unfortunately I found that this now just produces an
error message, such as:

   lilypond /home/david/Cloud/LilyPond/test.ly
   /bin/bash: line 1: lilypond: command not found
   
   Compilation exited abnormally with code 127 at Tue Jul 19 16:07:42

I eventually realized that having the alias included in .bashrc was not
working because this is only for interactive shells.  But I have tried
putting it in .bash_profile, logging out and then logging in again, and
this doesn't work either.

If somebody can suggest how I get emacs-mode Lilypond-command-lilypond
and Lilypond-command-formatps to work, it will be very much
appreciated, as always.

David





Re: Installing Lilypond 2.23.10

2022-07-17 Thread David Sumbler
On Fri, 2022-07-15 at 02:56 +0200, Jean Abou Samra wrote:
> 
> > A more serious problem (for me) is that Emacs could no longer find 
> > Lilypond mode.  So I moved the new Lilypond to 
> > /usr/local/lilypond/usr/.  Emacs can now uses Lilypond mode, but
> > can't 
> > compile a file - it produces reams of messages (after much
> > processing 
> > time), mostly of the
> > 
> > ;;; note: source file 
> > /usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display-
> > lily.scm
> > ;;; newer than compiled 
> > /usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display-
> > lily.go
> > 
> > kind, and then exits with
> > 
> > ERROR: In procedure apply-smob/1:
> > Wrong number of arguments to #
> > 
> > Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52
> > 
> > I have spent some hours experimenting, but so far I haven't managed
> > to 
> > get things working.

On Fri, 2022-07-15 at 02:57 +0200, Jean Abou Samra wrote:
> Le 15/07/2022 à 02:56, Jean Abou Samra a écrit :
> 
> > > Hm. Does this help?
> > > 
> > > sudo find /usr/local/lilypond/usr/lib/lilypond/2.23.10/ -name
> > > "*.go" 
> > > -exec touch {} \;
> > > 
> Wait, rather try
> 
> sudo find /usr/local/lilypond/ -name "*.go" -exec touch {} \;

Yes, this worked - thank you.

I am used to a new installation of Lilypond taking some considerable
time to compile the first time - presumably because it needs to do some
general compilation and housekeeping to get itself organized.
 Subsequently it then takes a relatively short time, depending on the
complexity of the Lilypond source it is compiling.

At the moment I am testing it on a short file - in fact, your "grow-in-
up-direction" example from the Extending Lilypond document.  Compiling
it is taking over 80 seconds each time; after the first time, I would
expect a file like this to take only 3 or 4 seconds.  This is very
unsatisfactory.

On Thu, 2022-07-14 at 23:13 -0500, David Wright wrote:
> 
> Those paths look odd. /usr/local should only contain the directories
> bin  etc  games  include  lib  man  sbin  share  src
> and /usr/local/bin/ is typically placed at the start of your $PATH
> for you by your distribution. I don't know where
> /usr/local/lilypond/usr/
> came from, but the rest of the path, share/lilypond/2.23.10/…, does
> look like something unpacked from the .tar.gz file.

> If your response is that it used to work, then I would wonder
> whether you used to have a distribution-supplied version of
> lilypond installed, and emacs was relying on that. In other
> words, it was relying on lilypond*.el files in locations like
> /etc/emacs/site-start.d/ and /usr/share/emacs/site-lisp/
> (or similar names), instead of those from any of the downloaded
> versions you've installed/unpacked in the past.

No, I have never used a distro version of Lilypond.  Until this time, I
have always used a script downloaded from the Lilypond website.  I
install Lilypond globally (although I am the only user of this
computer), and the script chooses to put things where they now are.  I
always thought /usr/local/lilypond/usr/share/lilypond/ was an odd place
to put it, but that wasn't my choice.

When I moved 2.23.10 from my home folder, I intentionally put it in the
same place as previous versions have been on my previous Ubuntu
installations, hoping this would increase the chances of it actually
working.  On this current OS version, I have not actually had any
previous versions of Lilypond, which is why I needed to install it
again now.

In my .emacs file I have:

;;for Lilypond mode
(setq load-path (append (list (expand-file-name
"/usr/local/lilypond/usr/share/emacs/site-lisp")) load-path))
(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))

So yes, clearly Lilypond mode is working now because I have installed
Lilypond where the .sh script would have put it.  I can also see that I
can easily work round this by editing my .emacs file, if I decide to
put Lilypond somewhere else (e.g. my home folder).

Is it the intention that the next "stable" version of Lilypond will be
packaged in this new way?  Will the shell script be done away with
there too?

Even if not, what are the perceived advantages of this change for the
development versions, at least?

David




Re: Installing Lilypond 2.23.10

2022-07-14 Thread David Sumbler
On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote:
> Le 13/07/2022 à 20:26, David Sumbler a écrit :
> > Thank you for that.  Yes, I should have noticed that the contents
> > of 
> > the tar file were not source code.  As it is, though, I'm not
> > entirely 
> > sure what to do with it - I guess that I put it all in a folder 
> > somewhere and then make a link to bin/lilypond.
> 
> 
> You just extract it somewhere and it becomes usable as
> 
> /.../lilypond-2.23.10/bin/lilypond file.ly
> 
> If you want to invoke it as "lilypond file.ly" without typing
> the full path, you have to add the /.../lilypond-2.23.10/bin
> directory to your PATH. One way to do so is to add this line
> to your shell startup file (probably ~/.bashrc):
> 
> export PATH=/.../lilypond-2.23.10/bin:$PATH
> 
> That said, if you're using Frescobaldi, this is not needed.
> Go to Edit > Preferences > LilyPond Preferences and add the
> new version, providing  /.../lilypond-2.23.10/bin/lilypond as
> the executable.

I don't use Frescobaldi; I normally edit Lilypond files in Emacs.

I moved the 2.23.10 folder to my home folder.  I tried making soft and
hard links in my $HOME/bin folder to
 $HOME/lilypond-2.23.10/bin/lilypond, but for some reason I couldn't
get it to run, even though $HOME/bin is the first item in my PATH.  I
haven't yet fathomed out why this was, but I worked around it by adding
a direct reference to the folder as you suggested.

A more serious problem (for me) is that Emacs could no longer find
Lilypond mode.  So I moved the new Lilypond to
/usr/local/lilypond/usr/.  Emacs can now uses Lilypond mode, but can't
compile a file - it produces reams of messages (after much processing
time), mostly of the

;;; note: source file
/usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display-
lily.scm
;;; newer than compiled
/usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display-
lily.go

kind, and then exits with

ERROR: In procedure apply-smob/1:
Wrong number of arguments to #

Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52

I have spent some hours experimenting, but so far I haven't managed to
get things working.

David



Re: Installing Lilypond 2.23.10

2022-07-13 Thread David Sumbler
On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote:
> Hello,
> 
> Please keep the list in CC so that everyone can chime
> in and benefit from the answers.

Sorry for my oversight.  I would normally have done a group reply, but
it's so long since I used a mailing list like this that I just forgot.
 It won't happen again (I hope)!

Thanks for all the other information you have now sent.  I'll perhaps
install 2.23.10 tomorrow.

David


Installing Lilypond 2.23.10

2022-07-13 Thread David Sumbler
The last version of Lilypond I installed was 2.23.5.  For that I have a
shell script entitled lilypond-2.23.5-1.linux-64.sh , and similar
scripts for previous development and stable versions.

Having updated my OS to Ubuntu 22.04 I want to install the latest
version.  But now when I click on the link I get the tar.bz2 file
direct, and not a shell script which would download and process it for
me.  I assume I have to use 'make' etc. to compile things, but I am not
very familiar with such matters.

I notice that the link for the stable version 2.22.2 still downloads a
shell script.

Is this a change of policy to discourage us less geeky users from using
the development version, or am I just missing something?  I admit I
haven't used Lilypond at all for some months.

David





Re: Change of RehearsalMark behaviour

2021-12-21 Thread David Sumbler
Hi Valentin

You're right.  Having read your latest a few times, I see that it is,
indeed, not very complicated.  Thanks for the clarification.

David


On Tue, 2021-12-21 at 00:26 +0100, Valentin Petzel wrote:
> Hello David,
> It’s not very complicated: The old behaviour uses one Mark_engraver
> to handle mark events and place marks. The new behaviour has the
> Mark_tracking_translator which handles the mark events and decides to
> whether to have the Mark_engraver create a mark.
> So when the Mark_engraver is at Staff level and the
> Mark_tracking_translator is at Staff level each mark event will be
> handles in the respective staff and sent to the corresponding
> Mark_engraver. But if the Mark_tracking_translator is on Score level
> it will handle all mark events that appear within the score and send
> them to all Mark_engravers within the score, which means that each
> Staff will get every Mark.
> Cheers,Valentin
> Am Dienstag, 21. Dezember 2021, 00:15:56 CET schrieb David Sumbler:
> > On Mon, 2021-12-20 at 18:20 +0100, Jean Abou Samra wrote:
> > > Le 20/12/2021 à 16:18, David Sumbler a écrit :
> > > > I set a piece a while ago using Lilypond 2.19.48.  It consists
> > > > of 2staves, and I used \mark for some annotations that I wanted
> > > > toappear above or on barlines - mostly the "crotchet -
> > > > dottedcrotchet" type of thing.  Sometimes these only applied to
> > > > one ofthe staves, so I would specify the mark in the music for
> > > > theappropriate staff.  I added:  \layout {\context
> > > > {\Score   \remove Mark_engraver }\context {
> > > > \Staff   \consistsMark_engraver }  }and it all worked just
> > > > as intended.I was recently asked to make a new version of the
> > > > piece.  The mainchange is from a male voice to a female one,
> > > > but this necessitateda few changes in the other (instrumental)
> > > > staff.  I ran convert-lyon copies of the original files as I
> > > > now had Lilypond 2.23.4installed.  I then edited these to
> > > > produce the new versionUnfortunately the behaviour of
> > > > RehearsalMark seems to have changed.
> > > >  Whereas previously a mark only appeared over the staff whose
> > > > music
> > > > it was specified in, I find that now all of the marks appear
> > > > inboth staves, regardless of which staff they are intended
> > > > for.Is this a bug or an intentional change?  And is there
> > > > another way Ican use marks to get the result I want and
> > > > previously had?
> > > 
> > > This change was intended, see the top entry at
> > > http://lilypond.org/doc/v2.23/Documentation/changes/index.html
> > > 
> > > To get the old behaviour, also move theMark_tracking_translator,
> > > likethis:
> > > \version "2.22.1"\layout {   \context { \Score \remove
> > > Mark_engraver\remove Mark_tracking_translator   }   \context
> > > { \Staff\consists Mark_engraver \consists
> > > Mark_tracking_translator   }}<<   \new Staff { \mark \default c'1
> > > }   \new Staff { c'1 \mark\default } >>
> > > Regards,Jean
> > 
> > Thank you for that.  A nice, simple fix to implement.  I must
> > say,though, that I'm having a bit of difficulty getting my head
> > around thenew behaviour!
> > David




Re: Change of RehearsalMark behaviour

2021-12-20 Thread David Sumbler

On Mon, 2021-12-20 at 18:20 +0100, Jean Abou Samra wrote:
> Le 20/12/2021 à 16:18, David Sumbler a écrit :
> > I set a piece a while ago using Lilypond 2.19.48.  It consists of 2
> > staves, and I used \mark for some annotations that I wanted to
> > appear above or on barlines - mostly the "crotchet - dotted
> > crotchet" type of thing.  Sometimes these only applied to one of
> > the staves, so I would specify the mark in the music for the
> > appropriate staff.  I added:  \layout {\context {
> > \Score   \remove Mark_engraver }\context { \Staff   \consists
> > Mark_engraver }  }and it all worked just as intended.
> > I was recently asked to make a new version of the piece.  The main
> > change is from a male voice to a female one, but this necessitated
> > a few changes in the other (instrumental) staff.  I ran convert-ly
> > on copies of the original files as I now had Lilypond 2.23.4
> > installed.  I then edited these to produce the new version
> > Unfortunately the behaviour of RehearsalMark seems to have changed.
> >  Whereas previously a mark only appeared over the staff whose music
> > it was specified in, I find that now all of the marks appear in
> > both staves, regardless of which staff they are intended for.
> > Is this a bug or an intentional change?  And is there another way I
> > can use marks to get the result I want and previously had?
> 
> This change was intended, see the top entry at
> http://lilypond.org/doc/v2.23/Documentation/changes/index.html
> 
> To get the old behaviour, also move theMark_tracking_translator, like
> this:
> 
> \version "2.22.1"
> \layout {   \context { \Score \remove Mark_engraver
> \remove Mark_tracking_translator   }   \context { \Staff
> \consists Mark_engraver \consists Mark_tracking_translator   }}
> <<   \new Staff { \mark \default c'1 }   \new Staff { c'1 \mark
> \default } >>
> 
> Regards,Jean

Thank you for that.  A nice, simple fix to implement.  I must say,
though, that I'm having a bit of difficulty getting my head around the
new behaviour!

David


Change of RehearsalMark behaviour

2021-12-20 Thread David Sumbler
I set a piece a while ago using Lilypond 2.19.48.  It consists of 2
staves, and I used \mark for some annotations that I wanted to appear
above or on barlines - mostly the "crotchet - dotted crotchet" type of
thing.  Sometimes these only applied to one of the staves, so I would
specify the mark in the music for the appropriate staff.  I added:
  \layout {
\context { \Score
   \remove Mark_engraver }
\context { \Staff
   \consists Mark_engraver }
  }
and it all worked just as intended.

I was recently asked to make a new version of the piece.  The main
change is from a male voice to a female one, but this necessitated a
few changes in the other (instrumental) staff.  I ran convert-ly on
copies of the original files as I now had Lilypond 2.23.4 installed.  I
then edited these to produce the new version

Unfortunately the behaviour of RehearsalMark seems to have changed.
 Whereas previously a mark only appeared over the staff whose music it
was specified in, I find that now all of the marks appear in both
staves, regardless of which staff they are intended for.

Is this a bug or an intentional change?  And is there another way I can
use marks to get the result I want and previously had?

David


Re: "Programming error" bug?

2021-11-14 Thread David Sumbler
Thank you for your help in this matter.

I added the line "\consists Staff_collecting_engraver" as suggested,
and read the somewhat cryptic paragraph under Mark_engraver in the IR,
as indicated in the link you provided.

Unfortunately I still got the same error messages as before.

However, re-reading the "cryptic paragraph", I decided that perhaps it
indicated that the Staff_collecting_engraver should be removed from
other contexts.  I therefore added the line

\remove Staff_collecting_engraver

to the \context { } section, and this indeed solved the problem.

Thanks again for pointing me in the right direction!

David


On Sun, 2021-11-14 at 16:13 +0100, Jean Abou Samra wrote:
> Le 13/11/2021 à 20:41, David Sumbler a écrit :
> > I have just started on a new Lilypond project, having had little
> > interaction with Lilypond for several months.  I installed
> > v.2.23.4.
> > Although I have so far only set 3 lines of music on 2 staves, the
> > message "programming error: cyclic dependency: calculation-in-
> > progress encountered for #'adjacent-pure-heights
> > (VerticalAxisGroup)" is issued 8 times when compiling.
> > From the very little I could find searching online, it seems as if
> > it might have something to do with my having moved Mark-engraver
> > etc. from their usual context.  It was also suggested that this is
> > a bug.
> > Is there some way of suppressing these messages?  I know how to
> > suppress warnings, but that won't work with these error messages.
> > The code I am using to set up the "staff" containing metronome
> > marks etc. is:
> > \layout {  \context {\name "MarkLine"\type
> > "Engraver_group"\consists Output_property_engraver\consists
> > Axis_group_engraver\consists Mark_engraver\consists
> > Metronome_mark_engraver\consists
> > Text_spanner_engraver\override RehearsalMark.extra-spacing-
> > width = #'(0 . 1)\override MetronomeMark.extra-spacing-width =
> > #'(0.5 . -inf.0)\override TextSpanner.Y-offset =
> > #3.5\override VerticalAxisGroup.minimum-Y-extent = #'(-2 .
> > 2)\override VerticalAxisGroup.staff-staff-spacing
> > =#'((basic-distance . 1)   (minimum-distance .
> > 1)   (padding . 1)   (stretchability . 3))  }  \context
> > {\Score\remove Mark_engraver\remove
> > Metronome_mark_engraver\accepts MarkLine  }}
> > I can't remember where I got this code from.  Is there something
> > that needs to be changed in it?
> 
> You also have to move the Staff_collecting engraver,as documented at
> https://lilypond.org/doc/v2.23/Documentation/internals/mark_005fengraver
> 
> Giving:
> \version "2.23.4"
> \layout {   \context { \name "MarkLine" \type
> "Engraver_group" \consists Output_property_engraver \consists
> Axis_group_engraver \consists Mark_engraver \consists
> Metronome_mark_engraver \consists Text_spanner_engraver
> \consists Staff_collecting_engraver \override
> RehearsalMark.extra-spacing-width = #'(0 . 1) \override
> MetronomeMark.extra-spacing-width = #'(0.5 . -inf.0) \override
> TextSpanner.Y-offset = #3.5 \override VerticalAxisGroup.minimum-
> Y-extent = #'(-2 . 2) \override VerticalAxisGroup.staff-staff-
> spacing = #'((basic-distance . 1)(minimum-distance . 1)
>(padding . 1)(stretchability . 3))   }   \context {
> \Score \remove Mark_engraver \remove
> Metronome_mark_engraver \accepts MarkLine   }}
> <<   \new MarkLine { \mark \default }   { a1 } >>
> 
> Note that the programming errors appeared becausean internal check
> was enabled. In other words, itis worth fixing your code even with
> older versionseven if there is no warning (observe how the
> verticalspacing gets different in the example above).
> Best,Jean




"Programming error" bug?

2021-11-13 Thread David Sumbler
I have just started on a new Lilypond project, having had little
interaction with Lilypond for several months.  I installed v.2.23.4.

Although I have so far only set 3 lines of music on 2 staves, the
message "programming error: cyclic dependency: calculation-in-progress
encountered for #'adjacent-pure-heights (VerticalAxisGroup)" is issued
8 times when compiling.

>From the very little I could find searching online, it seems as if it
might have something to do with my having moved Mark-engraver etc. from
their usual context.  It was also suggested that this is a bug.

Is there some way of suppressing these messages?  I know how to
suppress warnings, but that won't work with these error messages.

The code I am using to set up the "staff" containing metronome marks
etc. is:

\layout {
  \context {
\name "MarkLine"
\type "Engraver_group"
\consists Output_property_engraver
\consists Axis_group_engraver
\consists Mark_engraver
\consists Metronome_mark_engraver
\consists Text_spanner_engraver
\override RehearsalMark.extra-spacing-width = #'(0 . 1)
\override MetronomeMark.extra-spacing-width = #'(0.5 . -inf.0)
\override TextSpanner.Y-offset = #3.5
\override VerticalAxisGroup.minimum-Y-extent = #'(-2 . 2)
\override VerticalAxisGroup.staff-staff-spacing =
#'((basic-distance . 1)
   (minimum-distance . 1)
   (padding . 1)
   (stretchability . 3))
  }
  \context {
\Score
\remove Mark_engraver
\remove Metronome_mark_engraver
\accepts MarkLine
  }
}

I can't remember where I got this code from.  Is there something that
needs to be changed in it?

David


Re: Terminology question

2021-06-15 Thread David Sumbler
I think the real question is "what do you call a single figure or
column of figures under a bass note".  So far as I am aware, the term
"figured bass" means a bass line (not a single note) that has figuring
to indicate the harmonies.

If I want to talk about a number of such bass lines - e.g. the bass
lines of several pieces so notated - then I would call them "figured
basses".

I'm not sure that I have ever heard of a term to describe one single
harmony so notated.

Not a very helpful answer to your query, perhaps, but that's the usage
I am familiar with.

David


On Tue, 2021-06-15 at 16:20 +0200, Jacques Menu wrote:
> Hello folks,
> What would be the plural of ‘figured bass’, if that applies, to
> denote several occurrences of the figures in a score, the same way
> has there can be several harmonies? Maybe ‘figured bass figures’?
> 
> In the example below, there 5 such occurrences:
> 
> 
> Thanks for. your help!
> 
> JM
> 
> 



Displaying internal variables

2021-05-05 Thread David Sumbler
I am sure this must have been answered many times, yet after an hour's
searching I can't find a solution.

How can one display the current values of internal variables?  E.g., if
I want to know the current value of Staff.keepAliveInterfaces, how can
I get this to be displayed during compilation of a score?

David


Re: Pitch value of previous note

2021-04-30 Thread David Sumbler

On Fri, 2021-04-30 at 16:41 +0200, David Kastrup wrote:
> David Sumbler  writes:
> > On Fri, 2021-04-30 at 04:17 -0700, Aaron Hill wrote:
> > > A duration without pitch is encoded as a NoteEvent with the
> > > pitchproperty.  expand-repeat-notes! is the internal procedure
> > > thatcarries over the most recent pitch.  So long as you insert
> > > theseevents early enough, LilyPond should do the heavy lifting
> > > for you.
> > 
> > You are correct: I invented a problem where none exists.
> > I confess that I had not realized that a duration without a
> > precedingpitch or rest takes the pitch of the preceding note.  I
> > actuallythought that, following a rest, it would produce further
> > rests.
> 
> We've had a fairly recent discussion about this design choice
> sometimein the last three months or so.  My rationale was that it
> could be usedfor writing rhythmic parts using only a single pitch or
> drum type in amanner where you only had to write that pitch or drum
> type once and thenkeep referencing it.  That rationale also explains
> a difference inbehavior with chord repeats (q) with respect to
> retainedarticulations/fingerings.
> > I must have seen this in action many times, otherwise I would
> > havelots of pitches in my music where there should be rests.  But
> > somehowit doesn't seem to have lodged itself in my brain.
> > Perhaps I'm getting too old for this!
> 
> Still waiting for an actual _example_ of what you want to be able
> towrite.

As I indicated, I imagined a non-existent problem.  With no problem to
be solved, an example serves no purpose.

David


Re: Pitch value of previous note

2021-04-30 Thread David Sumbler

On Fri, 2021-04-30 at 04:17 -0700, Aaron Hill wrote:
> On 2021-04-30 3:39 am, David Sumbler wrote:
> > I want to be able to insert a note of the same pitch as the preceding
> > one.  I don't mind what form the pitch information is in, so long as I
> > can use it to create a new note.  It could, for example, be in the form
> > "b,,", or something similar to "(-2, 6)" as used by ly:make-pitch.
> >  There may be other possibilities.
> 
> What about the existing pitch-repeating functionality in LilyPond?
> 
> 
> \version "2.22.0"
> 
> foo = { 4 4 }
> { b'2 \foo g' \foo }
> 
> 
> A duration without pitch is encoded as a NoteEvent with the pitch 
> property.  expand-repeat-notes! is the internal procedure that carries 
> over the most recent pitch.  So long as you insert these events early 
> enough, LilyPond should do the heavy lifting for you.

You are correct: I invented a problem where none exists.

I confess that I had not realized that a duration without a preceding
pitch or rest takes the pitch of the preceding note.  I 
actually thought that, following a rest, it would produce further
rests.

I must have seen this in action many times, otherwise I would have lots
of pitches in my music where there should be rests.  But somehow it
doesn't seem to have lodged itself in my brain.

Perhaps I'm getting too old for this!

David



Re: Pitch value of previous note

2021-04-30 Thread David Sumbler

On Fri, 2021-04-30 at 12:15 +0200, David Kastrup wrote:
> David Sumbler  writes:
> > In a \relative{ } passage, in order for Lilypond to work out
> > theabsolute pitch of a note, it must have a record of the absolute
> > pitchof the previous note, even if there have been some intervening
> > rests. It seems probable that it has this information in all cases,
> > whetherrelative pitch notation is being used or not.
> 
> No.  \relative is a purely transformative function that takes music
> asinput and produces music (with a wrapping container of
> typeRelativeOctaveMusic that prevents further applications of
> \relative fromhaving an effect).
> This happens immediately as a transform when \relative is
> beingexecuted.
> > How can I access the pitch value of this most recent note for use
> > in aScheme function after some rests?
> 
> Other value-propating mechanisms exist for default durations
> (attachedby the parser upon reading expressions), pitch-less
> durations (addedduring the scorifying stage when a music expression
> is accepted into a\score block), chord repeats (also at
> scorification).
> "For use in a Scheme function" is too hand-waving to have an idea
> whichphase of LilyPond's interpretation you would want to be
> interferingwith, so it would probably make more sense to present the
> problem youare trying to solve rather than guess about the tools you
> think LilyPondmust be using internally.

I want to be able to insert a note of the same pitch as the preceding
one.  I don't mind what form the pitch information is in, so long as I
can use it to create a new note.  It could, for example, be in the form
"b,,", or something similar to "(-2, 6)" as used by ly:make-pitch.
 There may be other possibilities.

David


Pitch value of previous note

2021-04-30 Thread David Sumbler
In a \relative{ } passage, in order for Lilypond to work out the
absolute pitch of a note, it must have a record of the absolute pitch
of the previous note, even if there have been some intervening rests.
 It seems probable that it has this information in all cases, whether
relative pitch notation is being used or not.

How can I access the pitch value of this most recent note for use in a
Scheme function after some rests?

David


Percent repeat counter starting at 1

2020-10-31 Thread David Sumbler
By default the percent repeat counter does not put a "1" over the bar
which is to be repeated; it starts with a "2" over the first actual
repetition.

This is what is normally required, but for clarity in one particular
instance I would like the repeat counter to put a "1" over the bar
which is going to be repeated.

Is there a simple way of telling the repeat counter to do this?  If
not, it is not too difficult to fake it, of course.  But if the
facility to change the counter's behaviour is already available in
Lilypond, then that will no doubt be the simplest solution for me to
use.

David




MetronomeMark.extra-spacing-width

2020-09-26 Thread David Sumbler
I have just spent several hours trying to find the reason that
metronome marks were affecting the spacing of notes in certain parts of
my score.  At last I have found the offending line.

I am using the "MarkLine" context from the LSR, because I want markings
to appear at the top of the score (even when the flute staves are not
shown) and above the violin I staff.  The MarkLine is where the problem
arose, it seems.

The following example shows the problem. 


\version "2.21.5"
\language "english"

\layout {
  \context {
\name "MarkLine"
\type "Engraver_group"
\consists Metronome_mark_engraver
\override MetronomeMark.extra-spacing-width = #'(0.5 . 0)
  }
  \context {
\Score
\remove Metronome_mark_engraver
\accepts MarkLine
  }
}

\score {
  <<
\new MarkLine {
  \time 3/4
  \tempo "This causes a large gap between notes"
  s2.
}
\new Staff { \relative {
  \key bf \major
  df''16f8 df16 ef f g a bf( a) f df |
} }
  >>
}


I have removed any irrelevant lines from the definition of MarkLine.

The line that causes the problem is the override of
MetronomeMark.extra-spacing-width.  If this is commented out, the score
formats as one would expect.  I haven't yet discovered whether there
are any disadvantages to removing this line.

The default values of MetronomeMark.extra-spacing-width are '(+inf.0 .
-inf.0)  Changing them to '(0.5 . 0) gives rise to the problem I am
getting, yet in the LSR example that problem doesn't seem to arise.

Clearly I'm failing to understand exactly what is happening here.  Why
does my example go wrong, yet the LSR one doesn't?

David










Re: Vertical position of rests in DrumVoice

2020-09-16 Thread David Sumbler


On Tue, 2020-09-15 at 11:57 +0100, David Sumbler wrote:
> I am having difficulty controlling the vertical postioning of rests
> in
> a DrumStaff which has several DrumVoices representing different
> instruments.
> 
> The easy method of using a note-name followed by '\rest' doesn't seem
> to work in a DrumStaff.  I have tried, for instance, 'sn8\rest', but
> this produces a syntax error.
> 
> The other method I tried is overriding Rest.voiced-position and
> MultiMeasureRest.voiced-position in the relevant Voice context, but
> this seems to work inconsistently - something else is overriding it. 
> And in the case of the MultiMeasureRest nothing I do will move a
> whole-
> bar rest below the bottom line of the staff, even though in the same
> voice minim rests are being placed one or two lines below the staff
> by
> Lilypond itself.
> 
> How do I take full control of the vertical positioning of these
> rests?

My apologies to all on the list for wasting bandwidth.  I eventually
stumbled on the answer to my question, which is to use
\override Rest.staff-position = 6
and
\override MultiMeasureRest.staff-position = 6
or similar.

The relevant variable is hidden away in the Internals Reference under
"staff-symbol-referencer-interface".  I confess that, although I had
looked at the lists of variables under the all the other interfaces
listed at the bottom of the IR pages for Rest etc., I hadn't looked at
this one because the name is so unpromising.

Yet I now find that the only variable listed there is the very one I
wanted!

David




Vertical position of rests in DrumVoice

2020-09-15 Thread David Sumbler
I am having difficulty controlling the vertical postioning of rests in
a DrumStaff which has several DrumVoices representing different
instruments.

The easy method of using a note-name followed by '\rest' doesn't seem
to work in a DrumStaff.  I have tried, for instance, 'sn8\rest', but
this produces a syntax error.

The other method I tried is overriding Rest.voiced-position and
MultiMeasureRest.voiced-position in the relevant Voice context, but
this seems to work inconsistently - something else is overriding it. 
And in the case of the MultiMeasureRest nothing I do will move a whole-
bar rest below the bottom line of the staff, even though in the same
voice minim rests are being placed one or two lines below the staff by
Lilypond itself.

How do I take full control of the vertical positioning of these rests?

David




Re: Conditional segmentation faults

2020-08-30 Thread David Sumbler
Thank you for these responses.  Before I received them, I had already
done a little more work on my score.  After all, I knew that I could
work around the seg. fault problem by issuing the lilypond command in a
terminal, rather than from within emacs.

So I reinstated the viola line, which was previously temporarily
excluded, and added a few more bars of music to it.  Almost inevitably
I forgot to use the terminal to compile, and did my usual Ctrl-C
Ctrl-L.

I immediately realized my mistake, but let the process continue.  The
file compiled without any problem!  So it now seems that this
intermittent fault can be cured by adding, as well as by removing
material in the code.  How crazy is that?

My next line of attack was in any case going to be installing Lilypond
21.2.5, and Paul's mention of the fact that he had had similar problems
to mine with 21.2.4 suggested that this might well be a solution. 
Today I changed to 21.2.5, and so far I haven't had any more seg.
faults.  Time will tell whether the problem has actually gone away
completely.

David

On Fri, 2020-08-28 at 14:56 -0700, Paul Scott wrote:
> I was also getting occasional seg. faults with 21.1.4.  I would add a
> little more to the code and they would go away.  Since I was able to
> finish that project I didn’t worry about it and it certainly worth
> the trouble to try too create a MWE.  I also use Emacs but I just
> alt-tab to another shell to compile.  (Also alt-tab to look at the
> results.)
> 
> Paul
> 
> 
> > On Aug 28, 2020, at 2:39 PM, Kevin Barry  wrote:
> > 
> > Hi David,
> > 
> > That certainly is strange behaviour. A segmentation fault occurs
> > when
> > a program tries to access a segment of memory that it isn't allowed
> > to. It's usually the result of memory bugs in the program. If it's
> > a
> > bug in emacs, which looks possible, then I am not sure what you
> > will
> > be able to do. Generally speaking, if a program segfaults then that
> > is
> > always a bug in that program, but it's often the result of invalid
> > input, so sometimes you can at least narrow down the behaviour that
> > is
> > triggering it. You could try starting emacs with the "-q" option so
> > that it doesn't load your init file. Then try running the shell
> > command from within emacs to see if it still segfaults (ctrl_C
> > ctrl_L
> > won't work with no init loaded). If it doesn't that might tell you
> > something. Also check if you have multiple versions of LilyPond
> > installed - maybe emacs is running a different one? I'm sorry I
> > can't
> > be of more help.
> > 
> > Kevin
> > 
> > On Fri, 28 Aug 2020 at 20:04, David Sumbler 
> > wrote:
> > > 
> > > I am running Ubuntu 18.04, Lilypond 2.21.4, emacs 25.2.2
> > > 
> > > Ever since I started my current Lilypond project, I have been
> > > getting occasional segmentation faults when compiling.  Until
> > > today I
> > > thought it was something to do with errors or inconsistencies in
> > > my
> > > Lilypond code, and I have been able to make changes which
> > > appeared to
> > > solve the problem.
> > > 
> > > However, today I discovered something very odd.
> > > 
> > > I edit my files in emacs, and I compile the main file by using
> > > Ctrl_C
> > > Ctrl_L in emacs, which issues the command 'lilypond
> > > '.  Since
> > > earlier today, whenever I do this, the compile fails with a
> > > segmentation fault.  Sometimes commenting out one or more
> > > instruments
> > > in the score allows the incomplete score to compile, but there
> > > seems to
> > > be no rhyme or reason as to which combinations of instruments
> > > allow
> > > compilation to take place successfully.
> > > 
> > > As a result, I have spent several hours today trying to work out
> > > why
> > > this crash has started occurring again.
> > > 
> > > But now I find that if I issue the command 'lilypond '
> > > directly from a GNOME terminal, the file compiles
> > > faultlessly.  Yet
> > > even if I issue 'lilypond ' as a shell command within
> > > emacs
> > > (rather than using Ctrl_C Ctrl_L) I again get a segmentation
> > > fault
> > > reported.
> > > 
> > > I have tried rebooting the computer and then running emacs
> > > without
> > > starting any other programs at the same time, but I still get the
> > > same
> > > result.
> > > 
> > > As I don't really understand what "segmentation fault" actually
> > > implies, can anybody suggest why this apparently inconsistent
> > > behaviour
> > > might be occurring?
> > > 
> > > David
> > > 
> > > 
> > > 
> 
> 
> 





Conditional segmentation faults

2020-08-28 Thread David Sumbler
I am running Ubuntu 18.04, Lilypond 2.21.4, emacs 25.2.2

Ever since I started my current Lilypond project, I have been
getting occasional segmentation faults when compiling.  Until today I
thought it was something to do with errors or inconsistencies in my
Lilypond code, and I have been able to make changes which appeared to
solve the problem.

However, today I discovered something very odd.

I edit my files in emacs, and I compile the main file by using Ctrl_C
Ctrl_L in emacs, which issues the command 'lilypond '.  Since
earlier today, whenever I do this, the compile fails with a
segmentation fault.  Sometimes commenting out one or more instruments
in the score allows the incomplete score to compile, but there seems to
be no rhyme or reason as to which combinations of instruments allow
compilation to take place successfully.

As a result, I have spent several hours today trying to work out why
this crash has started occurring again.

But now I find that if I issue the command 'lilypond '
directly from a GNOME terminal, the file compiles faultlessly.  Yet
even if I issue 'lilypond ' as a shell command within emacs
(rather than using Ctrl_C Ctrl_L) I again get a segmentation fault
reported.

I have tried rebooting the computer and then running emacs without
starting any other programs at the same time, but I still get the same
result.

As I don't really understand what "segmentation fault" actually
implies, can anybody suggest why this apparently inconsistent behaviour
might be occurring?

David





Re: Moving glissando ends

2020-08-27 Thread David Sumbler


On Wed, 2020-08-26 at 21:34 +0100, David Sumbler wrote:
> On Wed, 2020-08-26 at 19:51 +0200, Toine Schreurs wrote:
> > > I want each line to go to the centre of the invisible notehead,
> > > so
> > > that
> > > I get a continuous line.  Of course, the first and last lines
> > > only
> > > want
> > > to be full-length at one end, because there is an actual notehead
> > > at
> > > the other.
> > > 
> > > How can I achieve this?
> > 
> > for the first line:
> >   \override Glissando.bound-details.right.padding = #-1
> > 
> > for the intermediate lines:
> >   \override Glissando.bound-details.right.padding = #-1
> >   \override Glissando.bound-details.left.padding = #-1
> > 
> > for the last line:
> >   \override Glissando.bound-details.left.padding = #-1
> > 
> > You did not give an example, so this is not tested.
> > 
> > Toine Schreurs
> 
> Thank you very much for that solution.
> 
> In fact, I found that setting these parameters to -1 still leaves a
> small gap between successive lines.  The best value seems to be -1.4,
> for some strange reason.
> 
> David

Further to the above - and in case anyone else is trying to produce
joined up glissando lines - I eventually realized that the default for
a glissando line is to point to the nearest side of the relevant
notehead, not the centre.  The parameter attach-dir is respectively 1
and -1 for the left and right ends of the glissando.  Clearly what I
want is for them to point to the note's centre, with attach-dir set to
zero.

As there are quite a number of these glissando sweeps in the work in
question, I defined the following variables to make the job easier.

glissJoinR = {
  \override Glissando.bound-details.right.attach-dir = #0
  \override Glissando.bound-details.right.padding = #0 }
glissJoinL = {
  \override Glissando.bound-details.left.attach-dir = #0
  \override Glissando.bound-details.left.padding = #0 }
glissRevertR = {
  \revert Glissando.bound-details.right.attach-dir
  \revert Glissando.bound-details.right.padding }
glissRevertL = {
  \revert Glissando.bound-details.left.attach-dir
  \revert Glissando.bound-details.left.padding }

David




Re: Moving glissando ends

2020-08-26 Thread David Sumbler


On Wed, 2020-08-26 at 19:51 +0200, Toine Schreurs wrote:
> > I want each line to go to the centre of the invisible notehead, so
> > that
> > I get a continuous line.  Of course, the first and last lines only
> > want
> > to be full-length at one end, because there is an actual notehead
> > at
> > the other.
> > 
> > How can I achieve this?
> 
> for the first line:
>   \override Glissando.bound-details.right.padding = #-1
> 
> for the intermediate lines:
>   \override Glissando.bound-details.right.padding = #-1
>   \override Glissando.bound-details.left.padding = #-1
> 
> for the last line:
>   \override Glissando.bound-details.left.padding = #-1
> 
> You did not give an example, so this is not tested.
> 
> Toine Schreurs

Thank you very much for that solution.

In fact, I found that setting these parameters to -1 still leaves a
small gap between successive lines.  The best value seems to be -1.4,
for some strange reason.

David




Moving glissando ends

2020-08-26 Thread David Sumbler
For harp ad lib. glissandi, I am trying to produce a continuous line
which zig-zags across 2 staves.  I thought I could do this by placing
notes on alternate staves at the end of each "zig" or "zag", and then
putting glissandi between them.  Then (I thought) I could make the
notes invisible, and change parameters of the glissando lines so that
they actually go to the centre of each (invisible) notehead.

Making the notes invisible is easy enough, but try as I might, I can't
seem to make any change in the printed length of the glissandi.  I have
tried altering the 'gap' parameter and 'padding', as well as a few
other less promising items.  But nothing seems to make any difference
to the printed length of the lines, which therefore have gaps between
them.

I want each line to go to the centre of the invisible notehead, so that
I get a continuous line.  Of course, the first and last lines only want
to be full-length at one end, because there is an actual notehead at
the other.

How can I achieve this?

David







Re: partCombine confused by tags

2020-08-20 Thread David Sumbler


On Thu, 2020-08-20 at 20:06 +0200, David Kastrup wrote:
> David Sumbler  writes:
> 
> > I have just spent half a day trying to work out why one staff in my
> > orchestral score extends beyond the final barline.
> > 
> > Eventually I found out that it is because \partCombine seems only
> > partially to understand tags.
> 
> That is a misstatement.  \partCombine does not use tags in any
> manner.
> It plays the music it is given and records the results.  Then it
> combines the played results.  I am surprised that \keepWithTag should
> actually be doing anything here.
> 
> > The following example illustrates this:
> > 
> > %
> > \version "2.21.2"
> > 
> > instA = {
> >   b'4
> >   \tag #'versionI c''
> >   \tag #'versionII d''
> >   b'2 }
> > instB = {
> >   g'4 g' g'2 }
> > 
> > \score {
> >   \keepWithTag #'(versionI)
> >   \partCombine \instA \instB
> > }
> 
> That won't work.  You need to use
> \partCombine \keepWithTag versionI \instA \instB
> 
> instead.
> 
> > %
> > 
> > PartCombine chooses the notes for the instA line in accordance with
> > the
> > tags, but adds a crotchet's worth of staff after the end of the
> > passage.
> > 
> > It also does not correctly combine the parts after the tagged
> > section. 
> > However, this can be got around by adding a \partCombineChords
> > instruction before the 3rd beat of the bar.
> > 
> > Does anyone know of a way of correcting the extended staff?
> > 
> > David

Thank you for that.  I have now corrected all the parts in my score to
include the \keepWithTag directive as directed.  Not only has it solved
the problem of the extended staff, but it appears that it may also have
solved the intermittent Segmentation Faults I was getting.

I have used \keepWithTag in a Score context before, and it does not
seem to have caused any problems - but then I wasn't using
\partCombine.

David




partCombine confused by tags

2020-08-20 Thread David Sumbler
I have just spent half a day trying to work out why one staff in my
orchestral score extends beyond the final barline.

Eventually I found out that it is because \partCombine seems only
partially to understand tags.

The following example illustrates this:

%
\version "2.21.2"

instA = {
  b'4
  \tag #'versionI c''
  \tag #'versionII d''
  b'2 }
instB = {
  g'4 g' g'2 }

\score {
  \keepWithTag #'(versionI)
  \partCombine \instA \instB
}
%

PartCombine chooses the notes for the instA line in accordance with the
tags, but adds a crotchet's worth of staff after the end of the
passage.

It also does not correctly combine the parts after the tagged section. 
However, this can be got around by adding a \partCombineChords
instruction before the 3rd beat of the bar.

Does anyone know of a way of correcting the extended staff?

David




Help with Midi

2020-08-14 Thread David Sumbler
When working on a project in Lilypond I usually set things up to
generate midi files as well as printable output, mainly for note-
checking.  But it is interesting to generate an ensemble midi file too.
I play these files with TiMidity, using the fluidr3_gm soundfont.

I know the (very) basics about midi instruments (although I'm a bit
vague about midi channels), and I know how to improve things by using
timidity to generate wav files which I can import into qtractor or
similar and then edit the combined result.

What I am about to ask is not really a Lilypond question at all (at
least, I don't think it is), but I am hoping that somebody on this list
can point me in the right direction.  Clearly I am not making the right
searches on line, because I have never managed to find the information
I want.

What I should like to know is
1) how can I use drum and other untuned percussion sounds?
2) I notice that fluidr3_gm has dozens - probably hundreds - of extra
sounds and instruments beyond the standard 128.  How can I access
these?
3) how can I use other soundfonts?  There seem to be a lot of free
soundfonts available on line, but I have no idea how I would use them. 
It would be nice to have a decent trumpet sound (the fluidr3-gm one is
very poor), the sound of violin section as will as solo violin, string
harmonics, timpani roll and so on.

Can anyone point me to a useful online source of such information?

David





Quick question re pmp.ily

2020-08-08 Thread David Sumbler
Hi Rutger

Thanks again for sharing your brilliant work on staff management.

I downloaded pmp.ily, and I have got it working for my orchestral
score.  Clearly it is more versatile and controllable than
\partCombine.  But it is, of course, somewhat more complicated to use,
by its very nature and also because of certain limitations in Lilypond
that you mention in your tutorial.

One quick question: if one wishes to use PMP for some passages and
\partCombine for those where it works acceptably, is it necessary to
define two different staves (with different VerticalAxisGroup.remove-
layer values), or can it all be done on one defined stave?

I think the answer is that I need to define an extra stave, but perhaps
you will tell me differently.

Thanks for your help.

David




Re: "Ghost" trills

2020-08-07 Thread David Sumbler
On Thu, 2020-08-06 at 22:11 +0200, Rutger Hofman wrote:

> P.S. When you wrote 'Vaughan', did you actually mean 'Rutger'?

Yes, I certainly did.  Please accept my humble apologies.  I knew
perfectly well who had written the tutorial, but clearly my brain
dropped momentarily out of gear when I started writing my email.

> I think you have stumbled into one of the (many) limitations of 
> partCombine; it routinely messes up if a spanner stops at the end of
> a new partCombine mode. The problem is that these mode changes 
> (partCombine "Chords" mode to partCombine "Apart" mode at bar 3, and 
> back to partCombine "Chords" mode at bar 4) are implicit, and I
> haven't found a way to insert an extra explicit spanner end token
> (like \! for hairpins, or \stopTrillSpan for trills, etc. etc.).
> 
> However, in this case, it happens to be easy to fix by surrounding
> the second line of instOne with \partCombineApart 
> \partCombineAutomatic:
> 
> instOne = \relative {
>a'1 | a | a |
>\partCombineApart a1 \startTrillSpan | a1 \stopTrillSpan |
>\partCombineAutomatic a | a | a | a | a | a | a |
> }
> 
> If such a fix doesn't exist, one can revert to PMPChords and PMPApart
> as in my tutorial. These do allow insertion of an explicit spanner
> end token.

I confess that it hadn't occurred to me that one could add
\partCombineApart etc. in the instrumental parts, although it seems
obvious now you have suggested it.

In the actual clarinet parts where I first met the problem, this solves
the it.

However, I think that perhaps I should investigate your pmp.ily, as it
is highly likely that I shall need it at some point.

Thanks for your help.

David

> On 8/6/20 7:11 PM, David Sumbler wrote:
> > \version "2.21.2"
> > 
> > instOne = \relative {
> >a'1 | a | a |
> >a1 \startTrillSpan | a1 \stopTrillSpan |
> >a | a | a | a | a | a | a |
> > }
> > 
> > instTwo = \relative {
> >f'1 | f | f |
> >f2 \startTrillSpan f2 \startTrillSpan | f1 \stopTrillSpan |
> >f | f | f | f | f | f | f |
> > }
> > 
> > targetStaff = #(define-scheme-function (ctx) (string?)
> >#{
> >  \set Staff.keepAliveInterfaces = #'()
> >  \context Staff = #ctx { \unset Staff.keepAliveInterfaces }
> >#})
> > 
> > instScorePlan = {
> >\targetStaff clarinetI s1*4
> >\targetStaff bothClarinets s1*3
> >\break s1*5 \break s1*5
> > }
> > 
> > \score {
> >  \new StaffGroup \with {
> >  \consists "Keep_alive_together_engraver" }
> ><<
> >  \new Staff = bothClarinets \with {
> >\RemoveAllEmptyStaves
> >\override VerticalAxisGroup.remove-layer = 40 }
> >  << \partCombine \instOne \instTwo \instScorePlan >>
> >  %% Clarinets on 2 staves:
> >  \new Staff = clarinetI \with {
> >\RemoveAllEmptyStaves
> >\override VerticalAxisGroup.remove-layer = 20 }
> >  << \instOne \instScorePlan >>
> >  \new Staff = clarinetII \with {
> >\RemoveAllEmptyStaves
> >\override VerticalAxisGroup.remove-layer = 20 }
> >   << \instTwo \instScorePlan >>
> >>>
> > }





Re: "Ghost" trills

2020-08-06 Thread David Sumbler
Hi Mark, thanks for your response.

But the code doesn't compile correctly under 2.20, at least, not on my
computer.

What it does is throw out a number of error messages stemming from the
fact that \partCombine is not recognized.  And, true, it doesn't have
the unwanted trills.  But it is not combining the parts on the second
system, as can be seen if you change one of the bars to a couple of
minims, say, instead of a semibreve.

If \partcombine is substitued for \partCombine, so that 2.20 recognizes
it, then the parts combine correctly on the second system, but we also
get these wretched unwanted trill spanners.

David

On Thu, 2020-08-06 at 11:15 -0700, Mark Stephen Mrotek wrote:
> David,
> 
> It compiled correctly under 2.20.
> 
> Mark
> 
> -Original Message-
> From: lilypond-user [mailto:
> lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
> David Sumbler
> Sent: Thursday, August 6, 2020 10:12 AM
> To: lilypond-user@gnu.org
> Subject: "Ghost" trills
> 
> Having implemented some of the methods shown in Vaughan's marvellous
> tutorial at 
> https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg00114.html
> I have been making rapid progress in setting the orchestral piece
> which is my latest project.
> 
> But suddenly I came across a problem which, try as I might, I can't
> figure out or solve.   I have managed to work around it.  Despite
> that
> I should very much like to understand what is going on here so that I
> will be better able to deal with similar or related problems in
> future.
> Also the work-around makes my input code considerably more complex,
> and may not work well if line breaks get moved around.
> 
> The problem is that, after using trillspanners, sometimes the trill
> reappears later on after a change of staff setup.  The code below
> reproduces this problem.  I have also attached a pdf file containing
> the output.
> 
> In this example, it is quite easy to get rid of the unwanted
> trillspanners in the second line by making small, apparently random,
> alterations in the input.  For instance, if the 4th bar in the upper
> instrument is changed to 2 minims, or the same bar in the lower
> instrument is changed to a semibreve, the rogue trillspanners
> disappear.  However, it is not true  to say that the trillspanners
> always disappear whenever the rhythms in the two instruments are
> exactly the same, and of course it wouldn't be a useful solution to
> the problem even if it were true.  In fact, in my actual score the 2
> instruments do have identical rhythms, but I still get these unwanted
> trills in the next system.
> 
> My work-around, incidentally, involves creating another pair of
> staves with a different VerticalAxisGroup.remove-layer value, and
> changing \instScorePlan to use the first pair up to and including the
> trills, and the replacement pair thereafter.  Not very elegant, and
> if there were many trill passages it would quickly become unwieldy in
> the extreme.
> 
> Can anyone figure out why these spare trills are appearing, and how
> one can get rid of them reasonably simply?
>  
> David
> 
> %%
> \version "2.21.2"
> 
> instOne = \relative {
>   a'1 | a | a |
>   a1 \startTrillSpan | a1 \stopTrillSpan |
>   a | a | a | a | a | a | a |
> }
> 
> instTwo = \relative {
>   f'1 | f | f |
>   f2 \startTrillSpan f2 \startTrillSpan | f1 \stopTrillSpan |
>   f | f | f | f | f | f | f |
> }
> 
> targetStaff = #(define-scheme-function (ctx) (string?)
>   #{
> \set Staff.keepAliveInterfaces = #'()
> \context Staff = #ctx { \unset Staff.keepAliveInterfaces }
>   #})
> 
> instScorePlan = {
>   \targetStaff clarinetI s1*4
>   \targetStaff bothClarinets s1*3
>   \break s1*5 \break s1*5
> }
> 
> \score {
> \new StaffGroup \with {
> \consists "Keep_alive_together_engraver" }
>   <<
> \new Staff = bothClarinets \with {
>   \RemoveAllEmptyStaves
>   \override VerticalAxisGroup.remove-layer = 40 }
> << \partCombine \instOne \instTwo \instScorePlan >>
> %% Clarinets on 2 staves:
> \new Staff = clarinetI \with {
>   \RemoveAllEmptyStaves
>   \override VerticalAxisGroup.remove-layer = 20 }
> << \instOne \instScorePlan >>
> \new Staff = clarinetII \with {
>   \RemoveAllEmptyStaves
>   \override VerticalAxisGroup.remove-layer = 20 }
>  << \instTwo \instScorePlan >>
>   >>
> }
> %%
> 





"Ghost" trills

2020-08-06 Thread David Sumbler
Having implemented some of the methods shown in Vaughan's marvellous
tutorial at
https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg00114.html
I have been making rapid progress in setting the orchestral piece which
is my latest project.

But suddenly I came across a problem which, try as I might, I can't
figure out or solve.   I have managed to work around it.  Despite that
I should very much like to understand what is going on here so that I
will be better able to deal with similar or related problems in future.
Also the work-around makes my input code considerably more complex, and
may not work well if line breaks get moved around.

The problem is that, after using trillspanners, sometimes the trill
reappears later on after a change of staff setup.  The code below
reproduces this problem.  I have also attached a pdf file containing
the output.

In this example, it is quite easy to get rid of the unwanted
trillspanners in the second line by making small, apparently random,
alterations in the input.  For instance, if the 4th bar in the upper
instrument is changed to 2 minims, or the same bar in the lower
instrument is changed to a semibreve, the rogue trillspanners
disappear.  However, it is not true  to say that the trillspanners
always disappear whenever the rhythms in the two instruments are
exactly the same, and of course it wouldn't be a useful solution to the
problem even if it were true.  In fact, in my actual score the 2
instruments do have identical rhythms, but I still get these unwanted
trills in the next system.

My work-around, incidentally, involves creating another pair of staves
with a different VerticalAxisGroup.remove-layer value, and changing
\instScorePlan to use the first pair up to and including the trills,
and the replacement pair thereafter.  Not very elegant, and if there
were many trill passages it would quickly become unwieldy in the
extreme.

Can anyone figure out why these spare trills are appearing, and how one
can get rid of them reasonably simply?
 
David

%%
\version "2.21.2"

instOne = \relative {
  a'1 | a | a |
  a1 \startTrillSpan | a1 \stopTrillSpan |
  a | a | a | a | a | a | a |
}

instTwo = \relative {
  f'1 | f | f |
  f2 \startTrillSpan f2 \startTrillSpan | f1 \stopTrillSpan |
  f | f | f | f | f | f | f |
}

targetStaff = #(define-scheme-function (ctx) (string?)
  #{
\set Staff.keepAliveInterfaces = #'()
\context Staff = #ctx { \unset Staff.keepAliveInterfaces }
  #})

instScorePlan = {
  \targetStaff clarinetI s1*4
  \targetStaff bothClarinets s1*3
  \break s1*5 \break s1*5
}

\score {
\new StaffGroup \with {
\consists "Keep_alive_together_engraver" }
  <<
\new Staff = bothClarinets \with {
  \RemoveAllEmptyStaves
  \override VerticalAxisGroup.remove-layer = 40 }
<< \partCombine \instOne \instTwo \instScorePlan >>
%% Clarinets on 2 staves:
\new Staff = clarinetI \with {
  \RemoveAllEmptyStaves
  \override VerticalAxisGroup.remove-layer = 20 }
<< \instOne \instScorePlan >>
\new Staff = clarinetII \with {
  \RemoveAllEmptyStaves
  \override VerticalAxisGroup.remove-layer = 20 }
 << \instTwo \instScorePlan >>
  >>
}
%%


trillTest.pdf
Description: Adobe PDF document


Re: What is the significance of X in Lilypond?

2020-08-04 Thread David Sumbler


On Tue, 2020-08-04 at 08:21 -0600, Carl Sorensen wrote:
> 
> 
> On Tue, Aug 4, 2020 at 7:00 AM David Sumbler 
> wrote:
> > My latest Lilypond project had been compiling satisfactorily.  But
> > at a
> > certain point it began throwing out the following message:
> > 
> > %
> > Preprocessing graphical
> > objects.../usr/local/lilypond/usr/share/lilypond/current/ly/engrave
> > r-
> > init.ly:836:5: In procedure ly:stencil-extent in expression
> > (ly:stencil-extent (ly:note-head::print g) X):
> 
> This particular line is trying to find the X-extent (horizontal
> extent) of the note-head you are printing.
> 
> X and Y are defined as Scheme constants for the X (horizontal) and Y
> (vertical) directions.
> 
> One feature of Scheme is that you can redefine anything.  So you
> redefined X and it caused problems.
> 
> A general rule for lilypond is to avoid any variable names that are
> all uppercase.  In addition to X and Y, LEFT, CENTER, RIGHT, UP, and
> DOWN are all defined Scheme constants, and if you redefine them it
> will cause problems. 
> 
> HTH,
> 
> Carl

Thank you for that clear explanation.  I knew it must be something like
that, but couldn't guess what X was.

I had started off with lower-case Roman numerals, but that gives a
problem with 100 and 500, which are also note-names.  I suppose the
best solution is probably to use upper case C and D (and M, probably),
and lower case i, v, x and l, so that 1,444 would be MCDxliv.  That
doesn't look too bad, and should keep me, Lilypond and Scheme all
happy.

David




What is the significance of X in Lilypond?

2020-08-04 Thread David Sumbler
My latest Lilypond project had been compiling satisfactorily.  But at a
certain point it began throwing out the following message:

%
Preprocessing graphical
objects.../usr/local/lilypond/usr/share/lilypond/current/ly/engraver-
init.ly:836:5: In procedure ly:stencil-extent in expression
(ly:stencil-extent (ly:note-head::print g) X):
/usr/local/lilypond/usr/share/lilypond/current/ly/engraver-
init.ly:836:5: Wrong type argument in position 2 (expecting axis):
#) (origin .
#))((display-methods #) (name .
SkipEvent) (iterator-ctor . #) (types event rhythmic-event skip-event)) >

Compilation exited abnormally with code 1 at Tue Aug  4 13:38:45
%

Fortunately the error message includes a pointer to the code which is
causing the problem: structure.ily:15:12.  Line 15 of that file reads:

X= s1

It is part of a series of 313 lines which set variables for the
durations of each of the bars in the piece.  This line is for bar 10: I
use Roman numerals since Arabic numerals are not acceptable in variable
names unless quoted.  Quoting the name "X" does not help, however: I
still get the same error.

I can easily get around this problem: the name 'x', for instance, seems
to work OK as a replacement for 'X'.

But I am intrigued: what is Lilypond reading this line as?  What
significance does "X" have for Lilypond?

David






Re: Selective partCombine

2020-07-31 Thread David Sumbler
On Sat, 2020-07-25 at 10:37 +0200, rhn...@vu.nl wrote:
> Did you see my (first attempt at a) tutorial on this topic?
> 
> 
https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg00114.html

This is truly magnificent.  Reading this tutorial, I learnt a lot about
things Lilypond can do which I wasn't really aware of.  Most
importantly, it appears to solve just about every problem I can imagine
regarding arranging parts on variable numbers of staves.  It even
automates things so that a required change in the number/distribution
of staves happens automatically at line breaks.

I now have the orchestral piece I wanted to set well under way in
Lilypond, and so far the methods you propose are doing everything I
want.

A bonus is that my file structure is far more consistent and well
organized than ever before.

Thank you so much.

David




Re: Selective partCombine

2020-07-25 Thread David Sumbler
On Sat, 25 Jul 2020 at 18:01 +1000, Vaughan McAlley  
wrote:
> 
> On Sat, 25 Jul 2020 at 05:28, David Sumbler  wrote:
> >
> > The only orchestral piece I have set in Lilypond until now was for 12
> > strings and a couple of other instruments.  I had 2 versions of the
> > strings material, one of which kept all of the parts on separate staves
> > for the parts, and the other which combined them on to fewer staves
> > (where appropriate) for the score.  This worked tolerably well: I wrote
> > one version first, then copied and edited it to produce the other.  In
> > simpler sections I could even make the necessary changes by using tags.
> >
> > But I feel that there must be a better way.  As I am now about to start
> > on a work for full orchestra, I have been experimenting with having
> > separate parts which can nonetheless be combined on to a single stave
> > using \partCombine and its cousins. For instance, I have:
> >
> > instOne = {c'4 d' e' f' | g' a' b' c'' | d'' e'' f'' g''}
> > instTwo = {a4 b c' d' | e' f' g' a' | b' c'' d'' e''}
> > instScore = ?
> >
> > The form of instOne and instTwo would be correct for the parts.  I am
> > looking for a way of writing instScore so that it combines the parts on
> > to one staff in bar 2, while keeping them separate in bars 1 and 3.
> > (Obviously this would be senseless here, but imagine that each bar
> > represents a passage taking up a full page width or more.)
> >
> > Is this possible?  Or am I approaching this in completely the wrong
> > way?
> >
> > David
> >
> >
> 
> I've been working on an old orchestral score of mine where flutes
> keep swapping to piccolo etc. I have something like this, the
> attached files. Being able to put variables in quotes is a godsend.
> 
> Vaughan

This is excellent - thank you so much for sending it.  I need to study
it in a bit more detail than I've had time for yet, but I am sure that
I can adapt these ideas to my requirements.

David




Selective partCombine

2020-07-24 Thread David Sumbler
The only orchestral piece I have set in Lilypond until now was for 12
strings and a couple of other instruments.  I had 2 versions of the
strings material, one of which kept all of the parts on separate staves
for the parts, and the other which combined them on to fewer staves
(where appropriate) for the score.  This worked tolerably well: I wrote
one version first, then copied and edited it to produce the other.  In
simpler sections I could even make the necessary changes by using tags.

But I feel that there must be a better way.  As I am now about to start
on a work for full orchestra, I have been experimenting with having
separate parts which can nonetheless be combined on to a single stave
using \partCombine and its cousins. For instance, I have: 

instOne = {c'4 d' e' f' | g' a' b' c'' | d'' e'' f'' g''}
instTwo = {a4 b c' d' | e' f' g' a' | b' c'' d'' e''}
instScore = ?

The form of instOne and instTwo would be correct for the parts.  I am
looking for a way of writing instScore so that it combines the parts on
to one staff in bar 2, while keeping them separate in bars 1 and 3. 
(Obviously this would be senseless here, but imagine that each bar
represents a passage taking up a full page width or more.)

Is this possible?  Or am I approaching this in completely the wrong
way?

David




Re: Problem installing docs

2020-07-11 Thread David Sumbler


On Sat, 2020-07-11 at 11:00 +0200, Federico Bruni wrote:
> 
> On Fri, 10 Jul, 2020 at 17:23, David Sumbler 
> wrote:
> > I downloaded Lilypond version 2.21.2 today.  When I ran the script 
> > with
> > the --doc option, Lilypond installs but the docs can't be
> > downloaded.
> > 
> > I also tried with version 2.20.1, with the same result.
> > 
> > I get the following output:
> > 
> > No ./Downloads/lilypond-2.21.2-1.documentation.tar.bz2 found, 
> > downloading.
> > --2020-07-10 17:15:04--  
> > 
http://lilypond.org/downloads/binaries/documentation/Downloads/lilypond-2.21.2-1.documentation.tar.bz2
> > Resolving lilypond.org (lilypond.org)... 35.206.114.173
> > Connecting to lilypond.org (lilypond.org)|35.206.114.173|:80... 
> > connected.
> > HTTP request sent, awaiting response... 404 Not Found
> > 2020-07-10 17:15:04 ERROR 404: Not Found.
> > 
> > Is this a temporary problem with the server, or is there something 
> > else I should know or do?
> > 
> 
> Hi David
> 
> I've just tried and it works.
> Perhaps it was a temporary server error.
> 
> Do you know that you can use the --doc switch only when your working 
> directory is the same as the directory where the install script is 
> saved?
> https://gitlab.com/lilypond/lilypond/-/issues/3768
> 
> Well, at least 6 years ago.. I haven't tried it recently.

You hit the nail on the head!  Yes, I fell foul of this bug.

If I cd into the directory where the script is, then the documentation
downloads as expected.  But if my working directory is elsewhere and I
give a path to the script in my command line, then it fails.

In more detail, calling the script from its own directory with
./lilypond-2.21.2-1.linux-64.sh --doc
causes the script to download the documentation from 

http://lilypond.org/downloads/binaries/documentation/./lilypond-2.21.2-1.documentation.tar.bz2

Whereas calling the script with, say,
Downloads/lilypond-2.21.2-1.linux-64.sh --doc
makes the script attempt to download from

http://lilypond.org/downloads/binaries/documentation/Downloads/lilypond-2.21.2-1.documentation.tar.bz2

This arises from the use of the variable $me in the script set to the
value of $0, which contains the full path of the script as called.  But
only the basename is required to extract the name of the Lilypond
version.

I have tried to modify the script to get around this but without
success.  It could be done either by creating a new variable containing
just the basename, or by modifying the 'sed' line (line 293) which
extracts the Lilypond version's name.

I am pretty sure, however, that my failure is merely a result of my
poor scripting abilities, rather than any inherent difficulty.  I'm
sure that somebody competent could modify the script and lose the bug
in about 5 minutes!

David




Problem installing docs

2020-07-10 Thread David Sumbler
I downloaded Lilypond version 2.21.2 today.  When I ran the script with
the --doc option, Lilypond installs but the docs can't be downloaded.

I also tried with version 2.20.1, with the same result.

I get the following output:

No ./Downloads/lilypond-2.21.2-1.documentation.tar.bz2 found, downloading.
--2020-07-10 17:15:04--  
http://lilypond.org/downloads/binaries/documentation/Downloads/lilypond-2.21.2-1.documentation.tar.bz2
Resolving lilypond.org (lilypond.org)... 35.206.114.173
Connecting to lilypond.org (lilypond.org)|35.206.114.173|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-07-10 17:15:04 ERROR 404: Not Found.

Is this a temporary problem with the server, or is there something else I 
should know or do?

David




Re: showLastLength

2020-06-03 Thread David Sumbler



On Wed, 2020-06-03 at 18:19 +0200, David Kastrup wrote:
> David Sumbler  writes:
> 
> > I have never used 'showLastLength' or 'showFirstLength' until
> > today.
> > 
> > I inserted a line such as
> > showLastLength = R1*5
> > exactly as shown in NR3.4.2, immediately before the first (and
> > only)
> > \score { } section.
> > 
> > But every time I try to compile the file I get:
> > 
> > syntax error, unexpected SYMBOL
> > 
> > showLastLength = R1*5
> > 
> > Why might this be?
> > 
> > I am using Lilypond v2.19.82
> 
> Once you stop assuming that the manual writers are incompetent and/or
> realise that almost all examples in the manual are actually run
> through
> LilyPond while producing the manual, it should be obvious that the
> principal problem will lie in the particular way you wrote your
> source,
> making it different from what is done in the manual.
> 
> That means that it is absolutely essential to include a minimal
> example
> <http://lilypond.org/tiny-examples> for diagnosis.
> 
> Lacking that information, it would be my guess that you have your
> \score
> inside of a \book section, and those don't allow assignments inside.
> But since you neither include an example nor even mention \book, this
> is
> a mere guess.

I don't know why you think I assume that the manual writers are
incompetent - I don't assume any such thing.

I asked why I might be getting the error.  And you have kindly answered
my question, even though it appears that I inadvertently irritated you
to some degree.

The fact is that, yes, the score in question was accessed in a \book
section in another file.  I was not aware that I couldn't use
showLastLength inside a \book { }.

In the mean time, I got around the problem by using
Score.skipTypesetting instead.  I was getting a warning about a hairpin
being too small, with of course no indication of where in the score it
might be - tricky in a 150-page score.  I eventually tracked it down.

Thanks for your help.

David




showLastLength

2020-06-03 Thread David Sumbler
I have never used 'showLastLength' or 'showFirstLength' until today.

I inserted a line such as
showLastLength = R1*5
exactly as shown in NR3.4.2, immediately before the first (and only)
\score { } section.

But every time I try to compile the file I get:

syntax error, unexpected SYMBOL

showLastLength = R1*5

Why might this be?

I am using Lilypond v2.19.82

David




Has LSR moved?

2019-11-15 Thread David Sumbler
Has the Lilypond Snippets Repository moved?

The address I have bookmarked, http://lsr.di.unimi.it/LSR/Search ,
gives me a "Not Found" error.

David




Re: Controlling midi dynamics

2019-07-17 Thread David Sumbler
Thank you for all your help on this.  I now have an include file that
does more or less what I want, and of course I can tweak in further in
the future.

David


On Tue, 2019-07-16 at 15:11 +0200, Jean ABOU SAMRA wrote:
> 
> \version "2.19.83"
> 
> 
> 
> 
> %{ From 
> http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.fr.html
> 
> 
> midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) *
> fraction
> 
> 
> These are the volume coefficients ('fraction' above) applied to each
> dynamic.
> %}
> #(define (my-dynamic-absolute-volume-function dynamic-name)
>   (assoc-get dynamic-name
> '(
>   ; Adjust these values to get what you would like.
>   ; You can add other dynamics.
>   ; If an dynamic name is not found, the default dynamic values
> are used.
>   ("ff" . 0.95)
>   ("pp" . 0.3)
> )
> (default-dynamic-absolute-volume dynamic-name)))
> 
> 
> %{ These are the default equalizations applied to each MIDI
> instrument.
> An equalization consists in (min . max) where min is the value to
> apply for midiMinimumVolume and max for midiMaximumVolume.
> Keep refering to the formula above!
> %}
> #(define (my-instrument-equalizer instrument-name)
>   (assoc-get instrument-name
> '(
>   ; Adjust these values to get what you would like.
>   ; You can add other instrument names.
>   ; If an instrument name is not found, the default equalizer is
> used.
>   ("violin" . (0.1 . 0.4))
>   ("cello" . (0.5 1.0))
> )
> (default-instrument-equalizer instrument-name)))
> 
> 
> 
> 
> \midi {
>   \context {
> \Score
> instrumentEqualizer = #my-instrument-equalizer
> dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-
> function
>   }
> }
> 
> 
> 
> 
> violin = \new Voice \relative { c'4\pp d e f g\ff a b c }
> cello = \new Voice \relative { a,4\pp b c d e\ff f gis a }
> 
> 
> \score {
>   <<
> \new Staff \with { midiInstrument = "violin" } { \violin }
> \new Staff \with { midiInstrument = "cello" } { \cello }
>   >>
>   \midi { }
> }
> 
> 
> You can use an instrument equalizer and custom dynamic absolute
> volume values at the same time.
> Of course, instrument equalization can be achieved using \set
> Staff.midiMinimumVolume = min  \set Staff.maximumVolume = max …but
> the power of an instrument equalizer is that you can put it in a
> separate file and\include it, as you say that you generally want to
> hear the cello louder and the violin less loud.
> By the way, I find that the example given on
> http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.html#setting-midi-volumein
>  selected snippets at "Replacing default MIDI instrument
> equalization"is overly complicated. Why define the alist empty to
> append to it later?And why not just use assoc-get? It could be easily
> improved.
> Best regards,Jean Abou Samra
> > Le 15 juil. 2019 à 18:26, David Sumbler  a
> > écrit :
> > 
> > Hi Jean
> > 
> > That's great - I certainly now can get a greater range of dynamic
> > than before.  Thank you very much.
> > 
> > But I find that altering values in 'my-instrument-equalizer-alist'
> > has no effect at all.  How can I adjust the relative volumes of 2
> > different instruments - say, 'violin' and 'cello'.  (I find that in
> > the fluidr3_gm sound font, the cello is far quieter than the other
> > stringed instruments.) 
> > 
> > David
> > 
> > 
> > On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
> > > Hi David,
> > > Your problem is not with the instrument, it's with the dynamics
> > > themselves.
> > > The algorithm that affects a volume to a note does a scale
> > > between midiMinimumVolume and midiMaximumVolume that includes all
> > > dynamics. Mathematically, you can think:
> > > volume = midiMinimumVolume + (midiMaximumVolume -
> > > midiMinimumVolume)*dynamic
> > > 
> > > Let me try a diagram:
> > > 
> > > 0   |   ppp   pp  p  mp  mf f ff
> > > fff     f sf  | 1
> > > no soundmidiMinimumVolume
> > >  midiMaximumVolume maximum volume
> > > possible
> > > 
>

Re: Controlling midi dynamics

2019-07-15 Thread David Sumbler
Hi Jean

That's great - I certainly now can get a greater range of dynamic than
before.  Thank you very much.

But I find that altering values in 'my-instrument-equalizer-alist' has
no effect at all.  How can I adjust the relative volumes of 2 different
instruments - say, 'violin' and 'cello'.  (I find that in the
fluidr3_gm sound font, the cello is far quieter than the other stringed
instruments.) 

David


On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
> Hi David,
> Your problem is not with the instrument, it's with the dynamics
> themselves.
> The algorithm that affects a volume to a note does a scale between
> midiMinimumVolume and midiMaximumVolume that includes all dynamics.
> Mathematically, you can think:
> volume = midiMinimumVolume + (midiMaximumVolume -
> midiMinimumVolume)*dynamic
> 
> Let me try a diagram:
> 
> 0   |   ppp   pp  p  mp  mf f ff fff
>     f sf  | 1
> no soundmidiMinimumVolume
>  midiMaximumVolume maximum volume possible
> 
> 
> Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume
> to 1, so if there is not enough difference for you, you need to
> influence the scale between the two in addition to minimum and
> maximum volume.
> 
> Taking a look at 
> http://lilypond.org/doc/v2.19/Documentation/internals/dynamic_005fperformer
> suggests to set the dynamicAbsoluteVolumeFunction property. You will
> find its default in scm/midi.scm:
> 
> ;; define factor of total volume per dynamic marking(define-session-
> public absolute-volume-alist '())(set! absolute-volume-alist 
> (append   '( ("sf" . 1.00) ("f" . 0.95) 
>("" . 0.92) ("fff" . 0.85) ("ff" . 0.80) 
>("f" . 0.75) ("mf" . 0.68) ("mp" . 0.61)   
>  ("p" . 0.55) ("pp" . 0.49) ("ppp" . 0.42)   
>  ("" . 0.34) ("p" . 0.25) )   absolute-
> volume-alist))
> (define-public (default-dynamic-absolute-volume s)  (assoc-get s
> absolute-volume-alist))
> so now you can modify it, for example:
> 
> \version "2.19.83"
> 
> 
> #(define (my-dynamic-absolute-volume-function dynamic-name)
>  (assoc-get dynamic-name
>   '(
>  ("sf" . 1.00)
>  ("f" . 0.95)
>  ("" . 0.92)
>  ("fff" . 0.85)
>  ("ff" . 0.95) ;; was 0.80
>  ("f" . 0.75)
>  ("mf" . 0.68)
>  ("mp" . 0.61)
>  ("p" . 0.55)
>  ("pp" . 0.10) ;; was 0.49
>  ("ppp" . 0.42)
>  ("" . 0.34)
>  ("p" . 0.25)
>)))
> 
> 
> \score {
>  \new Staff \with { midiInstrument = "trumpet" } {
>\set Score.midiMinimumVolume = 0.0
>\set Score.midiMaximumVolume = 1.0
>    \set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-
> volume-function
>a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
>  }
>  \midi { }
> \layout { }
> }
> 
> You understand that default 'piano' is not so piano because we have
> to go to p.
> By adjusting the values in that associative list, you can play with
> dynamics and get the exact contrast you would like.
> Hope that helps.Kind regards,Jean Abou Samra.
> > Le 15 juil. 2019 à 16:16, David Sumbler  a
> > écrit :
> > 
> > 
> > \version "2.19.82"
> > 
> > #(define my-instrument-equalizer-alist '())
> > 
> > #(set! my-instrument-equalizer-alist
> >   (append
> >'(
> >  ("trumpet" . (0.01 . 0.99)))
> >my-instrument-equalizer-alist))
> > 
> > #(define (my-instrument-equalizer s)
> >   (let ((entry (assoc s my-instrument-equalizer-alist)))
> > (if entry
> >   (cdr entry
> > 
> > \score {
> >   \new Staff \with { midiInstrument = "trumpet" } {
> > %\set Score.midiMaximumVolume = #1
> > %\set Score.midiMinimumVolume = #0
> > \set Score.instrumentEqualizer = #my-instrument-equalizer
> > a'8\pp b' cis'' d'' e''-.\ff d''-. cis'&

Controlling midi dynamics

2019-07-15 Thread David Sumbler

\version "2.19.82"

#(define my-instrument-equalizer-alist '())

#(set! my-instrument-equalizer-alist
  (append
   '(
 ("trumpet" . (0.01 . 0.99)))
   my-instrument-equalizer-alist))
  
#(define (my-instrument-equalizer s)
  (let ((entry (assoc s my-instrument-equalizer-alist)))
(if entry
  (cdr entry

\score {
  \new Staff \with { midiInstrument = "trumpet" } {
%\set Score.midiMaximumVolume = #1
%\set Score.midiMinimumVolume = #0
\set Score.instrumentEqualizer = #my-instrument-equalizer
a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
  }
  \midi { }
}


Can somebody explain how I can control the absolute minimum and maximum
values of individual instruments in midi?

In the above snippet, I expect to find the first bar almost inaudible
and the second bar extremely loud.  However, I find that the difference
between the pp section and the ff is quite limited.  If I reduce the
supposed maximum volume of the trumpet to, say, 0.5, then the pp will
indeed be very quiet, but when I restore the second parameter to 0.99
as here, then the pp passage is much louder than previously.

If I uncomment the Score.midiMaximumVolume line and the following one,
it makes little difference.  The Internals Reference states that valid
values for these 2 parameters are numbers between 0 and 1.  However, if
I set midiMaximumVolume to 2, I find that the pp and the ff sections
have the same volume as each other.  Further increases in
midiMaximumVolume do not seem to make any difference.

In every case, the total dynamic range is considerably less than I
would like.  How can I extend the dynamic range beyond the limited
range I can currently get?

David


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


Re: Acciaccatura distoring spacing

2019-05-27 Thread David Sumbler
Firstly let me apologise for my stupidity: I am quite aware of the
problem with gracenotes after barlines.  But in this case, with a
normal barline, there wasn't a problem until I started experimenting
with SpacingSpanner.strict-grace-spacing.  When the problem did arise,
it just didn't occur to me that the lack of dummy graces in the other
parts might be a factor.

Still... there really does still seem to be something odd and very
unsatisfactory going on here.  I have spent hours and hours
experimenting with this, and so far I haven't found a way of getting a
wholly satisfactory result. 

The following example illustrates the sort of problem I get:

\language "english"
#(set-global-staff-size 16)

\score {
   \new StaffGroup <<
 { \new Staff \time 5/4 \relative {
  \tuplet 6/4 {c'''16( d c a g e} c8) r
  \tuplet 3/2 4 {r \acciaccatura a' g-. \acciaccatura a g-.
 \once \hide TupletBracket 
 \acciaccatura a g[-. r \acciaccatura a g]-.
 \acciaccatura a g-. \acciaccatura a g-. r} |
  %% Violin 2-A Score No.1 bar 69
  \tuplet 3/2 4 {\once \hide TupletBracket \acciaccatura a='' g8-.
 \acciaccatura a g-. \acciaccatura a g-.
 r \acciaccatura a g-. \acciaccatura a g-.}
  \acciaccatura a g-.
  r r4
  \tuplet 6/4 {c16( d c a g e)} |
 } }
 { \new Staff \relative {
  r2
  \newSpacingSection
  \override Score.SpacingSpanner.strict-grace-spacing = ##t
  g''16-. g-. e'( c) g-. g-. e'( c) g-. g-. e'( c) |
  \newSpacingSection
  \revert Score.SpacingSpanner.strict-grace-spacing
  %% Violin 2-B Score No.1 bars 69
  \grace s8 g=''16-.
  \newSpacingSection
  \override Score.SpacingSpanner.strict-grace-spacing = ##t
  g-. e'( c) r4
  \newSpacingSection
  \revert Score.SpacingSpanner.strict-grace-spacing
  g16-. g-. e'( c)
  r8 e,16-. fs-. g-. a-. b-. c-. |
 } }
   >>
 }   


At first glance this is reasonable, and certainly the problem of the
barline appearing 4 1/2 beats later than it should has been solved.

But in fact the barline is still not quite where it should be: it is
too far to the left, so that it is almost touching the last semiquaver
of the first bar, and there is an unnecessarily large space before the
acciaccatura in the upper line.

In the original score there are 8 other staves (plus 2 invisible ones),
generally less busy than these 2 staves.  If I could understand how to
get a predictably good result for these 2 staves, hopefully that would
translate into a solution for the whole score.  But at the moment, it's
"doing my head in", as they say.

David


On Mon, 2019-05-27 at 09:20 +1000, Andrew Bernard wrote:
> Hi All,
> 
> Isn't this a well known bug in lilypond? Much discussion in the list
> archives. You need to add the spacer in the other voice.
> 
> Andrew
> 

On Sun, 2019-05-26 at 14:20 -0300, Stefano Troncaro wrote:
> Hi David,
> 
> Look at this:
> 
> %
> \version "2.19.82"
> \language "english"
> #(set-global-staff-size 16)
> 
> strictGraceTrue = {
>   \newSpacingSection
>   \override Score.SpacingSpanner.strict-grace-spacing = ##t }
> 
> strictGraceFalse = {
>   \newSpacingSection
>   \override Score.SpacingSpanner.strict-grace-spacing = ##f }
> 
> \score {
>   \new StaffGroup <<
> \new Staff { s4*5*2 }
> \new Staff \relative { \time 5/4
>   r2
>   \strictGraceTrue
>   \tuplet 3/2 4 {r8 \acciaccatura a'' g-. \acciaccatura a g-.
>  \once \hide TupletBracket
>  \acciaccatura a g[-. r \acciaccatura a g]-.
>  \acciaccatura a g-. \acciaccatura a g-. r} |
>   \noBreak \strictGraceFalse
>   \tuplet 3/2 4 {\once \hide TupletBracket \acciaccatura a g8-.
>  \acciaccatura a g-. \acciaccatura a g-.
>  r \acciaccatura a g-. \acciaccatura a g-.}
>   \acciaccatura a g-.
>   r r2 |
> }
> \new Staff \relative {
>r2 g''16-. g-. e'( c) g-. g-. e'( c) g-. g-. e'( c) |
>\grace s8 g=''16-. \strictGraceTrue g-. e'( c) r4 g16-. g-.
> e'( c)
>r8 e,16-. fs-. g-. a-. b-. c-. |
> }
>   >>
> }  
> %
> 
> I'm sorry I don't have time to write a full explanation, or more
> tests now, but I think the problem lies with the fact that the bar
> starts with an acciacatura in one Voice, but there is a bar check and
> no acciacatura in the other Voice. Writing an acciacatura with a
> spacer rest in the voice that has no printed grace note solves the
> issue. To avoid having the grace (that occupies no time with the
> strict-grace-spacing set to #t) collide with the barline, I changed
> spacing sections.
> 
> Hope this helps,
> Stéfano


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

Re: Acciaccatura distoring spacing

2019-05-26 Thread David Sumbler
Armed with this method of correcting the spacing when acciaccature
occur in conflicting rhythms, I tried applying it to some other
passages which had similar but less noticeable spacing problems.

But there is a difficulty, which I mentioned before: if a barline
occurs within a system, the barline is often printed in completely the
wrong place, passing through noteheads etc.  The error is always in
shifting the barline to the right by a couple of inches or so.

Yet everything else about the output appears fine: the line end comes
in the correct place (complete with barline), and the spacing is as
required.

I blamed polymark when I reported this problem before.  But now I find
that, although I thought that disabling polymark had solved the
problem, in other places the wrongly-placed barline occurs even when
polymark is not included in the files.

The following pared down version of a couple of bars illustrates the
problem.  It compiles correctly as it stands.  But if the commented
line is removed, then on my system, at least, the barline which should
be placed after 5 crotchets, actually appears almost at the end of the
line, after 9.25 crotchets.

%%%
\version "2.19.82"
\language "english"
#(set-global-staff-size 16)

\score {
  \new StaffGroup <<
%{ \new Staff s4*5*2 }
{ \new Staff \time 5/4 \relative {
  r2
  \newSpacingSection
  \override Score.SpacingSpanner.strict-grace-spacing = ##t
  \tuplet 3/2 4 {r8 \acciaccatura a'' g-. \acciaccatura a g-.
 \once \hide TupletBracket
 \acciaccatura a g[-. r \acciaccatura a g]-.
 \acciaccatura a g-. \acciaccatura a g-. r} |
  \noBreak
  \tuplet 3/2 4 {\once \hide TupletBracket \acciaccatura a g8-.
 \acciaccatura a g-. \acciaccatura a g-.
 r \acciaccatura a g-. \acciaccatura a g-.}
  \acciaccatura a g-.
  r r2 |
} }
{ \new Staff \relative {
   r2 g''16-. g-. e'( c) g-. g-. e'( c) g-. g-. e'( c) |
   \tweak extra-spacing-width #'(-3 . 0) g=''16-. g-. e'( c) r4
g16-. g-. e'( c)
   r8 e,16-. fs-. g-. a-. b-. c-. |
} }
  >>
}
%%%


If the spacer rests are replaced by normal rests, the problem goes
away.  But whole bar rests cause the  problem to reappear,  Even if the
stave is not actually displayed (because \with \RemoveAllEmptyStaves
has been added), the problem persists.

This surely is a bug.  Whether it is or not, it is causing me a lot of
difficulty, because I have a part for narrator which uses a dummy stave
to add the narrator's words as Marks.  If I replace the dummy rests
with normal rests in this stave (which has \RemoveAllEmptyStaves) the
stave reappears on any line where the narrator has to speak, although I
don't understand why it does this: after all, the stave is still
"empty", and the RehearsalMark is in the Score context.

Can anyone explain this odd behaviour?

David

On Tue, 2019-05-21 at 01:30 -0300, Stefano Troncaro wrote:
> Oh I see, troubleshooting in big projects like what you describe can
> be so painful.
> Hopefully you figure out specifically what in your poly-mark-
> engraver.ily is conflicting with overriding the SpacingSpanner.
> Perhaps if you manage to isolate the problem and make a short example
> showing the bizarre results you described someone in this list will
> be able to figure out what is happening and how to fix the poly-mark-
> engraver.
> Anyways, I'm happy you solved it!
> El lun., 20 may. 2019 a las 18:01, David Sumbler ( >) escribió:
> > Hi Stefano,
> > 
> > I have now re-read the Horizontal Spacing section, and I am a bit
> > wiser
> > than I was.
> > 
> > When I tried it, the fix you suggested worked perfectly for the
> > snippet
> > in my email.  But I had great difficulty when I applied it to my
> > actual
> > score: I kept getting numerous warnings:
> > 
> > programming error: Cannot determine neighbors for floating
> > column.
> > continuing, cross fingers
> > 
> > Also, depending where I began/ended the strict-grace-spacing, I
> > sometimes had really bizarre results with a barline in completely
> > the
> > wrong place and actually passing through noteheads!
> > 
> > After about 2 hours trying to isolate the cause, I found that it
> > was
> > due to the fact that my default include file itself includes poly-
> > mark-
> > engraver-ily.  I disabled this, and then recompiled the whole score
> > (all 150 pages of it).  To my great relief I found that there were
> > no
> > problems: clearly I have not actually used the poly-mark facility
> > in

Re: Acciaccatura distoring spacing

2019-05-20 Thread David Sumbler
Hi Stefano,

I have now re-read the Horizontal Spacing section, and I am a bit wiser
than I was.

When I tried it, the fix you suggested worked perfectly for the snippet
in my email.  But I had great difficulty when I applied it to my actual
score: I kept getting numerous warnings:

programming error: Cannot determine neighbors for floating column.
continuing, cross fingers

Also, depending where I began/ended the strict-grace-spacing, I
sometimes had really bizarre results with a barline in completely the
wrong place and actually passing through noteheads!

After about 2 hours trying to isolate the cause, I found that it was
due to the fact that my default include file itself includes poly-mark-
engraver-ily.  I disabled this, and then recompiled the whole score
(all 150 pages of it).  To my great relief I found that there were no
problems: clearly I have not actually used the poly-mark facility in
this score.

Thank you very much for your help on this.

David


On Mon, 2019-05-20 at 12:45 -0300, Stefano Troncaro wrote:
> Hi David,
> 
> Ttake a look a this snippet:
> 
> \version "2.19.82"
> 
> \paper { line-width = 65\mm }
> 
> <<
>   {
> \new Staff \time 2/4
> \newSpacingSection
> \override Score.SpacingSpanner.strict-grace-spacing = ##t
> \tuplet 7/4 { g'16 a' b' c'' d'' e'' f'' } g''8 r
>   }
>   {
> \new Staff
> \tuplet 3/2 4 { g''8 \acciaccatura a'' g'' g'' } g'' r
>   }
> >>
> 
> Does this fix it for you? If it does, I encourage you to read the
> chapter on horizontal spacing of the Notation Reference, and then
> also look at the SpacingSpanner properties and interfaces in the
> Internals Reference.
> 
> Hope that helps!
> Stéfano



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


Re: Acciaccatura distoring spacing

2019-05-20 Thread David Sumbler
I sent the message quoted below to the list last week.  I received no
replies, the principal reason for which is, I suspect, that there is
currently no solution to the problem.

I have encountered this sort of difficulty before.  Lilypond arranges
notes so that those that occur later in time on any staff in a system
are always farther to the right that those that are earlier.  This, of
course, is usually what one wishes to happen.

The problem I encountered presumably results from the fact that
acciaccature are deemed to take no time at all.  (This is how they are
treated in notation theory although of course in reality they must take
a finite amount of time, at least with non-polyphonic instruments.)

Here is a shorter snippet which illustrates the problem:

%%%
\version "2.19.82"

\paper { line-width = 65\mm }

<<
  {
\new Staff \time 2/4
\tuplet 7/4 { g'16 a' b' c'' d'' e'' f'' } g''8 r
  }
  {
\new Staff
\tuplet 3/2 4 { g''8 \acciaccatura a'' g'' g'' } g'' r
  }
>>
%%%

In theory the second note of the lower staff's triplet comes 1/3 of the
way through the 3rd note of the septuplet on the upper staff.  In
practice, nobody cares at all about that: performers wouldn't even give
it a passing thought except perhaps in an extremely slow tempo.  But
because Lilypond deems that the acciaccatura occurs at the same time as
the "main" note that follows it, it insists on a gap between the 3rd
and 4th notes of the septuplet which is at least as big as the printed
distance between the grace note and the main note.

This is clearly not what one expects to see in a well laid-out score. 
We would probably want other staves which have triplets to line up with
the triplet in the lower staff here, but the notes of the septuplet
should be evenly spaced over its total width.

What would be useful in these rare cases would be the ability to have
spacing calculated separately for different groups of staves.  In the
example, just for this one beat we need to tell Lilypond to work out
the spacing for all the staves apart from the one with the septuplet,
and separately to work out the spacing for the septuplet as if it were
part of a different score.  This would obviously have to be done at
least twice, because ultimately the total width of the 2 spacing
versions must be the same (probably the triplet's width would have to
be increased somewhat to match the septuplet's).  After this
troublesome section of a single beat's length, the whole score would
then be treated as a single entity for timing purposes as usual.

In the mean time, does anyone know of a way of getting the septuplet to
look right?

David


On Wed, 2019-05-15 at 16:45 +0100, David Sumbler wrote:
> %%
> \version "2.19.82"
> 
> \paper { line-width = 150\mm }
> #(set-global-staff-size 16)
> <<
>   {
> \new Staff \time 5/4
> r2 \tuplet 7/4 { g'16 a' b' c'' d'' e'' f'' } g''8 r r4 |
>   }
>   {
> \new Staff
> \tuplet 3/2 4 { 
>   \repeat unfold 3 {
> r8 \repeat unfold 3 { \acciaccatura a'' g'' } }
>   r8 \repeat unfold 2 { \acciaccatura a''8 g'' } }
> >> }
> %%
> 
> When the above is compiled, there is an unwanted gap between the 3rd
> and 4th septuplets in the upper staff.  This undoubtedly has
> something
> to do with the acciaccatura in the other staff.
> 
> (There are 10 other staves in the original passage this is taken
> from,
> some of which also have triplet quavers but not
> acciaccature.  Removing
> the one line with the grace-notes gives an evenly spaced septuplet.)
> 
> Is there any way of getting the septuplet evenly spaced?



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


Acciaccatura distoring spacing

2019-05-15 Thread David Sumbler
%%
\version "2.19.82"

\paper { line-width = 150\mm }
#(set-global-staff-size 16)
<<
  {
\new Staff \time 5/4
r2 \tuplet 7/4 { g'16 a' b' c'' d'' e'' f'' } g''8 r r4 |
  }
  {
\new Staff
\tuplet 3/2 4 { \repeat unfold 3 { r8 \repeat unfold 3 {
\acciaccatura a'' g'' } }
  r8 \repeat unfold 2 { \acciaccatura a''8 g'' } }
|
  }
>>
%%

When the above is compiled, there is an unwanted gap between the 3rd
and 4th septuplets in the upper staff.  This undoubtedly has something
to do with the acciaccatura in the other staff.

(There are 10 other staves in the original passage this is taken from,
some of which also have triplet quavers but not acciaccature.  Removing
the one line with the grace-notes gives an evenly spaced septuplet.)

Is there any way of getting the septuplet evenly spaced?

David


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


Re: Getting point-and-click working

2019-02-10 Thread David Sumbler
Thank you all for your help in this matter.

Today I have point-and-click working as it should, with AppArmor
apparently doing what it is supposed to do.

What made the difference was the following:

The Usage Manual 4.1.1 says that the lines
# For Textedit links
/usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
should be added to the file /etc/apparmor.d/local/usr.bin.evince . 
This file did not exist, although there are several other files in that
directory, so I had created the file and put just the two lines above
in it.  Unfortunately, as I reported, point-and-click didn't work for
me.

With the difficulties I was having, yesterday I disabled AppArmor for
Evince by adding a soft link to /etc/apparmor.d/usr.bin.evince in
/etc/apparmor.d/disable/ .  This is what made point-and-click work
eventually for me yesterday.

However, following your latest emails to the list on the topic, today I
thought I would have another go.  I deleted the disabling link, and ran
'sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince'
 again.  I also ran
'sudo apparmor_parser -r -T -W /etc/apparmor.d/local/usr.bin.evince'. 
I don't know whether that needed to be done or not, but I found that it
throws out a syntax error.

So I copied the lines out of the second file and inserted them into the
main usr.bin.evince file.  I then deleted
/etc/apparmor.d/local/usr.bin.evince .

After I ran 
'sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince'once more, I 
found that point-and-click works as it should.

I don't pretend to understand what is going on here, but in summary it appears 
that if the additional lines are added to /etc/apparmor.d/usr.bin.evince rather 
than to /etc/apparmor.d/local/usr.bin.evince it all works.

I should add that, in addition to the above, I have corrected the
ownership of ~/.local/share/applications/mimeapps.list.  (I don't know
how this came to be owned by root: I have looked at my bash history,
and I certainly had not run
'xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit'
with sudo.)

The point-and-click facility will be very useful to me now that I have
got to the point of correcting and tweaking a 150-page score and its
associated parts.  But without your helpful suggestions, I would never
have got it working, so thanks again.

David


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


Re: Getting point-and-click working

2019-02-10 Thread David Sumbler
On Sun, 2019-02-10 at 20:14 +1100, Andrew Bernard wrote:
> Hello All,
> 
> Didn't this come up in 2015 on the list here:
> 
> 
https://lists.gnu.org/archive/html/lilypond-user/2015-06/msg00168.html
> 
> Is it that the Ubuntu lilypond is broken (still)?
> 
> FWIW though, on my pristine Ubuntu 18.10, clicking the PDF just does
> nothing. nada. All works great on Debian 9.
> 
> 
> Andrew

The Ubuntu lilypond may well be broken for all I know, but my
difficulties with point-and-click do not relate to this.  I have never
used the version in the Ubuntu repository: I always download from the
Lilypond site.  I am currently running 2.19.82.

David


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


Re: Getting point-and-click working

2019-02-09 Thread David Sumbler
On Sat, 2019-02-09 at 11:05 +0100, Federico Bruni wrote:
> Il giorno ven 8 feb 2019 alle 18:16, David Sumbler <
> da...@aeolia.co.uk> 
> ha scritto:
> > I put off trying to get point-and-click for several years (!) until
> > now, because the instructions in the Usage Manual seemed rather
> > cryptic.  But point-and-click would be massively useful, so I
> > thought I would try to set it up.  I followed the instructions to
> > the best of my limited ability and, rather as I expected, it didn't
> > work for me.
> > 
> > I am running Ubuntu 18.04 with emacs 25.2. and the Unity desktop.
> 
> I don't think it's important if you are using Unity or Gnome 3. In
> both cases you should probably follow the instructions for GNOME 3 in
> the Usage manual.
> 
> > I have LYEDITOR set to "emacsclient --no-wait +%(line)s:%(column)s
> > %" file)s".
> > I don't have EDITOR set to anything at the moment.
> 
> The file variable is called incorrectly. I guess it's a typo in your 
> email?

Yes it was - apologies.  My LYEDITOR was correctly set to
emacsclient --no-wait +%(line)s:%(column)s %(file)s
as shown in the Usage Manual.

> Anyway, you don't need to use this long form, as the command should
> be already defined in lilypond source.
> You can check it with these commands:
> 
> [~]$ which lilypond-invoke-editor
> ~/.local/bin/lilypond-invoke-editor
> [~]$ grep emacs 
> .local/lilypond/usr/share/lilypond/current/scm/editor.scm
>  "emacs"
>   '(("emacs" .  "emacsclient --no-wait +%(line)s:%(column)s %(file)s
> || 
> (emacs +%(line)s:%(column)s %(file)s&)")
> 
> So you can use:
> 
> export LYEDITOR=emacs

My lilypond is a global install in /usr/local/ rather than ~/local/ -
perhaps this is what is causing the permissions error.  Apart from
that, the output of the 'grep emacs'... command is identical to yours.

I have therefore now changed LYEDITOR to 'emacs' to simplify things, as
you suggest.

> This is all I have to do to make it work on Fedora 29, GNOME 3.30.2.
> 
> I also have this line in ~/.emacs:
> 
> (server-start)
> 
> This is explained in current master Documentation. Unfortunately 
> LilyPond releases have been blocked for the last seven months so you 
> have to build it yourself or check the sources on Savannah.

At the moment I am issuing the server-start command in a running emacs.
But of course I shall add it to my .emacs file at some point.

 

> > Now when I start emacs, run the command server-start and then
> > issue 
> > the
> > command
> > 
> > gnome-open textedit:///etc/issue:1:0:0
> > 
> > the file /etc/issue does indeed open in emacs.  It contains the
> > single
> > line
> > 
> > Ubuntu 18.04.1 LTS \n \l
> > 
> > This seemed promising, to me.
> > 
> 
> So far so good.
> By the way, it opens once or twice? If you are using a LilyPond 
> installer released before October 2018 (today the answer is yes),
> you might get two windows. If you are using a version provided by
> your distro, you won't probably have this bug. See this PR:
> https://github.com/gperciva/gub/pull/48

It opens once.  I am using LilyPond 2.19.82 downloaded last August.

> > The PDF viewer I use is evince, so I added the lines
> > 
> > # For Textedit links
> > /usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
> > 
> > to the file /etc/apparmor.d/local/usr.bin.evince (which was
> > previously empty), and then ran
> > 
> > sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince
> > 
> > as instructed in the UM.
> > 
> > However, when I open a lilypond PDF file in evince and click on a 
> > note, I get an error message:
> > 
> > Unable to open external link.
> > Failed to execute child process “lilypond-invoke-editor” 
> > (Permission denied)
> > 
> > Yet I can run lilypond-invoke-editor from a command line without
> > any parameters, and I get the expected usage help.
> > 
> > Can anyone suggest what I have done wrong or omitted to do?
> 
> I never had this problem since Fedora doesn't use AppArmor (nor
> Debian, wich I used previously).
> Have you tried logging out the session or restarting?
> Or just restart apparmor:
> 
> sudo /etc/init.d/apparmor restart

No success, I'm sorry to say.

> If it doesn't help, try disabling AppArmor for Evince:
> 
https://askubuntu.com/questions/344834/evince-document-viewer-failed-to-execute-child-process-nemo-permission-deni

I tried all the suggestions on the 

Getting point-and-click working

2019-02-08 Thread David Sumbler
I put off trying to get point-and-click for several years (!) until
now, because the instructions in the Usage Manual seemed rather
cryptic.  But point-and-click would be massively useful, so I thought I
would try to set it up.  I followed the instructions to the best of my
limited ability and, rather as I expected, it didn't work for me.

I am running Ubuntu 18.04 with emacs 25.2. and the Unity desktop.

I have LYEDITOR set to "emacsclient --no-wait +%(line)s:%(column)s %" file)s".
I don't have EDITOR set to anything at the moment.

I couldn't seem to find whether I was running gnome 2 or 3, so I
carried out the steps documented for gnome 2, but running

gnome-open textedit:///etc/issue:1:0:0

produced an error saying that the URL could not be found.

So I tried the gnome 3 steps.  I created a file 
~/tmp/lilypond-invoke-editor.desktop
containing the material specified in the UM, i.e.:

[Desktop Entry]
Version=1.0
Name=lilypond-invoke-editor
GenericName=Textedit URI handler
Comment=URI handler for textedit:
Exec=lilypond-invoke-editor %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/textedit;
Categories=Editor
NoDisplay=true

I then executed:

xdg-desktop-menu install ./lilypond-invoke-editor.desktop
xdg-mime default lilypond-invoke-editor.desktop 
x-scheme-handler/textedit

Now when I start emacs, run the command server-start and then issue the
command

gnome-open textedit:///etc/issue:1:0:0

the file /etc/issue does indeed open in emacs.  It contains the single
line

Ubuntu 18.04.1 LTS \n \l

This seemed promising, to me.

The PDF viewer I use is evince, so I added the lines

# For Textedit links
/usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper,

to the file /etc/apparmor.d/local/usr.bin.evince (which was previously
empty), and then ran

sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince

as instructed in the UM.

However, when I open a lilypond PDF file in evince and click on a note,
I get an error message: 

Unable to open external link.
Failed to execute child process “lilypond-invoke-editor” (Permission 
denied)

Yet I can run lilypond-invoke-editor from a command line without any
parameters, and I get the expected usage help.

Can anyone suggest what I have done wrong or omitted to do?

David





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


Re: Forcing horizontal space between successive notes

2019-01-30 Thread David Sumbler
Wow!  Two lovely solutions to my little query - both much better and
neater than my adjusting the spacing of notes by using invisible
meaningless markups with \textLengthOn.

-Original Message-
From: Lukas-Fabian Moser 
Date: Tue, 29 Jan 2019 20:15:48 +0100
> > How can one force additional space between 2 successive musical
> > moments in a score, without affecting the spacing algorithm to the
> > left and right?
> 
> \version "2.19.82"
> 
> \new Staff {
><<
>  {
>\repeat unfold 100 c'16 }
> 
>{
>  % Force extension between 1st and 2nd quaver in bar 2
>  s1
>  \set Score.proportionalNotationDuration = #(ly:make-moment
> 1/100)
>  s8
>  \unset Score.proportionalNotationDuration
>}
>>>
> }

I like the way this automatically gives appropriate spacing to notes
and rests in the stretched section.

-Original Message-
From: Kieren MacMillan 
Date: Tue, 29 Jan 2019 16:12:53 -0500
> {
>   c'4 \tweak extra-spacing-width #'(0 . 4) 4 4 4
> }

And this method gives full control over the internal spacing if more
than one note/rest is involved.

I was not aware that extra-spacing-width could be used in this way.  I
note that the first (left) parameter doesn't seem to do very much, so
basically the second parameter adjusts the distance from the note to
the succeeding one.  Very neat!

Thanks, both, very much for these 2 solutions.

David 




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


Forcing horizontal space between successive notes

2019-01-29 Thread David Sumbler
I have various clunky workarounds for this problem, but I am still
wondering whether there isn't a neater way.

How can one force additional space between 2 successive musical moments
in a score, without affecting the spacing algorithm to the left and
right?  This is occasionally desirable, for instance to leave
horizontal space for some textual instruction or narration.

I have experimented with all sorts of parameters for various items such
as PaperColumn, VerticalAlignment, SpacingSpanner and others, but so
far without any success.

David


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


Re: Altering page numbers

2019-01-12 Thread David Sumbler

-Original Message-
From: Kieren MacMillan 
To: da...@aeolia.co.uk
CC: Lilypond-User Mailing List 
Subject: Re: Altering page numbers
Date: Sat, 12 Jan 2019 10:38:55 -0500

Hi David,

> Judging from all the searching I have done I think that the answer to
> the following question is "no": is there a way to override automatic
> page-numbering after the first page?

In the last fifteen years, I’ve learned never to bet against
Lilypond…  ;)

> I have several pages of introductory and performance notes in the
> score
> I am currently working on, followed by about 150 pages of score.  I
> should like to have the pages before the actual score numbered in
> lower
> case Roman numerals, followed by the score pages numbered in Arabic
> numerals starting at 1.  But I cannot find any way to do this.

Just in case you’re interested in my [not-just-Lilypond] workflow: I
find it easiest, best, and superior (in terms of output) to build the
front matter and end matter in LaTeX (with its own page numbering), and
then simply insert the Lilypond score (with its own page numbering) as
a PDF at the correct spot.

> Is there any way of achieving the result I want whilst keeping the
> whole book in one actual \book block and hence one output file?

Use multiple bookpart sections?  =)

Cheers,
Kieren.


Well, I tried that, but adding
  \paper { first-page-number = #1 }
inside or just before a \bookpart doesn't work.

David


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


Altering page numbers

2019-01-12 Thread David Sumbler
Judging from all the searching I have done I think that the answer to
the following question is "no": is there a way to override automatic
page-numbering after the first page?

I have several pages of introductory and performance notes in the score
I am currently working on, followed by about 150 pages of score.  I
should like to have the pages before the actual score numbered in lower
case Roman numerals, followed by the score pages numbered in Arabic
numerals starting at 1.  But I cannot find any way to do this.

At the moment it seems as if I have 2 alternatives: I can either leave
the introductory pages unnumbered and set first-page-number = #-7 (or
whatever value would give me page 1 on the first page of actual score);
or I can split the book into 2 separate files, one for the cover and
introduction and the other for the score itself.

Is there any way of achieving the result I want whilst keeping the
whole book in one actual \book block and hence one output file?

David


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


Re: Automatic narrowing in Emacs?

2019-01-02 Thread David Sumbler
-Original Message-
From: David Kastrup 
To: David Sumbler 
CC: lilypond-user@gnu.org
Subject: Re: Automatic narrowing in Emacs?
Date: Wed, 02 Jan 2019 15:14:29 +0100

David Sumbler  writes:

> I now realise that in these cases the buffer has been "narrowed".
> This is a useful feature of Emacs that I wasn't even aware of
> previously, and no doubt I shall start to use it intentionally in
> future.
> 
> But I find that a large buffer gets narrowed automatically when I am
> editing, even though I have not given a command for this.  Even if I
> then issue a 'widen' command (Ctrl-x n w) the buffer gets narrowed
> again after short while.

The key sequences for narrowing are _disabled_ by default as narrowing
is confusing.  If you haven't enabled them, this should not be an
issue.

Looking at LilyPond-mode, I see a few occurences of narrowing:

$ git grep narrow
lilypond-indent.el:  (narrow-to-region
lilypond-mode.el:  (narrow-to-region start end)
lilypond-song.el:  (narrow-to-region (or (mark) (point))
(point)))

Those are likely for purely programmatic reasons.  If you are plagued
here, you may want to review the respective Elisp passages to see if
the narrow-to-region sequences are reliably reversed (by being encapsulated in 
constructs that are guaranteed to restore the state of narrowing even when 
exited in error cases).

-Original Message-
From: Andrew Bernard 
To: lilypond-user Mailinglist 
Subject: Re: Automatic narrowing in Emacs?
Date: Wed, 2 Jan 2019 23:33:47 +1100

Hi David,

Never heard of this being automatic. Have you got a lot of
customisations in your emacs? What version are you running (not that I
think that makes any difference) and on what platform?

Weird. hard to imagine how you would have both set a mark and typed C-x 
n n inadvertently.

I always found lilypond mode a bit strange. I don't use it. Can't think
of any examples at the moment, but I understand it's a bit half baked,
isn't that so?

--

To answer Andrew first, I am running Emacs 25.2.2 in Ubuntu 18.04.  My
own customisations of Emacs are fairly normal and trivial (screen and
font colour etc.).

And David is quite right: if I type C-x n n I get told that narrowing
is disabled, and would have to choose to enable it.  I am pretty sure
that I am cannot be typing C-x n n SPC or C-x n n ! by accident.

In other words, my buffer is being narrowed even when the narrowing
commands themselves are disabled.  Pretty mysterious, eh?

I had already looked at those 3 mentions of narrowing in the Lilypond-
mode files.  From what I could see they wouldn't cause narrowing by
accident, although I am not capable of analysing the code to the extent
that David suggests in his final sentence.

As for Lilypond-mode being half-baked, I don't find that, although
there are a few anomalies, e.g. indenting after manual beams and
sometimes after slurs is a bit buggy.  (I don't think the characters
'()[]' should affect the indenting at all in pure Lilypond code, but
occasionally they do.)  And I add 'q' to the list of allowable note-
names in lilypond-words.el so that repeated chords don't stand out like
lighthouses in the text!

David


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


Automatic narrowing in Emacs?

2019-01-02 Thread David Sumbler
This may be slightly off-topic, but it concerns a problem I have
encountered in Emacs when editing Lilypond files and at no other time.

I always use Emacs for creating and editing my Lilypond files.  Some of
these get quite large.  When editing a very long file (typically over
2,000 lines) I have discovered occasionally that I have apparently
inadvertently deleted a chunk at the beginning of the file.

I got in a terrible mess a couple of times trying to restore this
missing chunk from earlier versions of the file, only to find
afterwards that the relevant portion was never missing at all: it was
simply not shown in the window.

I now realise that in these cases the buffer has been "narrowed".  This
is a useful feature of Emacs that I wasn't even aware of previously,
and no doubt I shall start to use it intentionally in future.

But I find that a large buffer gets narrowed automatically when I am
editing, even though I have not given a command for this.  Even if I
then issue a 'widen' command (Ctrl-x n w) the buffer gets narrowed
again after short while.

I can find no reference in the Emacs Manual to this automatic
behaviour, so I thought perhaps it was a feature of the Lilypond Emacs 
mode.  But having looked at the files in my
/usr/local/lilypond/usr/share/emacs/site-lisp/
directory, I cannot find anything relevant there either.

Can anyone explain why this odd behaviour is occurring?

David


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


Re: Whole measure rest in 9/4 time

2018-12-29 Thread David Sumbler

-Original Message-
From: Joseph Srednicki 
To: lilypond-user@gnu.org
Subject: Whole measure rest in 9/4 time
Date: Sat, 29 Dec 2018 22:57:19 + (UTC)

Hello:

I am working on an organ piece by Vierne that is in 9/4 time.

The whole measure rest in 9/4 time is much narrower that what appears
in standard Durand edition of the 24 Pièces en style libre.

How do I make the whole measure rest in 9/4 time appear as it does in
4/4 time?

See the tiny example below. Measure 1 shows a whole measure rest in 9/4
time, and Measure 2 shows a whole measure rest in 4/4 time?

How do I make the whole measure rest in Measure 1 appear like the whole
measure rest in Measure 2?

I read the documentation on whole measure rests and snippets. I also
searched the Lilypond email archive and Google, but an answer did not
jump out at time, unless I overlooked somethings.

Thank to anyone who can provide an answer.

Joe Srednicki

==

\version "2.19.82"

{
  \time 9/4

  R1*9/4 |

  \numericTimeSignature \time 4/4 R1 |
}

**

I asked a similar question earlier this year.  Here is your answer:

\version "2.19.82"

{
  \time 9/4
  \override MultiMeasureRest.usable-duration-logs = #'(0)
  R1*9/4 |

  \numericTimeSignature \time 4/4 R1 |
}

David


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


Re: Line-breaking with non-aligned barlines - again!

2018-12-11 Thread David Sumbler


-Original Message-
From: David Sumbler 
Reply-To: da...@aeolia.co.uk
To: Thomas Morley 
CC: lilypond-user 
Subject: Re: Line-breaking with non-aligned barlines - again!
Date: Mon, 10 Dec 2018 22:58:58 +

-Original Message-
From: Thomas Morley 
To: David Sumbler 
CC: lilypond-user 
Subject: Re: Line-breaking with non-aligned barlines - again!
Date: Mon, 10 Dec 2018 22:00:51 +0100

Well, you could try like below, but it has it's own short-comings:

\version "2.19.82"


\paper {
  ragged-right = ##f
}

harps = {
  \time 2/4
  \scaleDurations 8/11 {
b16[ b b b] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
  }
  \noBreak
  \override Staff.TimeSignature.stencil = ##f
  \time 3/8
  \scaleDurations 3/4 {
b16] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
  }
  \noBreak
  \time 5/8
  \scaleDurations 10/13 {
b16] b[ b b b] \bar "|" \noBreak  b[ b b b] b[ b b b]
  }
}

\score { \new Staff { \time 2/4 \repeat unfold 32 b16 } }

\score { \new Staff { \harps } }

\score {
  <<
\new Staff { \harps }
\new Staff {
  \time 2/4 b4 b |
  \time 3/8 b4 b8 |
  \time 5/8 b4 b b8 |
}
  >>
  \layout {
\context {
  \Score
  \remove "Timing_translator"
  \remove "Default_bar_line_engraver"
  %% !
  \override SpacingSpanner.strict-note-spacing = ##t
}
\context {
  \Staff
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
}
  }
}

I'm not really convinced, thus I didn't post this before...

Cheers,
  Harm


I was very excited when I saw the output of the above with its one
extra line.  Although the upper line looked slightly oddly spaced, it
would certainly be acceptable in the full score.

Unfortunately the real orchestral parts are considerably more
complicated than the line of crotchets and quavers I used in the
example, and the short-comings of strict-note-spacing became clear:
notes in the orchestra were actually being printed over the time
signatures.

I wondered what would happen if I removed SpacingSpanner from the Score
context and added it to Staff.  Then, just in the harpsichord part, I
could add 

\override Staff.SpacingSpanner.strict-note-spacing = ##t

at the relevant point.  Sure enough, the orchestra parts were correctly
lined up just as they normally would be; but unfortunately the
harpsichord part was also still spaced to conform with them, just as in
my original version.

But thanks for the suggestion - and it has also directed my attention
to some parts of the Lilypond "engine" that I didn't know about
previously.

David

-

Having slept on this, I came up with a new idea.  I have changed the
crotchets and quavers in the lower part of the example into
semiquavers, to illustrate the sort of problem that occurs in the
"orchestra" parts using strict-note-spacing.  Then I used
\scaleDurations to reposition things in that line too.  This is the
result:

\version "2.19.82"

\paper {
  ragged-right = ##f
}

harps = {
  \time 2/4
  \scaleDurations 8/11 {
b16[ b b b] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
 }
\noBreak
\override Staff.TimeSignature.stencil = ##f
\time 3/8
\scaleDurations 3/4 {
  b16] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
}
\noBreak
\time 5/8
\scaleDurations 10/13 {
  b16] b[ b b b] \bar "|" \noBreak  b[ b b b] b[ b b b]
  }
}

\score { \new Staff { \time 2/4 \repeat unfold 32 b16 } }

\score { \new Staff { \harps } }

\score {
  <<
\new Staff { \harps }
\new Staff {
  \time 2/4 \scaleDurations 11/12 { b16[ b b b] b[ b b }
b16*19/12]  |
  \time 3/8 \scaleDurations 8/9 { b16[ b b b b } b16*14/9] |
  \time 5/8 b16[ b b b b b] b[ b b b] |
}
  >>
  \layout {
\context {
  \Score
  \remove "Timing_translator"
  \remove "Default_bar_line_engraver"
  \override SpacingSpanner.strict-note-spacing = ##t
}
\context {
  \Staff
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
}
  }
}

This looks pretty good and the arithmetic is simple, although it could
be further tweaked to make it look even better.

This may well be the answer I need for my full score.  But now that you
have introduced me to "strict-note-spacing" etc., I am again wondering
whether there might perhaps be a way of getting Lilypond to make 2
separate calculations of spacing, one for the harpsichord and another
for the rest of the orchestra; or, in the case of my small example, one
for the top stave and one for the bottom.  Perhaps this can be done by
modifying the stavesFound variable, but I have little idea of how to go
about this.

David



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


Re: Line-breaking with non-aligned barlines - again!

2018-12-10 Thread David Sumbler


-Original Message-
From: Thomas Morley 
To: David Sumbler 
CC: lilypond-user 
Subject: Re: Line-breaking with non-aligned barlines - again!
Date: Mon, 10 Dec 2018 22:00:51 +0100

Am Mo., 10. Dez. 2018 um 18:25 Uhr schrieb David Sumbler <
da...@aeolia.co.uk>:
> 
> To recap:
> 
>3 days ago I wrote (with this subject line) that I have a passage
> to
>set where one instrument (harpsichord) plays 8 bars in 4/4 time,
>consisting mainly of semiquavers (sixteenths).  It has to be
> played
>in strict time at its own tempo (4 = 108), which is quicker than
> the
>rest of the orchestra is playing.
> 
>Although the harpsichord part must appear in the score, it is
>important that it is clear that it doesn't "fit" with the other
>instruments.  It starts at a common barline, but thereafter it
> does
>its own thing, so the positioning of the notes in the score is
>merely a suggestion of what is going on: in performance it won't
>necessarily fit precisely as it is shown in the score, but it is
> not
>expected to.
> 
>By using scaled durations etc. I can get roughly the effect I
> want.
>But is it spoiled by one thing: there is a 4/4 time signature in
> all
>instruments (including the harpsichord) at the beginning of the
>passage, but there are also a couple of further time changes in
> the
>orchestra only.  It is easy enough to prevent these from appearing
>in the harpsichord part; but because Lilypond synchronises
>everything vertically (just as one wants it to 99.99% of the time)
>it ruins the effect.  This is because there is a large gap between
>successive notes in the harpsichord to allow for the time
> signature
>displayed in all the other staves.
> 
> I have not had any suggestions as to how I might get Lilypond to set
> the harpsichord part without regard to the spacing on the other
> lines;
> this strongly suggests that, as I suspected, it can't be done!
> (Although if anyone knows otherwise, I'd be glad to hear about it.)

Well, you could try like below, but it has it's own short-comings:

\version "2.19.82"


\paper {
  ragged-right = ##f
}

harps = {
  \time 2/4
  \scaleDurations 8/11 {
b16[ b b b] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
  }
  \noBreak
  \override Staff.TimeSignature.stencil = ##f
  \time 3/8
  \scaleDurations 3/4 {
b16] b[ b b b] \bar "|" \noBreak b[ b b \bar ""
  }
  \noBreak
  \time 5/8
  \scaleDurations 10/13 {
b16] b[ b b b] \bar "|" \noBreak  b[ b b b] b[ b b b]
  }
}

\score { \new Staff { \time 2/4 \repeat unfold 32 b16 } }

\score { \new Staff { \harps } }

\score {
  <<
\new Staff { \harps }
\new Staff {
  \time 2/4 b4 b |
  \time 3/8 b4 b8 |
  \time 5/8 b4 b b8 |
}
  >>
  \layout {
\context {
  \Score
  \remove "Timing_translator"
  \remove "Default_bar_line_engraver"
  %% !
  \override SpacingSpanner.strict-note-spacing = ##t
}
\context {
  \Staff
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
}
  }
}

I'm not really convinced, thus I didn't post this before...

Cheers,
  Harm


I was very excited when I saw the output of the above with its one
extra line.  Although the upper line looked slightly oddly spaced, it
would certainly be acceptable in the full score.

Unfortunately the real orchestral parts are considerably more
complicated than the line of crotchets and quavers I used in the
example, and the short-comings of strict-note-spacing became clear:
notes in the orchestra were actually being printed over the time
signatures.

I wondered what would happen if I removed SpacingSpanner from the Score
context and added it to Staff.  Then, just in the harpsichord part, I
could add 

\override Staff.SpacingSpanner.strict-note-spacing = ##t

at the relevant point.  Sure enough, the orchestra parts were correctly
lined up just as they normally would be; but unfortunately the
harpsichord part was also still spaced to conform with them, just as in
my original version.

But thanks for the suggestion - and it has also directed my attention
to some parts of the Lilypond "engine" that I didn't know about
previously.

David


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


Line-breaking with non-aligned barlines - again!

2018-12-10 Thread David Sumbler
To recap:

   3 days ago I wrote (with this subject line) that I have a passage to
   set where one instrument (harpsichord) plays 8 bars in 4/4 time,
   consisting mainly of semiquavers (sixteenths).  It has to be played
   in strict time at its own tempo (4 = 108), which is quicker than the
   rest of the orchestra is playing.

   Although the harpsichord part must appear in the score, it is
   important that it is clear that it doesn't "fit" with the other
   instruments.  It starts at a common barline, but thereafter it does
   its own thing, so the positioning of the notes in the score is
   merely a suggestion of what is going on: in performance it won't
   necessarily fit precisely as it is shown in the score, but it is not
   expected to.

   By using scaled durations etc. I can get roughly the effect I want. 
   But is it spoiled by one thing: there is a 4/4 time signature in all
   instruments (including the harpsichord) at the beginning of the
   passage, but there are also a couple of further time changes in the
   orchestra only.  It is easy enough to prevent these from appearing
   in the harpsichord part; but because Lilypond synchronises
   everything vertically (just as one wants it to 99.99% of the time)
   it ruins the effect.  This is because there is a large gap between
   successive notes in the harpsichord to allow for the time signature
   displayed in all the other staves.

I have not had any suggestions as to how I might get Lilypond to set
the harpsichord part without regard to the spacing on the other lines;
this strongly suggests that, as I suspected, it can't be done! 
(Although if anyone knows otherwise, I'd be glad to hear about it.)

Meanwhile I have been trying another approach, which is to set the
harpsichord part on its own, with line breaks at appropriate points
(within bars) to suit the bar-end breaks in the orchestra score.  I
then save each line of this as a separate eps. file.  In the main score
I have a dummy stave above the string parts, and I attach the relevant
file to a dummy note using

  \once \override TextScript.extra-offset = #'(-10 . -6)
  a'1*2
  ^\markup \epsfile #X #120 "No16Harpsichord1.eps"

The actual values required are found by trial and error.

This promises to work, except for one problem.  For some reason that I
can't figure out, the spacing in the orchestra lines gets affected.  As
I increase the size of the image, the orchestra score either extends
into the right-hand page margin or expands horizontally to force one or
two bars on to the next page.  There doesn't seem to be any direct
relationship between where the right-hand edge of the image occurs and
the point in the music of the main score that lies immediately below
it.

I have tried using \textLengthOff, but this does not help.

Can somebody tell me what might be going on here, and perhaps how to
get around the problem?

David


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


Re: Line-breaking with non-aligned barlines - again!

2018-12-07 Thread David Sumbler


-Original Message-
From: Mark Stephen Mrotek 
To: da...@aeolia.co.uk, lilypond-user@gnu.org
Subject: RE: Line-breaking with non-aligned barlines - again!
Date: Fri, 7 Dec 2018 10:17:43 -0800

David,

How about marking the part "ad libitum?"
Or perhaps making it bar-less as in a cadenza?

Mark

*

Thanks for the suggestions, but they won't really do in this particular
case.  The harpsichord solo is very definitely not "ad libitum", but
must be in strict, quasi-mechanical time.  It is not in any way like a
cadenza and, since the 8 bars that it plays here are actually 2
repetitions of something it played earlier, suddenly to show them
without barlines would confuse matters rather than clarifying them.

David


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


Line-breaking with non-aligned barlines - again!

2018-12-07 Thread David Sumbler
A few weeks back I wrote asking about a problem with a passage where
one instrument is playing at a different speed from the rest, and with
barlines that do not align with those in the other instruments.

Now I have a similar passage, but it has thrown up another difficulty,
which I can't so far find a solution to.

In this passage, one instrument (harpsichord) plays 8 bars in 4/4 time,
consisting mainly of semiquavers (sixteenths).  It has to be played in
strict time at its own tempo (4 = 108) which is quicker than the rest
of the orchestra is playing.

Although the harpsichord part must appear in the score, it is important
that it is clear that it doesn't "fit" with the other instruments.  It
starts at a common barline, but thereafter it does its own thing, so
the positioning of the notes in the score is merely a suggestion of
what is going on: in performance it won't necessarily fit precisely as
it is shown in the score, and does not need to.

By using scaled durations etc. I can get roughly the effect I want. 
But is it spoiled by one thing: there is a 4/4 time signature in all
instruments (including the harpsichord) at the beginning of the
passage, but there are also a couple of further time changes in the
orchestra only.  It is easy enough to prevent these from appearing in
the harpsichord part; but because Lilypond is actually synchronising
things vertically (just as one wants it to 99.99% of the time) in this
case it ruins the effect.  There is a gap between successive notes in
the harpsichord to allow for the time signature displayed in all the
other staves.

I can illustrate the problem with the code below.

%
\version "2.19.82"

\paper {
  ragged-right = ##f }

harps = { \time 2/4
  \scaleDurations 8/11 { b16[ b b b] b[ b b b] \bar "|"
\noBreak b[ b b \bar"" }
  \noBreak
  \override Staff.TimeSignature.stencil = ##f
  \time 3/8
  \scaleDurations 3/4 { b16] b[ b b b] \bar "|" \noBreak b[ b b
\bar"" }
  \noBreak
  \time 5/8
  \scaleDurations 10/13 { b16] b[ b b b] \bar"|" \noBreak  b[ b b
b] b[ b b b] } }

\score {
  \new Staff {
\time 2/4 \repeat unfold 32 b16 } }

\score {
  \new Staff { \harps } }

\score {
  << \new Staff { \harps }
  \new Staff {
\time 2/4 b4 b |
\time 3/8 b4 b8 |
\time 5/8 b4 b b8 | }
   >>
  \layout {
\context { \Score
   \remove "Timing_translator"
   \remove "Default_bar_line_engraver"
 }
\context {
  \Staff
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
}
  }
}
%

I attach a png file of the output of the above code.

The first line of the output shows how I would like it to appear.  The
second line shows how it appears when I apply the scaled durations -
this also is entirely satisfactory: the slight differences in
positioning would be unnoticeable without the preceding line for
comparison.

The final version shows what happens when the "orchestra" lines are
added.  This is not satisfactory, because the distortions in the upper
line suggest that the notes in the upper line should be precisely
synchronised with the other line, which is not the case at all.  Of
course I can put a verbal instruction in the score (and the parts), but
it would be nice to illustrate this more clearly in the musical
notation.

Can anyone think of a way of getting Lilypond to space the harpsichord
line(s) over the width between margins on each page - or possibly from
barline to barline of the lower stave(s) if that is easier - without
regard to the detail of what is happening in those other staves?

The only approach I can think of at the moment is to treat the line of
harpsichord notes as a completely separate score from the rest, and
then somehow join them into one system with a vertical line at the
left.  This would make generating the score for this passage very
complicated, even if I knew how to do it!

Am hoping for Lilypond to do something which it can't possibly be made
to do?

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


Re: alist problem

2018-12-05 Thread David Sumbler


-Original Message-
From: David Kastrup 
To: David Sumbler 
CC: lilypond-user@gnu.org
Subject: Re: alist problem
Date: Wed, 05 Dec 2018 15:37:21 +0100

David Sumbler  writes:

> IR 2.19.82 shows the following amongst the settings for TrillSpanner:
> 
> bound-details (list):
> '((left (text # name)>
>   "scripts.trill")
> (Y . 0)
> (stencil-offset -0.5 . -1)
> (padding . 0.5)
> (attach-dir . 0))
>   (left-broken (end-on-note . #t))
>   (right (Y . 0)))
> 
> If I write
> 
> \override TrillSpanner.bound-details.left-broken = #'(end-on-note .
> #t)
> 
> Lilypond accepts it, suggesting that I am using the correct syntax.

You aren't.  You are putting a pair where an association list should
be.  This would need to be

\override TrillSpanner.bound-details.left-broken = #'((end-on-note .
#t))

to have the same effect.

> But if I write
> 
> \override TrillSpanner.bound-details.right = #'(Y . 0)
> 
> Lilypond produces:
> 
> ERROR: Wrong type argument in position 2 (expecting association
> list):
> (Y . 0)
> 
> I can't figure out why this is.  Can somebody please explain it to
> me,
> and show me the correct syntax?

(Y . 0) is a pair, not an association list.  To get the same effect,
you'd need to write

\override TrillSpanner.bound-details.right = #'((Y . 0))

or alternatively (assuming you want other right bound-details to stay)

\override TrillSpanner.bound-details.right.Y = 0

> (The reason for doing this was to try to shorten the extent of a
> trill
> spanner.  This may not be the correct parameter to change, which is
> why I was trying different values; but even if that is true, I would
> still like to know why my line produces an error.)

Because you cannot add or delete parens at will.  Note that
(right (Y . 0)) is a shorthand for (right . ((Y . 0))) .  It is easy to
overlook this when looking at a pair (like the key-value pair of an
association list) where the cdr is a list in itself.  In that case, the
Scheme printer elides the dot and one level of parens around the cdr,
simply because a list is indistinguishable from a dotted list where the
cdr is a list itself.



Now that you have explained it I feel that I should have been able to
work that out for myself.  But I'm afraid I didn't.

So thank you very much for sorting it out for me.

David


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


alist problem

2018-12-05 Thread David Sumbler
IR 2.19.82 shows the following amongst the settings for TrillSpanner:

bound-details (list):
'((left (text #
  "scripts.trill")
(Y . 0)
(stencil-offset -0.5 . -1)
(padding . 0.5)
(attach-dir . 0))
  (left-broken (end-on-note . #t))
  (right (Y . 0)))

If I write

\override TrillSpanner.bound-details.left-broken = #'(end-on-note . #t)

Lilypond accepts it, suggesting that I am using the correct syntax.

But if I write

\override TrillSpanner.bound-details.right = #'(Y . 0)

Lilypond produces:

ERROR: Wrong type argument in position 2 (expecting association list):
(Y . 0)

I can't figure out why this is.  Can somebody please explain it to me,
and show me the correct syntax?

(The reason for doing this was to try to shorten the extent of a trill
spanner.  This may not be the correct parameter to change, which is why
I was trying different values; but even if that is true, I would still
like to know why my line produces an error.)

David





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


Re: Not Nice Review of the LilyPond

2018-12-02 Thread David Sumbler


-Original Message-
From: msk...@ansuz.sooke.bc.ca
To: David Sumbler 
CC: David Kastrup , lilypond-user 
Subject: Re: Not Nice Review of the LilyPond
Date: Sun, 2 Dec 2018 14:17:11 -0500 (EST)

On Sun, 2 Dec 2018, David Sumbler wrote:
> > But MusiXTeX can do "if" statements.
> I felt that an "if" would be useful, so I eventually came up with:

That is useful for conditional includes, but it can't be embedded in
the
data structure that LilyPond calls "music" and stores in variables.  As
soon as something is turned into "music" it has to be data, not code;
conditionals must either be evaluated before the input is turned into
"music," or by separate code (usually, in Scheme rather than in
LilyPond
as such) that conditionally modifies the static "music."  That latter
approach, with tags in the "music" that can be filtered out, is what's
usually recommended as a substitute for real conditionals in LilyPond,
but
it's quite limiting compared to what programming languages can do with
"if."

For those familiar with programming languages it's not so mysterious
why
this situation comes about.  LilyPond takes care to call its variables
variables in the documentation.  You reference them; you don't execute
them.  They contain data, not code.  Obviously, data will be the same
every time you look at it, unless you externally change it.  But I wish
that without escaping to Scheme I could have something more like a
macro
than like a variable, evaluating its conditionals (and doing other
programming-language stuff) every time it is used.

*

Well, I'm not quite sure what you are after but this works:

%%%
\version "2.19.81"

#(define (iffable? x)
  (or (string-or-music? x) (markup? x) (ly:score? x) (ly:book? x)))

iff = #(define-scheme-function
( flag var )
( boolean? iffable? )
(if
 flag
 (if
  (string? var)
  (ly:parser-include-string var)
  var)))

partA = ##f

{ b4 b b b
  \iff \partA { g g g g }
  b1
}
%

Of course, that can be easily done with \tag; I just happen to like
\iff.  And the test need not be a single boolean: \iff (or var1 var2)
and other Scheme expressions will work too.

David


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


Re: Not Nice Review of the LilyPond

2018-12-02 Thread David Sumbler


-Original Message-
From: David Kastrup 
To: msk...@ansuz.sooke.bc.ca
CC: lilypond-user 
Subject: Re: Not Nice Review of the LilyPond
Date: Sun, 02 Dec 2018 17:00:33 +0100

msk...@ansuz.sooke.bc.ca writes:

> On Sun, 2 Dec 2018, David Kastrup wrote:
> > is hard.  At least LilyPond is a better starting point than
> > MusiXTeX.
> 
> But MusiXTeX can do "if" statements.

I have a hard time imagining how this is going to hold in a more
convincing manner than you could do it with LilyPond.

***

I felt that an "if" would be useful, so I eventually came up with:

#(define (iffable? x)
  (or (string-or-music? x) (markup? x) (ly:score? x) (ly:book? x)))

iff = #(define-scheme-function
( flag var )
( boolean? iffable? )
(if
 flag
 (if
  (string? var)
  (ly:parser-include-string var)
  var)))
  
I am sure that better programmers could do something far more elegant,
but this works for me.

Using this, I can control compilation using variables, with lines such
as:

\iff \Three "\include \"No3_score.ily\""

Instead of a string as in the example, markups, music etc. can also be
included as a result of a successful "iff" test.

I also made a \choice routine, which effectively gives an "else" result
if the test fails, but I have never actually felt any need to use it.

David



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


Re: Spacing issue after Mark and TextScript

2018-11-25 Thread David Sumbler


-Original Message-
From: Thomas Morley 
To: Phil Holmes 
CC: David Sumbler , Pedro Pessoa <
pedrops...@gmail.com>, lilypond-user 
Subject: Re: Spacing issue after Mark and TextScript
Date: Sun, 25 Nov 2018 17:38:31 +0100

Am So., 25. Nov. 2018 um 16:09 Uhr schrieb Phil Holmes <
m...@philholmes.net>:
> 
> - Original Message -----
> From: "David Sumbler" 
> 
> > The parameters NonMusicalPaperColumn and suchlike have long been a
> > mystery to me.  If it can be done reasonably succinctly, could you
> > perhaps explain what NonMusicalPaperColumn.keep-inside-line #'()
> > and
> > PaperColumn.keep-inside-line #'() actually do?
> > 
> > David
> 
> 
> The old NR says:
> 
> Checking to make sure that text scripts and lyrics are within the
> margins
> requires additional
> calculations. In cases where slightly faster performance is desired,
> use
> 
> \override Score.PaperColumn #'keep-inside-line = ##f
> 
> and
> 
> keep-inside-line (boolean)
> If set, this column cannot have objects sticking into the margin.
> 
> Hope that makes sense.
> 
> --
> Phil Holmes
> 

To illustrate what Phil wrote, compile the following code with and
without the relevant overrides:

\score {
  <<
{
  \repeat unfold 16 { c'4 \noBreak }
  \tempo "Allegro molto, ma non troppo"
  c'
  \repeat unfold 31 c'4
}
\new Lyrics \lyricmode {
  \repeat unfold 19 xy
  whateverlongtext
  \repeat unfold 28 xy
}
  >>
  \layout {
\context {
  \Score
  \override NonMusicalPaperColumn.keep-inside-line = #'()
  \override PaperColumn.keep-inside-line = #'()
}
  }
}


Though I think there's a bug somewhere.

Play around with the code below.
I made it so, that you only need to change one numeric value in the
function call, i.e. increase the 0.00 in \addScore #(+ 64.25 0.00)
As soon as 0.01 is chosen the StaffSymbol's extent is increased
although there's really no need for (larger numbers make it more
obvious).
I suspect the extents of TextScript and Mark are _added_, whereas one
should take the _maximum_ of both.
Maybe some confusing happens because TextScript is usually in
PaperColumn's elements whereas the others are in the
NonMusicalPaperColumn's elements, but here I'm really guessing...
Interestingly the value 64.25 is very close to half of the line-width
plus left/right-margin-_default_ (not the scaled left/right-margin).

But here the code for testing:

\version "2.19.82"


%% A boxed stencil with settable width, for Mark and TextScript
#(define (x-var-stil x)
  (box-stencil (ly:make-stencil '() (cons 0 x) '(-1 . 1)) 0 0))

%% A procedure to display StaffSymbol.stencil, line-width,
%% left- and right-margin
#(define print-staff-symbol-stil-length
  (lambda (staff-symbol)
   (format #t
"\n\tStaffSymbol.stencil has length: ~a
\tline-width is: ~a
\tleft-margin is: ~a
\trightmargin is: ~a\n"
 (interval-length
   (ly:stencil-extent (ly:staff-symbol::print staff-symbol) X))
 (ly:output-def-lookup (ly:grob-layout staff-symbol) 'line-width)
 (ly:output-def-lookup (ly:grob-layout staff-symbol) 'left-margin)
 (ly:output-def-lookup (ly:grob-layout staff-symbol) 'right-
margin

%% A void function adding a score to current book. The score has a
%% RehearsalMark and a TextScript. Those grobs stencil-width are set by
the
%% 'val'-argument.
addScore =
#(define-void-function (val)(number?)
(add-score
#{

\score {
  { \mark \default c'1 _"" \noBreak 1 1 }
  \layout {
  indent = 0
\context {
  \Score
  \omit BarNumber
  \override RehearsalMark.stencil = #(x-var-stil val)
  %\override NonMusicalPaperColumn.keep-inside-line = #'()
  %\override PaperColumn.keep-inside-line = #'()
}
\context {
  \Staff
  \override StaffSymbol.after-line-breaking =
#print-staff-symbol-stil-length
}
\context {
  \Voice
  \textLengthOn
  \override TextScript.stencil = #(x-var-stil val)
}
  }
}
#}))

\addScore #(+ 64.25 0.00)

Anyone with further insights?


Cheers,
  Harm

*

I have often wondered what the "Column" in PaperColumn etc. refers to. 
Now I understand that it refers to all the objects within a line of a
score.

The keep-inside-line parameter is a boolean, which defaults to #t.  But
I find myself somewhat confused.  In the above code, if the keep-
inside-line override is commented out, or if keep-inside-line is set to
##t (which is in any case the default), the staff extends beyond the
right-hand margin.  If keep-inside-line is set to ##f or #'(), the
staff conforms to the margins.  This is contrary to what one would
expect from NR 1.8.1, 2.1.2 and A18.  It is also the exa

Re: Spacing issue after Mark and TextScript

2018-11-25 Thread David Sumbler


-Original Message-
From: Thomas Morley 
To: David Sumbler 
CC: pedrops...@gmail.com, lilypond-user 
Subject: Re: Spacing issue after Mark and TextScript
Date: Sat, 24 Nov 2018 22:28:06 +0100

Am Fr., 23. Nov. 2018 um 15:28 Uhr schrieb David Sumbler <
da...@aeolia.co.uk>:
> 
> -Original Message-----
> From: David Sumbler 
> Reply
> -To: da...@aeolia.co.uk
> To: lilypond-user@gnu.org
> Subject: Spacing issue after Mark and TextScript
> Date: Wed, 21 Nov 2018 12:24:29 +
> 
> %%%
> \version "2.19.81"
> 
> #(set-global-staff-size 12)
> 
> indent = #0
> 
> { \textLengthOn
>   \time 5/4
>   r2 r4.
>   \override Score.RehearsalMark.self-alignment-X = #-1
>   \override Score.RehearsalMark.font-size = #5
>   \mark \markup {"After the thirty-third encore, the Emperor arose."}
>   \hide TextScript
>   r8\fermata_"m"
>   r4 |
> %%%  \noBreak
>   R4*5 | R4*5 | R4*5 |
> }
> %%%
> 
> When the above is compiled, the spacing for notes/rests after the
> Mark
> and TextScript is increased.  This becomes even more obvious if
> \noBreak is uncommented: the final crotchet rest of the first bar and
> the whole bar rest of the second now take up so much horizontal space
> that the line runs outside of the right-hand margin, as is shown in
> the
> attached image.  Meanwhile the rests at the start of the first bar
> are
> squashed together to make room for the unnecessary empty spaces later
> in the line.  Things are restored to normal after a line break.
> 
> If I remove either the RehearsalMark or the TextScript, the problem
> disappears.  The purpose of the textscript is to prevent the crotchet
> rest appearing before the "Mark" is finished.
> 
> I have used the same kind of structure in numerous other places in
> this
> piece without problems, and despite nearly a day of experimentation I
> can't see why this case behaves differently.  (There are reasons for
> presenting these texts as Marks rather than Text attached to a rest,
> but they are not relevant to the problem.)
> 
> Any suggestions?  Is there perhaps a way of resetting the spacing
> parameters to something sensible?
> 
> David
> 
> -Original Message-
> From: Pedro Pessoa 
> To: lilypond-user@gnu.org
> Subject: Re: Spacing issue after Mark and TextScript
> Date: Wed, 21 Nov 2018 09:26:42 -0700 (MST)
> 
> Hey David. Not sure if I got how you want it to be, but - with the
> \nobreak
> uncommented) - if you add tree more m's to the TextScript, it
> produces
> something which looks right. Don't know why.
> 
> Pessoa
> 
> mailing_Spacing_issue_after_Mark_and_TextScript.png
> <
> 
http://lilypond.1069038.n5.nabble.com/file/t5699/mailing_Spacing_issue_after_Mark_and_TextScript.png>
> ;
> 
> --
> 
> 
> True - it looks as if the spacing text (the ""-s) needs to be as
> far as possible exactly the same length as the TextScript.
> 
> But add even one more "m" and the right-hand end of the staff is
> again
> noticeably beyond the right margin.
> 
> And even with the "correct" number of "m"s, so that the end of the
> line
> appears in (roughly?) the right place, the rests at the beginning of
> the line are ridiculously compressed together.  The space give to the
> crotchet rest at the end of the bar is far greater than that allowed
> for the dotted crotchet earlier in the same bar.
> 
> Does anyone have any idea what is going on here?
> 
> David

I noticed with version 2.12.3 the output is as desired.

Then I identified the first commit which changes the behaviour. First
bad commit is:

commit 53db923e715126eb9463220526b4838fbfd3dad4
Author: Andrew Hawryluk 
Date:   Sat Jan 15 13:42:03 2011 -0700

Change keep-inside-line defaults to true.

As discussed in Issue #1470, the default should be changed so that
good layout with a slight performance hit is the default.

https://sourceforge.net/p/testlilyissues/issues/1470/
https://codereview.appspot.com/4243041/
Which is LilyPond-version 2.13.52


Tbh, I never noticed bad behaviour caused by this patch before.
I suspect something rotten is present elsewhere, though I've no clue
what it might be or where to look...


Nevertheless, you could revert the settings done by this patch globally
with:

\layout {
  \context {
\Score
\override NonMusicalPaperColumn.keep-inside-line = #'()
\override PaperColumn.keep-inside-line = #'()
  }
}

This may have some unwanted effects, though.
Less invasive would be:

#(set-global-staff-size 12)

indent = #0

{ \textLengthOn
  \time 5/4
  r2 r4.

  \overrideProperty 

Re: Spacing issue after Mark and TextScript

2018-11-23 Thread David Sumbler
-Original Message-
From: David Sumbler 
Reply
-To: da...@aeolia.co.uk
To: lilypond-user@gnu.org
Subject: Spacing issue after Mark and TextScript
Date: Wed, 21 Nov 2018 12:24:29 +

%%%
\version "2.19.81"

#(set-global-staff-size 12)

indent = #0

{ \textLengthOn
  \time 5/4
  r2 r4.
  \override Score.RehearsalMark.self-alignment-X = #-1
  \override Score.RehearsalMark.font-size = #5
  \mark \markup {"After the thirty-third encore, the Emperor arose."}
  \hide TextScript
  r8\fermata_"m"
  r4 |
%%%  \noBreak
  R4*5 | R4*5 | R4*5 |
}
%%%

When the above is compiled, the spacing for notes/rests after the Mark
and TextScript is increased.  This becomes even more obvious if
\noBreak is uncommented: the final crotchet rest of the first bar and
the whole bar rest of the second now take up so much horizontal space
that the line runs outside of the right-hand margin, as is shown in the
attached image.  Meanwhile the rests at the start of the first bar are
squashed together to make room for the unnecessary empty spaces later
in the line.  Things are restored to normal after a line break.

If I remove either the RehearsalMark or the TextScript, the problem
disappears.  The purpose of the textscript is to prevent the crotchet
rest appearing before the "Mark" is finished.

I have used the same kind of structure in numerous other places in this
piece without problems, and despite nearly a day of experimentation I
can't see why this case behaves differently.  (There are reasons for
presenting these texts as Marks rather than Text attached to a rest,
but they are not relevant to the problem.)

Any suggestions?  Is there perhaps a way of resetting the spacing
parameters to something sensible?

David

-Original Message-
From: Pedro Pessoa 
To: lilypond-user@gnu.org
Subject: Re: Spacing issue after Mark and TextScript
Date: Wed, 21 Nov 2018 09:26:42 -0700 (MST)

Hey David. Not sure if I got how you want it to be, but - with the
\nobreak
uncommented) - if you add tree more m's to the TextScript, it produces
something which looks right. Don't know why. 

Pessoa

mailing_Spacing_issue_after_Mark_and_TextScript.png
<
http://lilypond.1069038.n5.nabble.com/file/t5699/mailing_Spacing_issue_after_Mark_and_TextScript.png>
 
 
--


True - it looks as if the spacing text (the ""-s) needs to be as
far as possible exactly the same length as the TextScript.

But add even one more "m" and the right-hand end of the staff is again
noticeably beyond the right margin.

And even with the "correct" number of "m"s, so that the end of the line
appears in (roughly?) the right place, the rests at the beginning of
the line are ridiculously compressed together.  The space give to the
crotchet rest at the end of the bar is far greater than that allowed
for the dotted crotchet earlier in the same bar.

Does anyone have any idea what is going on here?

David



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


Spacing issue after Mark and TextScript

2018-11-21 Thread David Sumbler
%%%
\version "2.19.81"

#(set-global-staff-size 12)

indent = #0

{ \textLengthOn
  \time 5/4
  r2 r4.
  \override Score.RehearsalMark.self-alignment-X = #-1
  \override Score.RehearsalMark.font-size = #5
  \mark \markup {"After the thirty-third encore, the Emperor arose."}
  \hide TextScript
  r8\fermata_"m"
  r4 |
%%%  \noBreak
  R4*5 | R4*5 | R4*5 |
}
%%%

When the above is compiled, the spacing for notes/rests after the Mark
and TextScript is increased.  This becomes even more obvious if
\noBreak is uncommented: the final crotchet rest of the first bar and
the whole bar rest of the second now take up so much horizontal space
that the line runs outside of the right-hand margin, as is shown in the
attached image.  Meanwhile the rests at the start of the first bar are
squashed together to make room for the unnecessary empty spaces later
in the line.  Things are restored to normal after a line break.

If I remove either the RehearsalMark or the TextScript, the problem
disappears.  The purpose of the textscript is to prevent the crotchet
rest appearing before the "Mark" is finished.

I have used the same kind of structure in numerous other places in this
piece without problems, and despite nearly a day of experimentation I
can't see why this case behaves differently.  (There are reasons for
presenting these texts as Marks rather than Text attached to a rest,
but they are not relevant to the problem.)

Any suggestions?  Is there perhaps a way of resetting the spacing
parameters to something sensible?

David


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


Re: controlling the tie "gap" [and a possible bug?]

2018-11-16 Thread David Sumbler

-Original Message-
From: Kieren MacMillan 
To: David Kastrup 
CC: Lilypond-User Mailing List 
Subject: Re: controlling the tie "gap" [and a possible bug?]
Date: Fri, 16 Nov 2018 17:11:17 -0500

Hi David,
> No, it doesn't.  The image shows the same kind of symptomas the
> code does but is clearly from different code.

Hmmm… I just compiled it again, and it gave the same thing. Here’s a
screenshot from Frescobaldi with the code on the left and compiled
image on the right:



What am I saying that’s incorrect?

> > 1. Is the crossing of the ties a bug?
> Those are not ties but slurs.

Oops! Yes, sorry — I meant slurs.

> > 2. Regardless, is there a way I can make all ties to begin a little
> > bit further to the right and end a little further to the left of
> > the
> > centre of each notehead, so there is a gap between consecutive
> > ties?
> 
> Probably tweaking Slur.details will do it

It’s definitely been a long day (week? month??), and I’m currently ill
(strep throat)… I’ve been tweaking Tie.details to [obviously] no avail.
Will report back soon.

In the meantime, sorry for the noise.

Kieren.


This probably isn't helpful, but here are my thoughts on the subject.

I can't see that it this can really be regarded as a bug.  Ending one
slur and beginning another on the same note is not normal usage - in
fact, I don't really know what it is supposed to mean.  How does this
meaning differ from having a single slur over all 5 notes?  Will the
meaning be clear to whoever has to play the music?

In the normal case one wants slur to go at least to the vertical centre
of the notehead, probably a little further, and this is what Lilypond
does.  For a specialized case such as the example shown, the slurs can
of course be tweaked.

David




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


  1   2   3   4   >