Frescobaldi: missing menu bar FIXED

2024-05-15 Thread Graham King
I'd like to record a fix, of sorts, for a missing menu bar in
Frescobaldi under a rather specific combination of circumstances. It
might help someone. Possibly future-me!

I run Frescobaldi on an Ubuntu 22.04 system, with an Apple-Mac-OS-X-
like KDE theme that puts the menus of the currently-focussed
application at the top of the screen.

Following a recent upgrade to KDE Plasma 6, the menus in Frescobaldi
completely disappeared.

You can force the menu bar to appear at the top of the application
window for all apps. To do this, go to System Settings -> Session ->
Background services and uncheck "Application menus daemon"

It might be necessary to restart your session for this to take effect.

It might be possible to create a specific exception for Frescobaldi,
using the KWin rule editor, accessed by right-clicking on the title bar
of the Frescobaldi window and selecting More Actions.
Unfortunately I've been unable to find a specific combination of
settings that work.



Re: Spacing in mensural notation

2024-05-08 Thread Graham King
On Wed, 2024-05-08 at 09:40 +, Giles Boardman wrote:
> Hi Graham,
> 
> Copylist duly noted - I wasn't sure of etiquette.
> 
> There is nothing else to my script, so unless it's part of the
> "mensural" set up, there is no \paper { ragged-right = ##t } or any
> other related setting.

Sorry, I was unclear:  you are likely to _need_ ragged-right, otherwise
the right-justification of the staves will trump the tight spacing of
the mensural notation.
> 
> What I meant by the other remark was exactly what you did when you
> said "\break is your friend" - the documentation is excellent, once
> I've figured out what to look for, so the trick is to know what
> things are called. Using  \melisma is a case in point. I'm not
> familiar with the term so I didn't know to look for it and got to it
> because it's in a snippet I copied because I recognized the note
> shapes. So, telling me "read up about \blah" is really helpful. It's
> great to get a leg up but obviously I need to learn, in order to be
> self-sufficient. 

Everyone is recommended to read the Learning Manual of course.

> The sleuthing is fun too, but sometimes you just want the answer 

That's what we're all here for :)
> 
> Best
> 
> Giles
> 
> 
> From: Graham King 
> Sent: 08 May 2024 10:20
> To: Giles Boardman ; lilypond-
> u...@gnu.org 
> Subject: Re: Spacing in mensural notation
>  
> Hi Giles,
> please copy the list: it helps others, and you might get better
> advice than I can offer.
> 
> Thoughts interspersed below...
> 
> On Wed, 2024-05-08 at 07:56 +, Giles Boardman wrote:
> > Hello Graham,
> > 
> > This is perfect, except it only affects the last line. The lines
> > wrap and the rests are where they should be in relation to the rest
> > of the notes, but only the portion on the last line has been re-
> > spaced.
> 
> Do you have this line?
> \paper { ragged-right = ##t }
> > 
> It sounds like you might have ragged-last = ##t  set somewhere.
> 
> > I'm going to look at treating each line in the original as a new
> > piece of music. 
> 
> That sounds like a difficult way to set about things.  \break is your
> friend, once we've solved the problem above.
> 
> > Then I could mimic the original layout, which would be the best
> > solution for comparison anyway. So far I've mainly been working on
> > getting data into Lilypond so I can see whathappens ot it when I
> > stat to play around, so any suggestions as to how to go about this
> > and what to be looking for in the documentation would be most
> > welcome.
> 
> I'm not sure I understand what you're asking here.  For keeping
> changes under control, a revision control system such as git is
> invaluable.
> For searching the documentation, the index in the back of the
> Notation Reference (NR) is invaluable.  And the Snippets Repository
> athttps://lsr.di.unimi.it/LSR/ and the mailing list archive at
> https://lists.gnu.org/archive/html/lilypond-user/ can be very
> helpful.
> > 
> > Best
> > 
> > Giles
> 
> > 
> 



Re: Spacing in mensural notation

2024-05-08 Thread Graham King
Hi Giles,
please copy the list: it helps others, and you might get better advice
than I can offer.

Thoughts interspersed below...

On Wed, 2024-05-08 at 07:56 +, Giles Boardman wrote:
> Hello Graham,
> 
> This is perfect, except it only affects the last line. The lines wrap
> and the rests are where they should be in relation to the rest of the
> notes, but only the portion on the last line has been re-spaced.

Do you have this line?
\paper { ragged-right = ##t }
> 
It sounds like you might have ragged-last = ##t  set somewhere.

> I'm going to look at treating each line in the original as a new
> piece of music. 

That sounds like a difficult way to set about things.  \break is your
friend, once we've solved the problem above.

> Then I could mimic the original layout, which would be the best
> solution for comparison anyway. So far I've mainly been working on
> getting data into Lilypond so I can see whathappens ot it when I stat
> to play around, so any suggestions as to how to go about this and
> what to be looking for in the documentation would be most welcome.

I'm not sure I understand what you're asking here.  For keeping changes
under control, a revision control system such as git is invaluable.
For searching the documentation, the index in the back of the Notation
Reference (NR) is invaluable.  And the Snippets Repository
at https://lsr.di.unimi.it/LSR/ and the mailing list archive
at https://lists.gnu.org/archive/html/lilypond-user/ can be very
helpful.
> 
> Best
> 
> Giles

> 



Re: Spacing in mensural notation

2024-05-07 Thread Graham King
(copying the list, so that others can benefit/contribute)

Giles,
I played around with this some more, and got slightly better results by
setting
\override Score.SpacingSpanner.shortest-duration-space = #1


Another tip, which might be obvious: for proof-reading, I often play
the MIDI output and follow along, reading the original source.

-- Graham


On Tue, 2024-05-07 at 18:59 +, Giles Boardman wrote:
> Hello Graham,
> 
> I couldn't get any noticeable difference from the spanners, though,
> as a beginner, I'm quite pleased I was in the right ballpark at all!
> The other idea definitely has an effect but with two side effects -
> the lines no longer wrap and the rests are unaffected, so I need to
> become more proficient and then I can perhaps figure it out. My main
> aim is to have something easier to compare with the original for
> proof-reading, rather than to repoduce the pages, which are quite
> elegant and legible enough already.
> 
> Thanks for your help
> 
> Best
> 
> Giles
> 
> From: Graham King 
> Sent: 07 May 2024 14:19
> To: Giles Boardman ; lilypond-
> u...@gnu.org 
> Subject: Re: Spacing in mensural notation 
> I had a similar question a while back [1], which Harm kindly solved.
> Try something like this (it should work in older versions of
> lilypond):
> 
> %~~~
> \version "2.23.10"
> 
> 
> \header {
>   title = "Odhekaton"
>   composer = "Obrecht"
>   piece = "Alto"
> 
> }
> 
> \paper { ragged-right = ##t }
> 
> \score {
>   \new MensuralVoice = "alto" {
>     \clef "petrucci-c2"
>     \time 2/2
>     %\set Score.timing = ##f
> 
>     \override NoteHead.style = #'petrucci
>     % \override SpacingSpanner.base-shortest-duration = 
>   #(ly:make-moment 1/4)
>     % \override Score.SpacingSpanner.strict-note-spacing = ##t
>     \override Score.SpacingSpanner.spacing-increment = 1
>     \override Score.SpacingSpanner.base-shortest-duration = 
>   #(ly:make-moment -3)
>     \override Score.SpacingSpanner.common-shortest-duration = 
>   #(ly:make-moment 8)
> 
>     %% play around with below, probably useful are settings between 2
> and ~10
>     \override Score.SpacingSpanner.shortest-duration-space = #3
> 
>     \hide Score.BarNumber {
>   \cadenzaOn
>   d'\breve
>   c'\breve
>   \[ d'1\melisma f'1. \melismaEnd \]
> 
>   e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 
>   d'1 c'2 d'1. c'4 b4 c'\longa
>     }
>   }
> }
> 
> \layout { }
> %~~~
> 
> To my eye, the COP ligature is still taking too much space, but I
> hope
> this is a good start.
> 
> -- Graham
> 
> 
> [1]
> https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00454.html
> 
> On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> > Hello,
> > I am new to Lilypond, cutting my teeth on a couple of pretty simple
> > layouts - this exercise is to reproduce a page of a Petrucci
> > score.
> > 
> > 
> > I'm thrilled with this  
> > 
> > 
> > 
> > 
> >  but I would like to remove the space from around the notes and
> > bunch them up like in the original. I tried a couple of things I
> > found that looked relevant - they're commented out in my snippet -
> > and "\compressEmptyMeasures" but to no avail .
> > 
> > \version "2.18.2"
> > 
> > 
> > \header {
> >   title = "Odhekaton"
> >   composer = "Obrecht"
> >      piece = "Alto"
> > 
> >  }
> > 
> > \score {
> > 
> > <<
> >     \new MensuralVoice = "alto" {
> > \clef "petrucci-c2"
> > \time 2/2
> > 
> > \override NoteHead.style = #'petrucci
> > % \override SpacingSpanner.base-shortest-duration = #(ly:make-
> moment
> > 1/4)
> > % \override Score.SpacingSpanner.strict-note-spacing = ##t
> > \hide Score.BarNumber {
> > 
> > d'\breve
> > c'\breve
> > \[ d'1\melisma f'1. \melismaEnd \]
> > 
> > e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1.
> > c'4 b4 c'\longa
> > 
> >       }
> >     }
> >  
> >   >>
> > }
> >  
> >   \layout { }
> >   \midi { }
> > 
> > 
> > Any help, gratefully received.
> > 
> > By the way, I know it's not a Lilypond question, but if anyone can
> > tell me how to interpret "Verte"(?) that would be a help too.
> > 
> > Many thanks
> > 
> > Giles
> > 
> > PS I have a brand new installation on Windows 11 too if there is a
> > more recent feature required to make this work. All my other
> related
> > software is on this Windows 8.1 machine, so I use it for
> preference.
> > 
> > 
> > 
> > 
> > 
> > 
> 



Re: Spacing in mensural notation

2024-05-07 Thread Graham King
On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> By the way, I know it's not a Lilypond question, but if anyone can
> tell me how to interpret "Verte"(?) that would be a help too.

Sorry, I missed this part of your question.  It just means "turn (the
page)" - much like the modern "V.S."



Re: Spacing in mensural notation

2024-05-07 Thread Graham King
I had a similar question a while back [1], which Harm kindly solved.
Try something like this (it should work in older versions of lilypond):

%~~~
\version "2.23.10"


\header {
  title = "Odhekaton"
  composer = "Obrecht"
  piece = "Alto"

}

\paper { ragged-right = ##t }

\score {
  \new MensuralVoice = "alto" {
\clef "petrucci-c2"
\time 2/2
%\set Score.timing = ##f

\override NoteHead.style = #'petrucci
% \override SpacingSpanner.base-shortest-duration = 
  #(ly:make-moment 1/4)
% \override Score.SpacingSpanner.strict-note-spacing = ##t
\override Score.SpacingSpanner.spacing-increment = 1
\override Score.SpacingSpanner.base-shortest-duration = 
  #(ly:make-moment -3)
\override Score.SpacingSpanner.common-shortest-duration = 
  #(ly:make-moment 8)

%% play around with below, probably useful are settings between 2
and ~10
\override Score.SpacingSpanner.shortest-duration-space = #3

\hide Score.BarNumber {
  \cadenzaOn
  d'\breve
  c'\breve
  \[ d'1\melisma f'1. \melismaEnd \]

  e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 
  d'1 c'2 d'1. c'4 b4 c'\longa
}
  }
}

\layout { }
%~~~

To my eye, the COP ligature is still taking too much space, but I hope
this is a good start.

-- Graham


[1]
https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00454.html

On Tue, 2024-05-07 at 09:18 +, Giles Boardman wrote:
> Hello,
> I am new to Lilypond, cutting my teeth on a couple of pretty simple
> layouts - this exercise is to reproduce a page of a Petrucci
> score.
> 
> 
> I'm thrilled with this  
> 
> 
> 
> 
>  but I would like to remove the space from around the notes and
> bunch them up like in the original. I tried a couple of things I
> found that looked relevant - they're commented out in my snippet -
> and "\compressEmptyMeasures" but to no avail .
> 
> \version "2.18.2"
> 
> 
> \header {
>   title = "Odhekaton"
>   composer = "Obrecht"
>      piece = "Alto"
> 
>  }
> 
> \score {
> 
> <<
>     \new MensuralVoice = "alto" {
> \clef "petrucci-c2"
> \time 2/2
> 
> \override NoteHead.style = #'petrucci
> % \override SpacingSpanner.base-shortest-duration = #(ly:make-moment
> 1/4)
> % \override Score.SpacingSpanner.strict-note-spacing = ##t
> \hide Score.BarNumber {
> 
> d'\breve
> c'\breve
> \[ d'1\melisma f'1. \melismaEnd \]
> 
> e'2 d'1 c'1. d'2 e'1 f'2. e'4 f'4 g'4 a'1 g'4 f'4 e'2 d'1 c'2 d'1.
> c'4 b4 c'\longa
> 
>       }
>     }
>  
>   >>
> }
>  
>   \layout { }
>   \midi { }
> 
> 
> Any help, gratefully received.
> 
> By the way, I know it's not a Lilypond question, but if anyone can
> tell me how to interpret "Verte"(?) that would be a help too.
> 
> Many thanks
> 
> Giles
> 
> PS I have a brand new installation on Windows 11 too if there is a
> more recent feature required to make this work. All my other related
> software is on this Windows 8.1 machine, so I use it for preference.
> 
> 
> 
> 
> 
> 




Re: Frescobaldi?

2024-05-05 Thread Graham King
The technical stuff is way over my head, but this reads like the top-
level description of a GSOC project (in case the mentioned friend
doesn't take the bait)...

In other threads spawned by this one, there have been some helpful
suggestions for alternative lilypond IDE's, but there is some cost to
lilypond in fragmenting its user experience.  At the moment, we can
just say to new users "choose Frescobaldi; it's the best and most
popular IDE, and it's really easy to install" confident that any
questions that arise will likely be understood and answered readily.


On Sun, 2024-04-28 at 21:36 +0200, Jean Abou Samra wrote:
> > unfortunately, as I noted above, the problem seems to be that
> > frescobaldi
> > depends on a now-deprecated version of qtwebengine, and without
> > updating
> > it we'll eventually reach a point where it no longer runs. I looked
> > into
> > this because qtwebengine-5.15 failed to compile on my machine this
> > morning,
> > so I'm worried we're already approaching EOL on it. 
> 
> Note that we're talking about Qt as a whole, not just QtWebEngine
> which
> is just a small part of it (well, for some definition of "small"
> since it
> embeds Chromium's Web rendering engine…) that Frescobaldi only uses
> in a
> few places (IIRC, the SVG viewer and the documentation browser).
> 
> Qt 5 *is* already EOL upstream, since May 2023.
> 
> 
> > Jean: I have a colleague who does UI work and is "fairly" capable
> > of dealing
> > with python and Qt dependencies. Can you give me a brief (but as
> > technical
> > as it needs to be for a specialist to understand the issue) summary
> > of where
> > the sticking points are?
> 
> Frescobaldi uses the Poppler library in order to display PDF files.
> (It cannot
> use Qt's native PDF viewer based on Chromium, because that one is not
> powerful
> enough to support point-and-click.) Since Frescobaldi is written in
> Python and
> Poppler is a C++ library, it needs an FFI wrapper, which is called
> python-
> poppler-qt5 and written with a tool called sip that is developed by
> the
> creator and maintainer of PyQt itself and also used for PyQt.
> 
> Thus there is a diamond dependency:
> 
>    Qt5 --> Poppler  (C++)
>     |    |
>     |    |
>     |    |
>     v    v
>   PyQt5 -> python-poppler-qt5  (Python extension modules)
> 
> 
> python-poppler-qt5 is a little fiddly to build: it's multiple layers
> with sip generating C++ code and QMake project files, then QMake
> generating a Makefile and sip finally executing make on that
> Makefile.
> 
> On macOS, the platform favors distributing applications as .app
> bundles,
> which are optimized for being created by the native app development
> tools (Swift+XCode). These have a peculiar structure organized into
> "frameworks", with data files separated from code files, shared
> library
> lookup paths modified and that sort of thing (the specifics I do not
> know
> or remember). Of course, that doesn't play well with Python packages
> relying on a different structure, and Qt + PyQt also needing their
> file structure. In fact there are whole tools written just to deploy
> PyQt in a .app bundle, see pyqtdeploy.
> 
> Now throw python-poppler-qt5 into the mix, which needs to be loaded
> by
> Python and find its linked Poppler and Qt and PyQt, and you should
> start
> to understand the problem.
> 
> Basically, it's the Apple flavor of "things will work well but only
> if you do it my way with the non-cross-platform tools from my walled
> garden" in its full glory.
> 
> Add that macOS displays scary warnings to users if the app bundle
> hasn't been signed with a certificate that costs real money.
> Details are on
> https://github.com/frescobaldi/frescobaldi/issues/1584
> 
> Also add that the tool Frescobaldi has used so far to create app
> bundles, py2app, relies heavily on setuptools, which prevents
> Frescobaldi from moving to a more modern and less complicated
> build backend like hatchling.
> 
> Apart from these packaging issues, there's also an issue with
> the global menu (the one at the top of the screen on macOS, it
> doesn't appear on other platforms) which isn't really up-to-date
> and has been a source of crashes.
> 
> There are also miscellaneous bugs that only reproduce on macOS
> (they have the macOS label on GitHub) and it's not always easy
> to understand why.
> 
> Well, the explanation wasn't that brief. Sorry that I didn't have
> time to write a shorter one, as they say.
> 




Re: Question about \include options

2024-01-08 Thread Graham King
On Sun, 2024-01-07 at 21:14 -1000, John Helly wrote:
> Aloha.
> 
> In reading the documentation about \include
> (https://lilypond.org/doc/v2.24/Documentation/notation/including-lilypond-files
> ), I find the following sentence but can't find any explanation
> anywhere about what #f and #t are or do.  Can anyone enlighten me,
> please?  They seem to have something to do with the file system
> but...?

#f and #t are the boolean values "false" and "true", respectively.  In
other words, they are the mechanism by which you can turn relative-
includes off and on.
> 
> '... Complex file structures, that require to \include both files
> relative to the main directory and files relative to some other
> directory, may even be devised by setting relative-
> includes to #f or #t at appropriate places in the files. ...'
> 



Re: Running a system command from within Lilypond

2023-12-15 Thread Graham King
On Fri, 2023-12-15 at 12:45 +, Raphael Mankin wrote:
> Motivation:
> 
> I keep my Lilypond files in a git repository. I would like to 
> interpolate the repo's version number in the Lilypond output by
> running 
> a command like "git log|head -1". I can  do this from raw Scheme 
> using 
> the system() function, but this does not seem to work in Lilypond.
> 
> So, now the question:
> 
> How do I run a system command from within Lilypond? I realise that
> being 
> able to do so opens up a massive security hole, but that is not a 
> problem here.
> 
Here's what I do.  There will be some lines in here that are redundant
for your purposes.  And the code probably needs a cleanup for recent
versions (getting rid of "layout props" args), and for my cargo-cult
coding.  Apologies if email introduces errant linebreaks:

 filestats.ily ~
\version "2.25.0"

% from snippet 197:
#(define comml(object->string (command-line)))
#(define loc  (+ (string-rindex comml #\space ) 2)) 
#(define commllen (- (string-length comml) 2))
#(define filen(substring comml loc commllen))   %
filename
#(define siz  (object->string (stat:size (stat filen%
file size
#(define ver  (object->string (lilypond-version)))  %
Lilypond version
#(define dat  (strftime "%m/%d/%Y" (localtime (current-time %
Date processed
#(define tim  (strftime "%H:%M:%S" (localtime (current-time %
Time processed
#(define modt (stat:mtime (stat filen)))%
Last modified
#(define modts(strftime "%d %b %Y %H:%M:%S" (localtime modt)))  %
Command line


% gitver and gitrev (from
http://lilypondblog.org/2014/01/why-use-version-control-for-engraving-scores/#more-2151
)
#(use-modules (ice-9 popen))
#(use-modules (ice-9 rdelim))

% NOTE: This function only reads the first line of the command!
#(define (strsystem_internal cmd)
   (let* ((port (open-input-pipe cmd))
  (str (read-line port)))
 (close-pipe port)
 str))

#(define-markup-command (strsystem layout props cmd) (markup?)
   (interpret-markup layout props
 (strsystem_internal cmd)))

%gitver = \markup { \strsystem  "/usr/bin/git log --oneline " \filen "
| wc -l" }
gitrev = \markup { \strsystem "/usr/bin/git rev-parse --short HEAD" }



Then in my source file:
 some-music.ly ~
\include "filestats.ily"

\header {
  tagline = \markup{
\center-column{
  \line { "Version control for this edition: gitrev " \gitrev " "
\modts 


HTH
-- Graham



Re: Lilypond for interactive learning

2023-11-11 Thread Graham King
ly2video might be what you're looking for.
https://github.com/aspiers/ly2video
Check out some of the video examples there.

-- Graham


On Fri, 2023-11-10 at 19:50 -0600, Grace Elaine Brown wrote:
> Hi Lilypond team!
> 
> I have a question about using Lilypond. Is it possible to create a
> scrolling singalong type embed on my website using this?
> 
> For example, I'm trying to teach a student how to read the sheet
> music for "Adoro te devote." They press play and I sync the chant
> audio with a lighting up note.
> 
> I suppose an advanced level of this would include the ability to
> pause and click on the note for a pitch reference.
> 
> Godspeed!
> 
> Grace Brown
> Graceful | a Catholic Blog
> 
> e. grace.elaine.br...@gmail.com
> w. GracefulCatholic.com



Re: WARNING: SPAM / MALWARE being sent to list members

2023-10-23 Thread Graham King
I've just received a similar email, purporting to be from Michael
Werner in response to my recent posting on the list, but actually from
a bogus email address.  

It seems that lilypond-user is being targetted by emails of the form:

   From: Well Known lilypond user 
   To: Your Own address used on lilypond-user 
   Subject: Re: subject-of-some-thread-you-posted-to
   
   Check document:  
   
   Hi 
   >
   > Your posting to the list quoted here
   >

Note that lilypond-user@gnu.org is **not** included in the addressees.

Be careful out there folks.









Re: markup on ambitus?

2023-10-21 Thread Graham King
Thanks Michael, that looks very promising.  (And I would not have
thought of using the Balloon engraver)

-- Graham


markup on ambitus?

2023-10-21 Thread Graham King
In the following MWE, is it possible to put a small markup above each
ambitus to signify the voice to which the ambitus belongs?

I'm just failing to see where to attach ^\markup { foo }

%
\version "2.25.9"

\new Staff <<
  \new Voice = "c_Instr" \with { \consists "Ambitus_engraver" }
\relative { c' d e f }
  \new Voice = "c_Singer" \with { \consists "Ambitus_engraver" }
\relative { \override Ambitus.X-offset = #2.5
s1 a'4 b c d }
>>
%

-- Graham



Re: ****SPAM:5.7**** Re: skip of defined length in lyrics?

2023-10-20 Thread Graham King
David,
thanks for this.  I had abandoned the melismaBusy method, as it was
throwing up all sorts of artefacts (blank bars and partially-blank
bars, etc.) when applied in a polyphonic setting.  And the fixes for
parts starting with rests were beginning to make the source file rather
incomprehensible.

So, I had in fact adopted precisely the solution you suggest (but I was
aiming to get to the end of the current project before confessing it to
the list, in case it too proved to be a dead end for any other reason).

So far, it is looking good, and the source file is semantically- and
structurally- clear.

-- Graham

On Tue, 2023-10-17 at 09:44 -0500, David Wright wrote:
> On Sun 15 Oct 2023 at 15:07:52 (+0100), Graham King wrote:
> > Note to self, since this thread has risen to the status of
> > documentation for me:  Valentin's method is sensitive to slurs in
> > the
> > instrumental line (I suspect that the end of a slur is equivalent
> > to
> > \unset melismaBusy), so some adjustment may be necessary.
>   [ … … ]
> > It also, understandably, gives weird results if applied immediately
> > after a rest, so this does not work:
>   [ … … ]
> 
> It strikes me that trying to keep the notes in one continuous voice
> is what makes things complicated, judging by the snippets you've
> posted. Why not just put the verse and full sections in separate
> voices, and combine them on the staff. I've massacred a bit of Boyce
> as an example, attached.
> 
> If I needed MIDI files, I would separate each and every section
> (ie, the two voice sections in this fragment), so that they could
> all be concatenated in the right order for the MIDI.
> 
> Cheers,
> David.




Re: skip of defined length in lyrics?

2023-10-15 Thread Graham King
Note to self, since this thread has risen to the status of
documentation for me:  Valentin's method is sensitive to slurs in the
instrumental line (I suspect that the end of a slur is equivalent to
\unset melismaBusy), so some adjustment may be necessary.

% ~~
notes = {
  R1
  4 4( 4 4)
  \after 4 \set melismaBusy = ##t
  \after 1*2 \unset melismaBusy
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  "" "" ""
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~

It also, understandably, gives weird results if applied immediately
after a rest, so this does not work:

% ~~
notes = {
  R1
  \after 4 \set melismaBusy = ##t
  \after 1*2 \unset melismaBusy
  4 4( 4 4)
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  "" "" ""
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~




Re: skip of defined length in lyrics?

2023-10-14 Thread Graham King
On Sat, 2023-10-14 at 17:04 +0200, Valentin Petzel wrote:
> Hello Graham,
> 
> there are multiple ways to solve the problem and having different
> voice 
> contexts for different lyrics is surely one of the better ways to
> handle it. 
> You can it do cleaner like this:
> 
> % ~~
> instrumental =
> #(define-music-function (m) (ly:music?)
>    #{ \context Voice = "instrumental" $m #})
> 
> notes = {
>   \instrumental \repeat unfold 8 c'4
>   \repeat unfold 8 d'4
> }
> 
> words = \lyricmode { 
>    one two three four 
> }
> 
> <<
>   \new Voice = "cantor" \notes
>   \new Lyrics \lyricsto cantor { \words } 
> > > 
> 
> % ~~
> 
> The issue with this is that this will cause trouble with engravers
> sitting at 
> the voice level, so things like slurs and ties between these sections
> will 
> fail.

And in the real-life example (five parts, each with three
verse...chorus sections) I was getting into all sorts of self-inflicted
trouble with many instantiated Voices, and lyrics no longer attaching
to the correct voice.  I was even starting to read up on "Keeping
contexts alive" -- desperate measures by my standards!

> 
> One other way that does not have this issue would be to have the
> Lyric 
> engraver believe that the instrumental notes are part of a melisma,
> which 
> leads to the engraver ignoring them:
> 
> % ~~
> notes = {
>   \set melismaBusy = ##t
>   \after 1*2 \unset melismaBusy
>   \repeat unfold 12 c'4
> }
> 
> words = \lyricmode { 
>   one two three four 
> }
> 
> <<
>   \new Voice = "cantor" \notes
>   \new Lyrics \lyricsto cantor { \words } 
> > > 
> % ~~
> 
> If you have lyrics before this it would be wise to only do this after
> the first 
> instrumental note and add a single "" to the Lyrics to avoid it
> extending a 
> previous melisma, so instead of
> 
> % ~~
> notes = {
>   4 4( 4 4)
>   \set melismaBusy = ##t
>   \after 1*2 \unset melismaBusy
>   \repeat unfold 12 c'4
> }
> 
> words = \lyricmode { 
>   first text __
>   one two three four 
> }
> 
> <<
>   \new Voice = "cantor" \notes
>   \new Lyrics \lyricsto cantor { \words } 
> > > 
> % ~~
> 
> you’d get
> 
> % ~~
> notes = {
>   4 4( 4 4)
>   \after 4 \set melismaBusy = ##t
>   \after 1*2 \unset melismaBusy
>   \repeat unfold 12 c'4
> }
> 
> words = \lyricmode { 
>   first text __
>   ""
>   one two three four 
> }
> 
> <<
>   \new Voice = "cantor" \notes
>   \new Lyrics \lyricsto cantor { \words } 
> > > 
> % ~~
> 
> Cheers,
> Valentin

This is _very_ helpful.  Thanks!  I can now preserve a structure in my
file, that better reflects the musical structure of the piece.

I'm trying to alias the use of melismaBusy, to help avert my future
confusion over the semantic overloading of melismas, so ...

% ~~
% =
% comments... explanation ... ref. to lilypond-user ... attribution.
suppressLyrics = \after 4 \set melismaBusy = ##t \etc 
% ... not sure why \etc is needed there.
reenableLyrics = \unset melismaBusy
% =

notes = {
  4 4( 4 4)
  \suppressLyrics
  \after 1*2 \reenableLyrics
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  first text __
  "" % extra syllable (see \suppressLyrics)
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~





Re: skip of defined length in lyrics?

2023-10-13 Thread Graham King
On Fri, 2023-10-13 at 17:52 +0200, David Kastrup wrote:

> You can just use \skip \music but you have to forego rhythmic
> alignment
> using \lyricsto .

Thanks David.  That confirms what I feared.




Re: skip of defined length in lyrics?

2023-10-13 Thread Graham King
On Fri, 2023-10-13 at 16:01 +0100, Graham King wrote:
> I'm setting a verse anthem, in which certain voices are instrument-
> only
> until the chorus, at which point they are doubled by singers.
> 
> How can I include a skip of defined duration in the lyrics?  \skip
> counts notes or syllables, but I'd like to count breves and minims,
> to
> avoid the lyrics-alignment containing a magic number that is
> sensitive
> to subsequent editing of the preceding music.
> 
> I've seen a reference somewhere to #skip-of-length but can't find any
> documentation.
> 
> % ~~
> \version "2.25.7"
> 
> notes = { \repeat unfold 12 c'4 }
> 
> words = \lyricmode { 
>   \repeat unfold 2 { \skip 1 }  % Lyrics to start at bar 3.
>   one two three four 
> }
> 
> { << \new Voice = "cantor" \notes
>  \new Lyrics \lyricsto cantor { \words } 
>   >>
> }
> % ~~
> 
> Grateful, as ever, for your insights.
> -- Graham
> 

I might have a solution, but I'm a bit wary of unforeseen consequences:

% ~~
\version "2.25.7"

notes = { \repeat unfold 8 c'4 }
morenotes = { \repeat unfold 8 d'4 }

words = \lyricmode { 
   one two three four 
}

{ \notes
  << \new Voice = "cantor" \morenotes
 \new Lyrics \lyricsto cantor { \words } 
  >>
}
% ~~

Better advice always welcome; otherwise, sorry for the noise.



skip of defined length in lyrics?

2023-10-13 Thread Graham King
I'm setting a verse anthem, in which certain voices are instrument-only
until the chorus, at which point they are doubled by singers.

How can I include a skip of defined duration in the lyrics?  \skip
counts notes or syllables, but I'd like to count breves and minims, to
avoid the lyrics-alignment containing a magic number that is sensitive
to subsequent editing of the preceding music.

I've seen a reference somewhere to #skip-of-length but can't find any
documentation.

% ~~
\version "2.25.7"

notes = { \repeat unfold 12 c'4 }

words = \lyricmode { 
  \repeat unfold 2 { \skip 1 }  % Lyrics to start at bar 3.
  one two three four 
}

{ << \new Voice = "cantor" \notes
 \new Lyrics \lyricsto cantor { \words } 
  >>
}
% ~~

Grateful, as ever, for your insights.
-- Graham



Re: Scheme used badly: syntax problem

2023-09-16 Thread Graham King
Many thanks David!

(In the course of trying to convert the \note syntax, I discovered the
existence of \note-by-number which solved 90% of my problem.  Sorry for
the confusing reference to \note.)

On Sun, 2023-09-17 at 00:38 +0200, David Kastrup wrote:
> Graham King  writes:
> 
> > I'm trying to convert a naive Scheme function which has been broken
> > by
> > the new syntax for \note.  Some arithmetic gives me the index (in
> > this
> > MNWE, 96) to a list  of pairs, foo, from which I want to extract
> > some
> > markup.
> > 
> > The 300-LOC problem seems to boil down to this:
> > 
> > %~~~
> > \version "2.25.7"
> > 
> > #(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#})))
> > 
> > { c'1^\markup {#(cdr (assoc 96 foo))} }
> > %~~~
> > 
> > Please could a kind Scheme expert point out the stupid and obvious
> > mistake that has eluded me for several evenings?
> 
> Uh, there isn't even \note in there?
> 
> The problem in the above is a quoting problem: you mustn't quote
> #{...#}, and you can avoid quoting it using quasiquote and unquote:
> 
> \version "2.25.7"
> 
> #(define foo `((96 . ,#{ \markup { \note-by-number #1 #0 #UP }#})))
> 
> { c'1^\markup {#(cdr (assoc 96 foo))} }
> 




Scheme used badly: syntax problem

2023-09-16 Thread Graham King
I'm trying to convert a naive Scheme function which has been broken by
the new syntax for \note.  Some arithmetic gives me the index (in this
MNWE, 96) to a list  of pairs, foo, from which I want to extract some
markup.

The 300-LOC problem seems to boil down to this:

%~~~
\version "2.25.7"

#(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#})))

{ c'1^\markup {#(cdr (assoc 96 foo))} }
%~~~

Please could a kind Scheme expert point out the stupid and obvious
mistake that has eluded me for several evenings?

Thanks in anticipation!
-- Graham




Re: [BUG] WORG example for ob-lilypond is no longer working as described

2023-07-16 Thread Graham King
I'm late to this thread, and I might be missing some crucial aspect of the 
problem, but if you just want to integrate lilypond scores and fragments into a 
LaTeX document, and you're able to choose to use Luatex, the lyluatex and 
lilyglyphs packages work beautifully with the latest Lilypond versions.


I can supply a shortish example if you wish, but I'd rather do that off-list 
(i) in case it is not helpful to you, and (ii) to avoid cluttering the lists.

-- Graham



Re: Bug in Completion_heads_engraver ?

2023-05-21 Thread Graham King
Sorry! sent that reply from an address that was not subscribed to the list.  
Re-sending.
> On 21 May 2023, at 14:53, Graham King ... wrote:
> 
> Thanks Jean, both for the solution and for the education.
> 
>> On 21 May 2023, at 13:58, Jean Abou Samra  wrote:
>> 
>> 
>> Le dimanche 21 mai 2023 à 12:09 +0100, Graham King a écrit :
>> 
>>> In the following code, I would expect the tie between the final two notes 
>>> to be dotted.  The actual output is a solid tie.  Not sure whether this is 
>>> a bug or just my doing something wrong...
>>> 
>>> \version "2.25.0"
>>> 
>>> { c''2
>>>   \once \tieDotted
>>>   \set melismaBusyProperties = #'()
>>>   1 ~ 2
>>> }
>>> 
>>> \layout {
>>>   \context {
>>> \Voice
>>> \remove "Note_heads_engraver"
>>> \consists "Completion_heads_engraver"
>>>   }
>>> }
>>> I can work around this pretty easily, but I'd rather preserve the note 
>>> durations of the original mensural notation if possible.
>>> 
>> That the second tie is not dotted is perfectly normal since \once makes a 
>> command apply only at the current moment, and that tie starts later.
>> 
> I feared that this might be the case.  I'll have to be much more circumspect 
> when using the Completion_heads_engraver, in case a change of barline 
> distribution triggers this unexpectedly.
>> What is more surprising is that the first tie is not dotted; this is harder 
>> to explain simply, it's caused by shenanigans in the internals of 
>> Completion_heads_engrver (it creates ties “retroactively”, later than when 
>> they start).
>> 
>> Try
>> 
>> \version "2.24.1"
>> 
>> { c''2
>>   \once \override Tie.color = red
>>   \set melismaBusyProperties = #'()
>>   1 \single \tieDotted ~ 2
>> }
>> 
>> \layout {
>>   \context {
>> \Voice
>> \remove "Note_heads_engraver"
>> \consists "Completion_heads_engraver"
>>   }
>> }
> That works!  I didn't know about \single (and I hadn't thought of using a 
> tweak).  I might convert all my dotted-tie instances to this mechanism, to 
> avoid the impression that the decisions of the Completion_heads_engraver are 
> changing the semantics of the .ly file.



Re: Bug in Completion_heads_engraver ?

2023-05-21 Thread Graham King
Thanks Jean, both for the solution and for the education.

> On 21 May 2023, at 13:58, Jean Abou Samra  wrote:
> 
> 
>> 
>> Le dimanche 21 mai 2023 à 12:09 +0100, Graham King a écrit :
>> 
>> In the following code, I would expect the tie between the final two notes to 
>> be dotted.  The actual output is a solid tie.  Not sure whether this is a 
>> bug or just my doing something wrong...
>> 
>> \version "2.25.0"
>> 
>> { c''2
>>   \once \tieDotted
>>   \set melismaBusyProperties = #'()
>>   1 ~ 2
>> }
>> 
>> \layout {
>>   \context {
>> \Voice
>> \remove "Note_heads_engraver"
>> \consists "Completion_heads_engraver"
>>   }
>> }
>> I can work around this pretty easily, but I'd rather preserve the note 
>> durations of the original mensural notation if possible.
>> 
> That the second tie is not dotted is perfectly normal since \once makes a 
> command apply only at the current moment, and that tie starts later.
> 
I feared that this might be the case.  I'll have to be much more circumspect 
when using the Completion_heads_engraver, in case a change of barline 
distribution triggers this unexpectedly.
> What is more surprising is that the first tie is not dotted; this is harder 
> to explain simply, it's caused by shenanigans in the internals of 
> Completion_heads_engrver (it creates ties “retroactively”, later than when 
> they start).
> 
> Try
> 
> \version "2.24.1"
> 
> { c''2
>   \once \override Tie.color = red
>   \set melismaBusyProperties = #'()
>   1 \single \tieDotted ~ 2
> }
> 
> \layout {
>   \context {
> \Voice
> \remove "Note_heads_engraver"
> \consists "Completion_heads_engraver"
>   }
> }
That works!  I didn't know about \single (and I hadn't thought of using a 
tweak).  I might convert all my dotted-tie instances to this mechanism, to 
avoid the impression that the decisions of the Completion_heads_engraver are 
changing the semantics of the .ly file.

Bug in Completion_heads_engraver ?

2023-05-21 Thread Graham King
In the following code, I would expect the tie between the final two notes to be 
dotted.  The actual output is a solid tie.  Not sure whether this is a bug or 
just my doing something wrong...

\version "2.25.0"

{ c''2
  \once \tieDotted
  \set melismaBusyProperties = #'()
  1 ~ 2
}

\layout {
  \context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
  }
}

I can work around this pretty easily, but I'd rather preserve the note 
durations of the original mensural notation if possible.

-- Graham


Seeking something that looks like a dotted tie...

2023-05-14 Thread Graham King
I'm setting a song with multiple verses, one of which starts with a syllable 
spanning two notes.  I'd like a dotted tie in the score, but how best to 
achieve that?

\version "2.25.0"

notes = \repeat volta 2 { d'2 d'2 e'2. 4 }
words = \lyricmode {
  << { Lo -- rem ip -- sum }
 \new Lyrics {
   \set associatedVoice = "notes"
   do _ -- lo -- rit
 }
  >>
}

\score { <<
  \new Voice="sungNotes" \notes
  \new Lyrics \lyricsto sungNotes { \words }
>> }

~~~

1.  If I use a tie, the alignment of the words for the other verses gets messed 
up:

  notes = \repeat volta 2 { \tieDotted d'2 ~ d'2 e'2. 4 }

2.  If I use a tie + explicit durations in the lyrics, I have to continue 
entering them for the entire piece.  I can't just do:

   Lo2 -- rem2 ip -- sum

and leave lilypond to work out the rest of the durations for the lyrics.

3.  If I try to fake it with a dotted phrasing slur, it works but looks ugly 
(and is semantically questionable):

  notes = \repeat volta 2 { \phrasingSlurDotted d'2\( d'2\) e'2. 4 }

So, what have I missed?  Suggestions gratefully received!

-- Graham


Re: mensural ligature

2023-04-20 Thread Graham King


> On 20 Apr 2023, at 16:50, Graham King  wrote:
> 
> 
> Yes, definitely semibreve-semibreve.  An upstem to the left unambiguously 
> denotes a c.o.p. ligature (cum opposite proprietate).  This takes precedence 
> over the other rules for parsing ligatures, including the one that says that 
> "everything from the second note to the penultimate note is a breve unless 
> otherwise notated".  
And the one that would otherwise apply here: "final note in ascending position 
is a breve unless otherwise notated."
> 
>>> On 20 Apr 2023, at 14:11, Phil Holmes  wrote:
>>> 
>> 
>> Willi Apel's book on polyphonic music says (p91) "An ascending tail to the 
>> left of the initial note makes that note and the following one a S each".  
>> So it looks like the original was actually semibreve-semibreve, whatever the 
>> writer intended.
>> 
>> Phil Holmes
>> 
>> On 20/04/2023 13:38, Johannes Roeßler wrote:
>>> Hi Group,
>>> 
>>> how can I create this ligature?
>>> 
>>> 
>>> it should be Semibreve-Breve
>>> 
>>> but
>>> 
>>> \[ a1 h\breve \] 
>>> 
>>> but lilypond states "Semibreve must be followed by another one" 
>>> 
>>> Any idea?
>>> 
>>> Best regards
>>> Johannes
>>> 
>>> 
>>> 
>>> 
>>> 


Re: mensural ligature

2023-04-20 Thread Graham King
Yes, definitely semibreve-semibreve.  An upstem to the left unambiguously 
denotes a c.o.p. ligature (cum opposite proprietate).  This takes precedence 
over the other rules for parsing ligatures, including the one that says that 
"everything from the second note to the penultimate note is a breve unless 
otherwise notated".

> On 20 Apr 2023, at 14:11, Phil Holmes  wrote:
> 
> 
> Willi Apel's book on polyphonic music says (p91) "An ascending tail to the 
> left of the initial note makes that note and the following one a S each".  So 
> it looks like the original was actually semibreve-semibreve, whatever the 
> writer intended.
> 
> Phil Holmes
> 
> On 20/04/2023 13:38, Johannes Roeßler wrote:
>> Hi Group,
>> 
>> how can I create this ligature?
>> 
>> 
>> 
>> it should be Semibreve-Breve
>> 
>> but
>> 
>> \[ a1 h\breve \] 
>> 
>> but lilypond states "Semibreve must be followed by another one" 
>> 
>> Any idea?
>> 
>> Best regards
>> Johannes
>> 
>> 
>> 
>> 
>> 


Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King
Thanks William, that's very useful.

and thanks to everyone who has helped out tonight.  The lilypond community is 
truly a great advert for our species.

-- Graham

> On 17 Jan 2023, at 21:27, William Rehwinkel  
> wrote:
> 
> Dear Graham,
> 
> This can actually be solved with layers. You can configure which glyphs will 
> be drawn after each other, so that the whiteout does not infringe on them. 
> You could do a little bit like the following:
> 
> -William
> 
> \version "2.24.0"
> 
> \new PianoStaff <<
>  \new Staff \with {
>  } { s1 s1 }
>  \new Staff \with {
>  } { r4 r4 r4 r8 c''8^[ c''8] c8^[ c'] }
> >>
> 
> \layout {
>  \context {
>\Staff
>\omit BarLine
>\override Beam.whiteout-style = #'outline
>\override Beam.whiteout = #2
>\override Beam.layer = #-1
>%\override Stem.layer = #2
>  }
>  \context {
>\Score
>    \override SpanBar.layer = #-2
>  }
> }
> 
> 
>> On 1/17/23 16:08, Graham King wrote:
>>> On 2023-01-17 20:52, Graham King wrote:
>>> On 2023-01-17 20:06, Lukas-Fabian Moser wrote:
>>>> Hi,
>>>> 
>>>>>>> As a secondary question: Is there a straightforward way to avoid 
>>>>>>> collisions of mensurstriche with beams?
>>>>>> 
>>>>>> Do you have an example?
>>>>> Here's an extract from the de Wert, that illustrates the "problem" 
>>>>> (lilypond 2.25.0):
>>>> 
>>>> The way I see it, this would be a case for just accepting the crossing
>>>> and maybe making it look nice using whiteout.
>>>> 
>>>> Lukas
>>> 
>>> Thanks Lukas,
>>> 
>>>   \once \override Beam.whiteout-style = #'outline
>>>   \once \override Beam.whiteout = #2
>>> 
>>> works for me.  And I'm celebrating my first successful foray into the
>>> Internals Reference :)
>> Ah well, I got happy too quickly.  This override causes the stems to 
>> separate from the beams.
>> And it interferes with some staff-lines.
>> Never mind; I'll live with the collisions.
> 
> -- 
> + -- +
> |William Rehwinkel - Oberlin College and |
> |   Conservatory '24 |
> |  will...@williamrehwinkel.net  |
> | PGP key:   |
> | https://williamrehwinkel.net/static/pubkey.txt |
> + -- +




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King

On 2023-01-17 20:52, Graham King wrote:

On 2023-01-17 20:06, Lukas-Fabian Moser wrote:

Hi,

As a secondary question: Is there a straightforward way to avoid 
collisions of mensurstriche with beams?


Do you have an example?
Here's an extract from the de Wert, that illustrates the "problem" 
(lilypond 2.25.0):


The way I see it, this would be a case for just accepting the crossing
and maybe making it look nice using whiteout.

Lukas


Thanks Lukas,

  \once \override Beam.whiteout-style = #'outline
  \once \override Beam.whiteout = #2

works for me.  And I'm celebrating my first successful foray into the
Internals Reference :)


Ah well, I got happy too quickly.  This override causes the stems to 
separate from the beams.

And it interferes with some staff-lines.
Never mind; I'll live with the collisions.



Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King

On 2023-01-17 20:06, Lukas-Fabian Moser wrote:

Hi,

As a secondary question: Is there a straightforward way to avoid 
collisions of mensurstriche with beams?


Do you have an example?
Here's an extract from the de Wert, that illustrates the "problem" 
(lilypond 2.25.0):


The way I see it, this would be a case for just accepting the crossing
and maybe making it look nice using whiteout.

Lukas


Thanks Lukas,

  \once \override Beam.whiteout-style = #'outline
  \once \override Beam.whiteout = #2

works for me.  And I'm celebrating my first successful foray into the 
Internals Reference :)




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King


> On 17 Jan 2023, at 17:56, Jean Abou Samra  wrote:
> 
> Le 17/01/2023 à 18:31, Graham King a écrit :
>> I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam" 
>> which has an extended stretto section with dotted rhythms across barlines.  
>> For this, Harm's Mensurstriche example in the Learning Manual produces a 
>> mostly beautiful result.
>> 
>> However, for the sake of those singers who, faced with this passage, find 
>> themselves  all at sea, I would like to avoid notes extending across 
>> line-breaks.  The idea is to use something like the 
>> Completion_heads_engraver that would take effect only at those barlines that 
>> coincide with a line break.  Does such a thing exist?
> 
> 
> 
> I am afraid this would be exceedingly difficult technically.
> Engravers run way earlier than line breaking, so the only
> option would be to let the engraver create both notations
> (with notes straddling over bar lines and with tied notes),
> and remove one of them later, but there is a lot of code in
> between that is not prepared for ignoring the collisions
> that will unavoidably ensue, it would have consequences on
> horizontal spacing, etc.

OK, that makes sense.  It's certainly not worth a lot of software development 
effort.
> 
> Also, I have to say I would find it confusing as a performer.
> In your shoes, I'd go either for modern notation with ties, or
> for ancient notation, but not a mixture of both.
> 
> 
>> As a secondary question: Is there a straightforward way to avoid collisions 
>> of mensurstriche with beams?
> 
> 
> Do you have an example?

Here's an extract from the de Wert, that illustrates the "problem" (lilypond 
2.25.0):

I'm not really sure what best practice is here; it might be that these 
collisions are just to be expected?  (I can certainly live with them).  If you 
would like an MWE with code, that'll take me a little while to prepare.  
(Probably not tonight).  Or I could just send you the .ly file (25kB).

-- Graham

> 
> Regards,
> Jean
> 


Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King
I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam" 
which has an extended stretto section with dotted rhythms across barlines.  For 
this, Harm's Mensurstriche example in the Learning Manual produces a mostly 
beautiful result.

However, for the sake of those singers who, faced with this passage, find 
themselves  all at sea, I would like to avoid notes extending across 
line-breaks.  The idea is to use something like the Completion_heads_engraver 
that would take effect only at those barlines that coincide with a line break.  
Does such a thing exist?

As a secondary question: Is there a straightforward way to avoid collisions of 
mensurstriche with beams?


Re: Old scheme code not working in lilypond 2.25.0

2023-01-15 Thread Graham King



> On 15 Jan 2023, at 23:30, Jean Abou Samra  wrote:
> 
> Le 16/01/2023 à 00:21, Graham King a écrit :
>> 
>> My first steps into recent versions of lilypond are ruthlessly exposing my 
>> ignorant copy-&-paste approach to scheme...
>> 
>> I'm pretty sure that the following code worked fine under lilypond 2.18, but 
>> throws errors under 2.25.0:
>>  
> 
> 
> 
> That does not look like it has anything to do with recent LilyPond versions.
> For me, it works. Most likely, LilyPond is not in the right directory
> when the file is compiled. For example, if you work under Frescobaldi,
> you must save such a file before compiling it, otherwise Frescobaldi
> will save it somewhere in /tmp and compile it from there.

Doh!  I'm ashamed to say that you've hit the nail on the head.  Getting late 
here, and I must stop doing embarrassing things like this in a hurry!

Many thanks
-- G



Old scheme code not working in lilypond 2.25.0

2023-01-15 Thread Graham King
My first steps into recent versions of lilypond are ruthlessly exposing 
my ignorant copy-&-paste approach to scheme...


I'm pretty sure that the following code worked fine under lilypond 2.18, 
but throws errors under 2.25.0:


\version "2.25.0"

% gitver and gitrev (from 
http://lilypondblog.org/2014/01/why-use-version-control-for-engraving-scores/#more-2151 
)

#(use-modules (ice-9 popen))
#(use-modules (ice-9 rdelim))

% NOTE: This function only reads the first line of the command!
#(define (strsystem_internal cmd)
(let* ((port (open-input-pipe cmd))
(str (read-line port)))
(close-pipe port)
str))

#(define-markup-command (strsystem layout props cmd) (markup?)
(interpret-markup layout props
(strsystem_internal cmd)))

gitrev = \markup { \strsystem "/usr/bin/git rev-parse --short HEAD" }

\header {
tagline = \markup{
\line { "Version control for this edition: gitrev " \gitrev }

{ c'}

Under 2.25.0 I get:

Preprocessing graphical objects...

Finding the ideal number of pages...fatal: not a git repository (or any 
of the parent directories): .git


programming error: Trying to interpret a non-markup object: #

despite being able to show at the command line that the .ly file really 
does live in a git repo.


I've tried looking at the usual stuff (guile manual, google) but without 
profit.  Presumably the code above needs tweaking for guile 2, but I 
could really use some help, even if it's only a pointer to a 
convert-guile utility (by analogy with convert-ly).

Re: Obscure error message from 2.25.0

2023-01-15 Thread Graham King

On 2023-01-15 19:30, Jean Abou Samra wrote:

Le 15/01/2023 à 20:20, Graham King a écrit :
I've just run convert-ly on a 600+ line file and its \include files, 
from 2.19.40 to 2.25.0.  Nothing seemed to change apart from the 
\version statement, but on trying to compile the file, I get:


Processing `/tmp/ly'
Parsing...ERROR: In procedure %resolve-variable:
Unbound variable: %
Exited with return code 1.

Does this point to an obvious problem?




You probably tried to use LilyPond comment syntax in a Scheme function.
Scheme comments start with ';' not '%'.


[snip]

Thanks Jean, you nailed the problem.



Obscure error message from 2.25.0

2023-01-15 Thread Graham King
I've just run convert-ly on a 600+ line file and its \include files, from 
2.19.40 to 2.25.0.  Nothing seemed to change apart from the \version statement, 
but on trying to compile the file, I get:

Processing `/tmp/ly'
Parsing...ERROR: In procedure %resolve-variable:
Unbound variable: %
Exited with return code 1.

Does this point to an obvious problem?
Before I start laboriously bisecting the file, is there a way to get an error 
message that points to one or more lines of code in the file?

Grateful for any help

-- Graham


Re: lyLuaTex (solved)

2022-11-24 Thread Graham King


> On 24 Nov 2022, at 04:16, David Bellows  wrote:
> 
> I'm running some fairly recent version of Ubuntu but instead of
> installing TeX from the repository I install TeXLive from here:
> https://www.tug.org/texlive/
> This way I can also keep all the packages much more up to date than
> what Ubuntu does. Even after all these years, we're all still better
> off installing TeXLive directly instead of through the repositories.

Thanks, there appears to be a strong consensus amongst the experts that this is 
the way to go.  Note to future-me: Do as David suggests.

> 
> I ran your code (without the pathname for lyluatex since it is part of
> TeXLive) with the command:
> lualatex --shell-escape example.tex
> and it compiled just fine without any errors. I didn't have to install
> anything extra, I just keep TeXLive current and everything works.
> 
> I use emacs but compile the code from the command line.

Getting things working from the command line is definitely easier.  There were 
a couple more hoops to jump through if you want a more Frescobaldi-like 
experience, and I recorded them for completeness.

-- 
Graham


lyLuaTex (solved)

2022-11-23 Thread Graham King
(with apologies for the digression on a previous thread[1])

 
I have now succeeded in getting lyLuaTex[2][3] working, and this posting seems 
as good a place as any to record the steps, in case anyone else might find it 
helpful.  This is a summary of a moderately painful learning curve, full of 
interruptions and blind alleys, so I hope I've captured the result properly 
(modulo any spurious linebreaks introduced in the email chain)...
 
My environment:
Ubuntu Linux 18.04
Lilypond 2.23.10 (I think this procedure should work for more up-to-date 
versions)
Texlive packages from Ubuntu (of which most are almost certainly unnecessary 
for this purpose, but never mind): texlive-base, texlive-binaries, 
texlive-extra-utils, texlive-font-utils, texlive-fonts-recommended, 
texlive-lang-english, texlive-latex-base, texlive-latex-extra, 
texlive-latex-recommended, texlive-luatex, texlive-music, texlive-pictures, 
texlive-plain-generic, texlive-pstricks.
Editor: TeXstudio 2.12.6  (my choice; yours may differ)
Install some luaTex extension packages:
mkdir -p ~/texmf/tex/latex
cd ~/texmf/tex/latex
git clone https://github.com/lualatex-tools/luaoptions 

git clone https://github.com/jperon/luatex-tools 

texhash ~/texmf 

Create a wrapper script to suppress TeXstudio complaints about $TERM [4]:
cat > ~/bin/lualatex-wrapper <<-EOF

#! /bin/bash

# Don't indent the previous line!

# Wrapper script for luatex invoked from TeXstudio. 

TERM=dumb /usr/bin/lualatex "$@"
EOF

chmod 755 ~/bin/lualatex-wrapper 

In TeXstudio, select :

In the commands tab:

LuaLaTeX: /home/yourusername/bin/lualatex-wrapper -synctex=1 
-interaction=nonstopmode -shell-escape %.tex

Note that the -shell-escape option opens a security hole if you are going to 
compile latex docs from dodgy sources.  I don't judge ;)

In the build tab:

Default compiler: txs:///lualatex

 

 
Now we should be ready to compile a fairly minimal example document:
\documentclass{article}

% Adjust the program path to match your installation:

\usepackage[program=/usr/local/lilypond/lilypond-2.23.10/bin/lilypond]{lyluatex}

\begin{document}
Here is an example:

\begin{ly}
{a' b' c''}
\addlyrics{a -- b -- c}
\end{ly}

And here is a fragment, \lilypond{\new RhythmicStaff { \time 3/4 c4( c16) c c c 
c c c c \bar "|."}} inserted inline.

\end{document}

(Remember to use  if you want to see the updated PDF)

 HTH.  Grateful thanks to all the contributors listed at [2].

-- Graham
 
 
References:
[1] https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00403.html 
 
[2] https://github.com/jperon/lyluatex  
[3] https://mirror.ox.ac.uk/sites/ctan.org/support/lyluatex/lyluatex.pdf 

[4] 
https://htmlpreview.github.io/?https://github.com/texstudio-org/texstudio/master/utilities/manual/usermanual_en.html#configuring-the-latex-related-commands
 

Re: Future of OpenLilyLib

2022-11-23 Thread Graham King
Thanks Jean and Federico.  I'll open a new thread on lyLuaTex, to avoid 
hijacking this one.

-- Graham

> On 23 Nov 2022, at 16:59, Federico Bruni  wrote:
> 
> In order to run lyluatex with recent versions of lilypond (2.23.x), you must 
> install the most recent version of lyluatex. In other words, you should 
> install Texlive standalone and not the texlive packaged by distros.
> 
> See this discussion:
> https://github.com/jperon/lyluatex/issues/287
> 
> 
> Il giorno mer 23 nov 2022 alle 17:55:34 +0100, Jean Abou Samra 
>  ha scritto:
>> Le 23/11/2022 à 16:31, Graham King a écrit :
>>> I've tried to get Scholarly working in the past, but failed.  I'm currently 
>>> failing to get lyluatex working.
>>> There are some really promising tools in OpenLilyLib, but they seem to 
>>> require someone with Urs' level of focus and intellect to use them.  This 
>>> thread is raising my hopes once more.
>> I'd suggest you open a new thread about lyLuaTeX, with details
>> of your problems getting it to run.
>> (Note that lyLuaTeX isn't part of openLilyLib.)
>> Best,
>> Jean
> 
> 




Re: Future of OpenLilyLib

2022-11-23 Thread Graham King


> On 22 Nov 2022, at 09:31, Mark Knoop  wrote:
> 
> Thanks to all for your responses. There seems to be a general agreement
> about the desired direction but I'd still like to hear who is actually
> using this code at the moment. Is it just Kieren and me?

I've tried to get Scholarly working in the past, but failed.  I'm currently 
failing to get lyluatex working.

There are some really promising tools in OpenLilyLib, but they seem to require 
someone with Urs' level of focus and intellect to use them.  This thread is 
raising my hopes once more.


Re: Frescobaldi incantation for lilypond docker image?

2022-07-13 Thread Graham King
Jean, Knute,
many thanks!
It Just Worked (TM).  No dependency-hell.  Most refreshing (although I do feel 
a bit stupid).

> On 13 Jul 2022, at 17:02, Jean Abou Samra  wrote:
> 
>> 2.  If I'm barking up the wrong tree entirely, what is the recommended way 
>> for Frescobaldi to run lilypond at a more recent version than the distro 
>> supplies?
>> 
> 
> 
> There is no need for Docker at all! All versions of LilyPond have always 
> supported being installed in parallel without conflicting. Furthermore, 
> recent versions (2.23.6 and later) are static binaries. They don't even need 
> installation, they can just be unpacked and run.




Frescobaldi incantation for lilypond docker image?

2022-07-13 Thread Graham King

I'm looking for a way to run a recent lilypond version on Ubuntu 18.04.

Currently, I have a docker image[1] of lilypond 2.23.10 that I can 
invoke successfully from the command line, using:


docker run -v $(pwd):/app -w /app jeandeaual/lilypond:devel lilypond 
foo.ly


The challenge is getting a locally-installed Frescobaldi 3.2 to run this 
image.


In Frescobaldi's Preferences, I've set the lilypond command to:

docker run -v $(pwd):/app -w /app jeandeaual/lilypond:devel lilypond

But when I try to run lilypond from within Frescobaldi, I get the 
following error:


Traceback (most recent call last):

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", 
line 145, in engravePreview


self.engrave('preview')

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", 
line 200, in engrave


self.runJob(job_class(doc, args), doc)

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/engrave/__init__.py", 
line 252, in runJob


job.manager.manager(document).start_job(j)

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/job/manager.py", 
line 61, in start_job


job.start()

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/job/__init__.py", 
line 225, in start


self._update_process_environment()

File 
"/home//git/frescobaldi/frescobaldi/frescobaldi_app/job/__init__.py", 
line 304, in _update_process_environment


se.remove(k) if v is None else se.insert(k, v)

TypeError: arguments did not match any overloaded call:

insert(self, str, str): argument 2 has unexpected type 'bool'

insert(self, QProcessEnvironment): argument 1 has unexpected type 'str'

So, two questions:

1.  How should I set up Frescobaldi to run the docker image?

2.  If I'm barking up the wrong tree entirely, what is the recommended 
way for Frescobaldi to run lilypond at a more recent version than the 
distro supplies?


Grateful, as ever, for your insights

-- Graham

[1] from https://hub.docker.com/r/jeandeaual/lilypond

Re: Lilypond's English Horn MIDI instrument is non-transposing?

2022-01-15 Thread Graham King
[OT] It goes back beyond Mahler.  St. Gregory is reputed to have said of some 
fair-haired English slaves for sale in Rome, "Non Angli sed Angeli."

> On 15 Jan 2022, at 10:58, Lukas-Fabian Moser  wrote:
> 
> Hi Wol,
> 
>> Out of curiosity, and speaking as a Brit! what on earth is an "English 
>> Horn"? Is the instrument the English call a Cor Anglais?
> 
> Yes.
> 
> The etymology seems to be a bit involved here - although it seems certain 
> that the name has nothing to do with England. :-) Two standard explanations 
> essentially amount to a derivation either from "angelic" (referring to 
> instruments held by angels in Christian imagery) or "angled" (referring to 
> some of the various forms of the instrument) in some language.
> 
> On a semi-related note: Surprising as, for example, a connection between 
> "English", "Anglais", "Angelic" may seem, there is a funny matter in German 
> that, coming from the 19th century Wunderhorn poetry collection, survives in 
> Mahler's fourth symphony: "Wir führen ein englisches Leben", which a 
> modern-day German speaker would naively interpret as "We live an English 
> life" (and maybe think of tea time and fish and chips), but which undoubtedly 
> actually means "We lead an angelic life": Engel = Angel, Eng(e)lisch = 
> Angelic.
> 
> Lukas
> 
> 




Re: large-scale example projects repositories

2021-07-02 Thread Graham King
Urs Liska built some impressive infrastructure to support the engraving of, and 
collaboration on, large scores.  This was used for an edition of Oskar Fried's 
Das Trunkne Lied.  To our great loss, Urs appears to have withdrawn from active 
Lilypond collaboration, but a description of his work appears on the wayback 
machine [1], the code for the tools is still at GitHub [2][3], and Andrew 
Bernard has kindly taken on the custodianship [4].

[1] 
http://web.archive.org/web/20200220115036/http://lilypondblog.org/category/productions/das-trunkne-lied/
[2] https://github.com/openlilylib
[3] https://github.com/openlilylib-documentation
[4] https://lists.gnu.org/archive/html/lilypond-user/2021-03/msg00088.html

> On 2 Jul 2021, at 15:29, Kenneth Wolcott  wrote:
> 
> Mutopia
> 
> On Fri, Jul 2, 2021 at 7:17 AM Tom Brennan  > wrote:
> Hello
> 
> Are there any large-scale, "real-world" lilypond projects available online to 
> view so that I can see how they're organized? I know that I've seen some 
> documentation here and there that describes what you _would_ do if you had a 
> string quartet project, for example, but I'd like to see someone's actual 
> code for a non-trivial project so I can get a sense of how they keep it nice 
> and well-organized. An example of a large-scale project would be a 
> multi-movement orchestral piece, or even a multi-movement chamber piece, like 
> a pierrot ensemble kind of thing, especially one that incorporates some 
> non-trivial customizations with scheme, et al. Definitely there are a 
> thousand ways to organize a project, and I've developed my own way over time 
> that works alright, but if I could see examples of other projects, I might be 
> able to get ideas about improving my productivity.
> 
> The docs are pretty sparing when it comes to talking about this point (e.g. 
> http://lilypond.org/doc/v2.23/Documentation/usage/large-projects 
> ). I've 
> also found some people online who described what they do, but it would be so 
> much more informative to see this done in practice, especially if it were 
> pieces the community could vote on as being "representative" of a good 
> project organization. There are some medium-scale projects I found on github 
> (e.g., https://github.com/cellist/Lilypond-Sheet-Music 
> ). But it would be nice to 
> have a central place to go to search through with keywords or tags, like the 
> snippet repository. Is there something like this already and I just haven't 
> found it yet? Would anyone else be interested in something like that if it 
> doesn't already exist?
> 
> Thanks
> Tom



Re: het wilhelmus

2021-04-13 Thread Graham King
There's an interesting summary here: http://www.originals.be/en/originals/8198

HTH
-- Graham

> On 13 Apr 2021, at 11:00, Stefan Thomas  wrote:
> 
> 
> Dear all,
> thank You for the information!
> All the best,
> Stefan
> 
>> Am Di., 13. Apr. 2021 um 10:01 Uhr schrieb m.tarensk...@kpnmail.nl 
>> :
>> https://nl.m.wikipedia.org/wiki/Wilhelmus
>> 
>> I don't know if such a thing as *the* original source exists. Probably there 
>> are several old sources. But the version in this wiki shows the melody 
>> without full barlines
>> 
>> MT
>> 
>> Verzonden vanaf mijn Huawei mobiele telefoon
>> 
>> 
>>  Oorspronkelijk bericht 
>> Onderwerp: het wilhelmus
>> Van: Stefan Thomas 
>> Aan: lilypond-user 
>> Cc: 
>> 
>> 
>> Dear community, especially those of You living in my direct neighborhood in 
>> the Netherlands,
>> I assume that the melody from "Het Wilhelmus", the National Anthem of NL is 
>> a very old one, from the renaissance.
>> As far as I know times signatures and especially changes of time signatures 
>> didn't exist in those times.
>> When searching for sheet music of this song I've only found versions with 
>> bar changes. Does someone of You know,if and where the original source of 
>> this song can be found?
>> Thanks a lot,
>> Stefan


Re: Openlilylib status

2021-03-11 Thread Graham King
Andrew,
I would love to get to grips with Openlilylib (specifically, scholarLy) but 
when I tried to register to its new home when you first announced it, I 
couldn't get in.  Can't remember the precise details now, and there wasn't time 
to pursue it back then.  But I suspect there might be an element of "suppressed 
demand" for the new site.

My first attempts to use Openlilylib in the past came to nought, for lack of 
understanding.  But it remains on my do-list, and I'd be sorry to see the loss 
of it.

with apologies for leading from the rear!
-- Graham

> 
> On 3/10/21, 3:21 PM, "lilypond-user on behalf of Andrew Bernard" 
>  andrew.bern...@gmail.com> wrote:
> 
>Hello All,
> 
>Some time ago I took over the management of the Openlilylib project from 
>Urs Liska, who was forced to cease the work for personal reasons. I 
>created a server to host a new website, a Git repository and a Discourse 
>forum and Openlilylib specific mailing list. The old git repository 
>remains untouched, but it is no longer taking pull requests. I was in 
>the process of refactoring the whole git repo to make it easier to use, 
>but have not yet completed that work.
> 
>To cut to the point, in a moment of complete stupidity I deleted the 
>server this was running on without thinking to take a backup of the OLL 
>systems. So the work has currently been put on hold until I make a new 
>server and setup all the work again. Sadly, nobody has noticed the loss 
>of the website or forum, which did have a few members, so I wonder if 
>this is worth pursuing anyway.
> 




Re: Universal default value function

2021-01-25 Thread Graham King


> On 25 Jan 2021, at 08:02, Andrew Bernard  wrote:
> 
>  This exact thing came up on the list before I'm sure.

Maybe the thread starting here:
https://lists.gnu.org/archive/html/lilypond-user/2014-02/msg00033.html
> 
> A case of where we need some sort of repository of this sort of knowledge. 
> Mailing lists archives are not exactly the right platform for storage abd 
> search of code idioms and samples.
> 
> Just musing.
> 
> Andrew
> 
> 
> 
> Vaughan McAlley wrote on 25/01/2021 3:17 PM:
>> I am trying to write a function that will accept a symbol and a value, and 
>> assign that value to the symbol if the variable has not already been defined 
>> (such as in an include file).
> 


Re: Time signature ID and implementation

2020-10-08 Thread Graham King
On musicological grounds: certainly C2.  In this period, cut-C and C2 were, in 
practice, equivalent despite the latter implying "modus cum tempore."  Please 
don't ask me about _that_, because I'm at the limit of my understanding!
References for this would include:
Apel: The Notation of Polyphonic Music 900-1600, and
DeFord: Tactus, Mensuration and Rhythm in Renaissance Music

On paleographical grounds: certainly C2.  That's what the arabic numeral "2" 
looked like!  Compare with innumerable other manuscripts of this period.
Reference: Capelli: The elements of abbreviation in medieval Latin paleography, 
translated by Heimann and Kay, at pp.19 and 29.

If you're doing a lot of transcription of renaissance music, I strongly 
recommend equipping yourself with these sources.  DeFord is available for a 
modest price as an e-book.  The others are freely available online.  Capelli is 
invaluable for figuring out the impenetrable system of abbreviations ("sigla") 
used by scribes in underlay.

HTH
-- Graham

> On 8 Oct 2020, at 05:35, Adam Griggs  wrote:
> 
> Hello again lilypond-user,
> 
> Looking for some advice.
> 
> I started with this MS:
> http://www.bl.uk/manuscripts/Viewer.aspx?ref=royal_ms_8_g_vii_fs001r
> 
> Find attached a montage of the time signatures of the four parts.
> 
> That looks like 'C2' to me. Anyone concur?




Re: Resources For Learning Scheme?

2020-05-16 Thread Graham King
This series of presentations by Andy Balaam was helpful to me:

https://www.youtube.com/watch?v=byofGyW2L10=PLfHYba8zC7hTNImXmUAxuPcmhpgWlZLAc
 



> On 16 May 2020, at 07:08, Jacques Peron  wrote:
> 
> This one, by Urs Liska, is specifically about scheme with LilyPond :
> https://scheme-book.ursliska.de/scheme/expressions.html 
> 
> Le sam. 16 mai 2020 à 05:00, melophobic  > a écrit :
> Can anyone point me to a good resource or two for learning scheme? I have
> looked through the examples on Lilypond.org and a few on lilypondblog.org 
> ,
> but I am looking for more in depth examples of things like if statements and
> more complex use of variables. 
> 
> Should I just look up books on Guile? 
> 
> Thank you, 
> 
> Brian
> 
> 
> 
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html 
> 
> 



Re: Remote Ensemble Playing

2020-03-29 Thread Graham King
For those not deterred by network latency, Making Music has put up a page of 
suggestions[1].  (Making Music is a UK-based organisation that provides 
information, advice, advocacy and various other services for amateur music 
groups)

[1] 
https://www.makingmusic.org.uk/resource/covid-19-staying-connected?utm_source=Solus_medium=Email_campaign=iNotesMar2020


Re: Tight spacing in mensural notation (was: Re: Cadenza Senza Tempo Problem)

2019-10-30 Thread Graham King


> On 30 Oct 2019, at 21:41, Thomas Morley  wrote:
> 
> Am Mi., 30. Okt. 2019 um 19:44 Uhr schrieb Graham King
> :
> 
>> Harm, I'm afraid I'm struggling with "#(ly:make-moment -3)"
>> 
>> The NR[2] shows four arguments to ly:make-moment, describes two of them, and 
>> then speaks a little obtusely of the _second_ argument to ly:make-moment 
>> being possibly negative, and I can't find any examples of a negative first 
>> (and only) argument online.  Most examples seem to use one argument, a 
>> positive rational, which I think I do understand.
>> 
>> Where does this syntax come from and what does it mean?
>> And why did you choose -3 ?
>> 
>> TIA
>> -- Graham
>> 
>> [2] 
>> http://lilypond.org/doc/v2.19/Documentation/notation/scheme-functions#index-ly_003amake_002dmoment
>> 
> 
> I intended to set common-shortest-duration to the length of a maxima,
> to get tight spacing, see IR
> (Similiar for base-shortest-duration, although this may be superfluous.)
> And I confused ly:make-moment and ly:make-duration :(
> 
> Though the duration-log of a maxima is -3, it's length is #
> 
> See:
> \new MensuralStaff {
>  \compressFullBarRests
>  \applyMusic
>#(lambda (mus)
>  (ly:music-set-property! mus 'duration (ly:make-duration -3))
>  (format #t "\n\tLength of music: ~a\n\tDuration of music: ~a"
>(ly:music-length mus)
>(ly:music-property mus 'duration))
>  mus)
>  b
> }
> 
> =>
> 
>Length of music: #
>Duration of music: #
> 
> 
> So you better change in my proposal common-shortest-duration to:
> \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 8)
> 
> Cheers,
>  Harm

Harm,
many thanks!  There I was, feeling inadequate in the face of what was, 
evidently, some seriously recondite lilypond-fu :)
I understand now.

BTW, your \applyMusic lambda function is a really neat way of explaining a lot 
in a few lines.

-- Graham




Re: Tight spacing in mensural notation (was: Re: Cadenza Senza Tempo Problem)

2019-10-30 Thread Graham King


> On 30 Oct 2019, at 00:05, Graham King  wrote:
> 
>> 
>> On 29 Oct 2019, at 22:12, Thomas Morley  wrote:
>> 
>> Am Di., 29. Okt. 2019 um 16:28 Uhr schrieb Graham King
>> :
>>> 
>>> 
>>> This unanswered part of Reggie's question in [1] lead me to re-scratch an 
>>> old itch.  In manuscripts and old printed editions of mensural notation, 
>>> notes and rests are horizontally densely-spaced without regard for their 
>>> musical duration.  I have struggled to reproduce this in lilypond, and the 
>>> nearest I can get is this:
>>> 
>>> 
>>> It would be good to be able to impose a small amount of horizontal space 
>>> between the noteheads, but I'm at a loss to see how that can be done.  Any 
>>> ideas?
>>> 
>>> -- Graham
>>> 
>>> [1] https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00420.html
>> 
>> Probably below may be of some help?
>> 
>> \paper { ragged-right = ##t }
>> 
>> \new Score \with {
>> \omit TimeSignature
>> \override SpacingSpanner.spacing-increment = 1
>> \override SpacingSpanner.base-shortest-duration = #(ly:make-moment -3)
>> \override SpacingSpanner.common-shortest-duration = #(ly:make-moment -3)
>> \override NoteHead.style = #'petrucci
>> 
>> %% play around with below, probably useful are settings between 2 and ~10
>> \override SpacingSpanner.shortest-duration-space = #2
>> }
>> 
>> {
>> \cadenzaOn
>> c'\longa \breve 1 \breve 1 2 2 1 4 4 1 2
>> %\bar "" \break % uncomment to observe effect
>> 2 8 8 8 8 c''1 b' a' g'
>> }
> 
> That's lovely. \override SpacingSpanner.shortest-duration-space = #3.5 
> results in something that could almost be from Cantiones Sacrae or any of the 
> movable-type printed editions of the period.
> 
> It will take me a little while to understand fully what you've done, but 
> thanks!
> 
> -- Graham

Harm, I'm afraid I'm struggling with "#(ly:make-moment -3)"

The NR[2] shows four arguments to ly:make-moment, describes two of them, and 
then speaks a little obtusely of the _second_ argument to ly:make-moment being 
possibly negative, and I can't find any examples of a negative first (and only) 
argument online.  Most examples seem to use one argument, a positive rational, 
which I think I do understand.

Where does this syntax come from and what does it mean?
And why did you choose -3 ?

TIA
-- Graham

[2] 
http://lilypond.org/doc/v2.19/Documentation/notation/scheme-functions#index-ly_003amake_002dmoment




Re: Tight spacing in mensural notation (was: Re: Cadenza Senza Tempo Problem)

2019-10-29 Thread Graham King


> On 29 Oct 2019, at 22:12, Thomas Morley  wrote:
> 
> Am Di., 29. Okt. 2019 um 16:28 Uhr schrieb Graham King
> :
>> 
>> "...and most important you want tight space between all notes as
>> though it's not allowing the space for barlines and more."
>> 
>> This unanswered part of Reggie's question in [1] lead me to re-scratch an 
>> old itch.  In manuscripts and old printed editions of mensural notation, 
>> notes and rests are horizontally densely-spaced without regard for their 
>> musical duration.  I have struggled to reproduce this in lilypond, and the 
>> nearest I can get is this:
>> 
>> \version "2.19.82"
>> 
>> \new Score \with {
>>  \omit TimeSignature
>>  \override SpacingSpanner.spacing-increment = #0.0
>>  \override SpacingSpanner.packed-spacing = ##t
>>  \override NoteHead.style = #'petrucci
>> }
>> 
>> {
>>  \cadenzaOn c'\longa \breve 1 \breve 1 2 2 1 4 4 1 2
>>  % \bar "" \break % uncomment to observe effect
> 
> Don't understand and not sure _which_ effect you mean ...
Oops.  That was a note to myself that I should have deleted before posting.  I 
was thinking that I might have to fake the spacing by using manual 
line-breaking (with ragged-right = ##f).
> 
>>  2 8 8 8 8 c''1 b' a' g'
>> }
>> 
>> It would be good to be able to impose a small amount of horizontal space 
>> between the noteheads, but I'm at a loss to see how that can be done.  Any 
>> ideas?
>> 
>> -- Graham
>> 
>> [1] https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00420.html
> 
> Probably below may be of some help?
> 
> \paper { ragged-right = ##t }
> 
> \new Score \with {
>  \omit TimeSignature
>  \override SpacingSpanner.spacing-increment = 1
>  \override SpacingSpanner.base-shortest-duration = #(ly:make-moment -3)
>  \override SpacingSpanner.common-shortest-duration = #(ly:make-moment -3)
>  \override NoteHead.style = #'petrucci
> 
>  %% play around with below, probably useful are settings between 2 and ~10
>  \override SpacingSpanner.shortest-duration-space = #2
> }
> 
> {
>  \cadenzaOn
>  c'\longa \breve 1 \breve 1 2 2 1 4 4 1 2
>  %\bar "" \break % uncomment to observe effect
>  2 8 8 8 8 c''1 b' a' g'
> }

That's lovely. \override SpacingSpanner.shortest-duration-space = #3.5 results 
in something that could almost be from Cantiones Sacrae or any of the 
movable-type printed editions of the period.

It will take me a little while to understand fully what you've done, but thanks!

-- Graham


Tight spacing in mensural notation (was: Re: Cadenza Senza Tempo Problem)

2019-10-29 Thread Graham King
"...and most important you want tight space between all notes as
though it's not allowing the space for barlines and more."

This unanswered part of Reggie's question in [1] lead me to re-scratch an old 
itch.  In manuscripts and old printed editions of mensural notation, notes and 
rests are horizontally densely-spaced without regard for their musical 
duration.  I have struggled to reproduce this in lilypond, and the nearest I 
can get is this:

\version "2.19.82"

\new Score \with {
  \omit TimeSignature
  \override SpacingSpanner.spacing-increment = #0.0
  \override SpacingSpanner.packed-spacing = ##t
  \override NoteHead.style = #'petrucci
}

{
  \cadenzaOn c'\longa \breve 1 \breve 1 2 2 1 4 4 1 2
  % \bar "" \break % uncomment to observe effect
  2 8 8 8 8 c''1 b' a' g'
}

It would be good to be able to impose a small amount of horizontal space 
between the noteheads, but I'm at a loss to see how that can be done.  Any 
ideas?

-- Graham

[1] https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00420.html


Re: Transposing choral score

2019-10-21 Thread Graham King
It's your choice of course, but there is no need to transpose incipits in 
renaissance music.  In fact, it is positively unhelpful.  An incipit with the 
first note in the original pitch tells the reader several things, including 
what transposition the editor has applied.  In the case of Missa Gabriel 
archangelus, the presence of a C4 clef in the bassus and G2 in the cantus tells 
us that Palestrina wrote in "chiavi transportati" (chiavette) and that 
transposition, at sight, down a fourth (in this case) might have been expected. 
 If the editor transposes the incipits, that expectation can be altered.

Hoping that saves you a little effort :)
-- Graham


> On 21 Oct 2019, at 05:11, David Wright  wrote:
> 
> On Sun 20 Oct 2019 at 11:39:46 (-0700), timecurve wrote:
>> Palestrina_Missa_Gabriel_archangelus_-_1.ly
>> 
>>   
>> 
>> Hello, 
>> I am trying to transpose the attached file (Palestrina's /Missa Gabriel
>> archangelus/) down a tone (from F major/d minor to Eb major/c minor). I have
>> looked through similar posts on this forum, and, being completely
>> inexperienced with Lilypond, was not able to successfully follow their
>> instructions. I would really appreciate your help with this! 
> 
> I added this string:
> 
> \transpose f es
> 
> after each occurrence of
> 
> \score {
> 
> with 14 occurrences in all. But be aware that apart from the incipits,
> you put a line break between \score and {, making a global edit a bit
> more difficult.
> 
> Why does it work. In the body of the mass,
> 
> \score { \transpose f es \new ChoirStaff … … }
> 
> the transpose directive applies to the *single* item which follows it,
> and that is the \new ChoirStaff, which contains all the music. So it
> all gets transposed.
> 
> In the incipits,
> 
> incipitcantus = \markup { \score { \transpose f es
>{
>   \set Staff.instrumentName = \markup { \fontsize #1 "Cantus (S)" }
>   \key f \major
>   \clef violin
>   s4 \bar ""
>}
> 
> the brace { on the second line encloses the several items following,
> so the transpose directive applies to everything inside the braces,
> which contains all the (blank) music. The braces make it all into
> a *single* item as far as transpose is concerned.
> 
> Cheers,
> David.
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


Re: time signature 4 / \breve ?

2019-10-16 Thread Graham King
Another way (slightly different result):

\version "2.19.82"

{ 
  \once \override Staff.TimeSignature #'stencil =
#(lambda (grob)
  (grob-interpret-markup
   grob
   #{ \markup
  \override #'(baseline-skip . 1) 
  \center-column {
\musicglyph "four"
\musicglyph "noteheads.sM1" } #}))
  \time 8/1
  c'\breve c' c' c'
}

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


Re: time signature 4 / \breve ?

2019-10-16 Thread Graham King
\version "2.19.82"

tsMarkup = \markup {
  \override #'(baseline-skip . 0.5)
  \column { \number 4 \note #"breve" #0 }
}

{
  \override Staff.TimeSignature.style = #'default
  \override Staff.TimeSignature.stencil = #(lambda (grob)
(grob-interpret-markup grob tsMarkup))

  \time 8/1
  c'\breve c' c' c'
}

HTH
-- Graham


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


Re: remove a staff

2019-10-09 Thread Graham King
How about this?  It gets you a bit closer to what you want, but \omit 
Score.Barline seems to take effect too early.  I'll leave it to the real 
experts to comment on that.

BTW, Simon, did you reply and omit to copy the list?

\version "2.19.82"

hideS = {
  \stopStaff
  \hideNotes
  \hide Staff.TimeSignature
  \hide Staff.Clef
  \omit Score.Slur
  \omit Score.KeySignature
  \omit Score.Tie
  \omit Score.BarNumber
  \omit Score.BarLine
}

unhideS = {
  \startStaff
  \unHideNotes
  \undo \hide Staff.TimeSignature
  \undo \hide Staff.Clef
  \undo \omit Score.Slur
  \undo \omit Score.KeySignature
  \undo \omit Score.Tie
  \undo \omit Score.BarNumber
  \undo \omit Score.BarLine
}

lineofnotes = { \repeat unfold 6 { cis''2 ~ cis''4( d''4 ) } \break }

notes = {
  \key d \major
  \lineofnotes
  \hideS
  \lineofnotes
  \unhideS
  \lineofnotes
}

words = \lyricmode { \repeat unfold 18 la  }

\score{
  <<
\new Voice = "one" {
  \notes
}
\new Lyrics \lyricsto "one" \words
  >>
  \layout { }
}


> On 9 Oct 2019, at 12:37, MING TSANG  wrote:
> 
> Hi, Graham:
> 
> Thank you verymuch for the answer.
> I manage to use the following code to  hide every on the staff except the bar 
> number and key signature. I can live with bar number, but would like to hide 
> the key signature as well.
>  
> hideS = { \hide Staff.BarLine
>   \override Staff.StaffSymbol.line-count = #0
>   \hideNotes %\hide Staff.NoteHead
>   \hide Staff.TimeSignature
>   \hide Staff.Clef }
> 
> The result:
> <1570620986187blob.jpg>
> Thanks,
> Ming.
> On Wednesday, October 9, 2019, 05:49:17 a.m. EDT, Graham King 
>  wrote:
> 
> 
> 
>> On 9 Oct 2019, at 02:22, MING TSANG > <mailto:tsan...@rogers.com>> wrote:
>> 
>> Hi, lilyponders,
>> 
>> Is it possible to remove a staff ( everything)?
>> 
>> Thanks for the help,
>> Ming
> 
> Hi Ming,
> you need to give us some context, or you'll just get the answer "yes" !
> 
> For example, if you're trying to remove a staff from a system when that staff 
> contains just empty bars, the answer might be \RemoveEmptyStaves.  But if 
> you're trying to remove an entire part from a score, the answer will be 
> different and will include advice about how to structure the lilypond code.
> 
> Over to you.
> 
> -- Graham
> 
> <1570620986187blob.jpg>

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


Re: remove a staff

2019-10-09 Thread Graham King

> On 9 Oct 2019, at 02:22, MING TSANG  wrote:
> 
> Hi, lilyponders,
> 
> Is it possible to remove a staff ( everything)?
> 
> Thanks for the help,
> Ming

Hi Ming,
you need to give us some context, or you'll just get the answer "yes" !

For example, if you're trying to remove a staff from a system when that staff 
contains just empty bars, the answer might be \RemoveEmptyStaves.  But if 
you're trying to remove an entire part from a score, the answer will be 
different and will include advice about how to structure the lilypond code.

Over to you.

-- Graham

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


Re: Retrieve Filename of Current Script

2019-09-10 Thread Graham King

> On 10 Sep 2019, at 09:26, sir.teddy.the.fi...@gmail.com wrote:
> 
> Hi all,
> what would I have to do in order to retrieve the filename of my current 
> lilypond script so that I can use it as a variable and assign it to the 
> title-field?


Here's one way to do it.  There might be other, better, ways.

The snippets repository is your friend:
http://lsr.di.unimi.it/LSR/Search


\version "2.19.82"

% from snippet 197:
#(define comml(object->string (command-line)))
#(define loc  (+ (string-rindex comml #\space ) 2)) 
#(define commllen (- (string-length comml) 2))
#(define filen(substring comml loc commllen))   % filename

#(define basen (basename filen))

\header {
  %title = \markup { \filen }
  title = \markup { \basen }
}

{ c'1 }


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


Re: longa of two perfect breves under shiftDurations and Completion_heads_engraver

2019-07-06 Thread Graham King
Found it!  It's a known bug (no. 4362). 
https://sourceforge.net/p/testlilyissues/issues/4362/

The bug has been logged since 2015.  I'm amazed I hadn't noticed it before.


> On 4 Jul 2019, at 22:08, Graham King  wrote:
> 
> Corrected MWE (it turns out that \shiftDurations is irrelevant; it is the 
> dotted breve that is misbehaving):
> 
> \version "2.19.82"
> 
> {
>  \time 3/1
>  c'\longa. % should give \breve. ~ \breve.
>  \time 3/2
>  c'\breve. % works as expected
> }
> 
> \layout {
>  \context {
>\Voice
>\remove "Note_heads_engraver"
>\consists "Completion_heads_engraver"
>  }
> }
> 
> 
>> On 4 Jul 2019, at 20:30, Graham King  wrote:
>> 
>> Is there a way to make the following MWE generate a dotted breve tied to a 
>> dotted breve, rather than breve~semibreve~breve~semibreve ?
>> 
>> I would prefer not to abandon the use of shiftDurations or state "c'1. ~ 1." 
>> if these things are avoidable, for weak reasons to do with my strategies for 
>> transcribing mensural notation.
>> 
>> \version "2.19.82"
>> 
>> \shiftDurations #-1 #0 {
>> \time 3/1
>> c'\breve.
>> }
>> 
>> \layout {
>> \context {
>>   \Voice
>>   \remove "Note_heads_engraver"
>>   \consists "Completion_heads_engraver"
>> }
>> }
>> 
>> Grateful, as ever, for your kind suggestions...
>> 
>> -- Graham
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


Re: longa of two perfect breves under shiftDurations and Completion_heads_engraver

2019-07-04 Thread Graham King
Corrected MWE (it turns out that \shiftDurations is irrelevant; it is the 
dotted breve that is misbehaving):

\version "2.19.82"

{
  \time 3/1
  c'\longa. % should give \breve. ~ \breve.
  \time 3/2
  c'\breve. % works as expected
}

\layout {
  \context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
  }
}


> On 4 Jul 2019, at 20:30, Graham King  wrote:
> 
> Is there a way to make the following MWE generate a dotted breve tied to a 
> dotted breve, rather than breve~semibreve~breve~semibreve ?
> 
> I would prefer not to abandon the use of shiftDurations or state "c'1. ~ 1." 
> if these things are avoidable, for weak reasons to do with my strategies for 
> transcribing mensural notation.
> 
> \version "2.19.82"
> 
> \shiftDurations #-1 #0 {
>  \time 3/1
>  c'\breve.
> }
> 
> \layout {
>  \context {
>\Voice
>\remove "Note_heads_engraver"
>\consists "Completion_heads_engraver"
>  }
> }
> 
> Grateful, as ever, for your kind suggestions...
> 
> -- Graham
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


longa of two perfect breves under shiftDurations and Completion_heads_engraver

2019-07-04 Thread Graham King
Is there a way to make the following MWE generate a dotted breve tied to a 
dotted breve, rather than breve~semibreve~breve~semibreve ?
 
I would prefer not to abandon the use of shiftDurations or state "c'1. ~ 1." if 
these things are avoidable, for weak reasons to do with my strategies for 
transcribing mensural notation.

\version "2.19.82"

\shiftDurations #-1 #0 {
  \time 3/1
  c'\breve.
}

\layout {
  \context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
  }
}

Grateful, as ever, for your kind suggestions...

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


Re: formatting of elided syllable in lyrics

2019-07-02 Thread Graham King
Thanks David & Aaron,
that works nicely.  The thing I was missing was the need to encompass the 
entire syllable (the thing between "--" delimiters) within the markup.

-- Graham

> On 2 Jul 2019, at 20:07, Aaron Hill  wrote:
> 
> On 2019-07-02 9:19 am, Graham King wrote:
>> Where two syllables are set to the same note, is there a way to apply
>> formatting to the second?  I hope I've not missed something obvious in
>> the NR or the Snippets Repository.
>> In the following example, "eleison" is editorial and should be
>> italicised.  The upper line of lyrics has the correct spacing but not
>> the desired italics:
>> \version "2.19.82"
>> ital = \override LyricText.font-shape = #'italic
>> italx = \revert LyricText.font-shape
>> { c'1 c' d' c' }
>> \addlyrics { ky -- rie_e -- lei -- son }
>> \addlyrics { ky -- rie_ \ital e -- lei -- son \italx }
> 
> You could manually construct the syllable with custom markup:
> 
> 
> \version "2.19.82"
> 
> ital = \override LyricText.font-shape = #'italic
> italx = \revert LyricText.font-shape
> 
> { c'1 c' d' c' }
> \addlyrics { ky -- rie_e -- lei -- son }
> % \addlyrics { ky -- rie_ \ital e -- lei -- son \italx }
> \addlyrics { ky -- \markup { rie \italic e } -- \ital lei -- son \italx }
> 
> 
> 
> -- Aaron Hill
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


formatting of elided syllable in lyrics

2019-07-02 Thread Graham King
Where two syllables are set to the same note, is there a way to apply 
formatting to the second?  I hope I've not missed something obvious in the NR 
or the Snippets Repository.

In the following example, "eleison" is editorial and should be italicised.  The 
upper line of lyrics has the correct spacing but not the desired italics:

\version "2.19.82"

ital = \override LyricText.font-shape = #'italic
italx = \revert LyricText.font-shape

{ c'1 c' d' c' }
\addlyrics { ky -- rie_e -- lei -- son }
\addlyrics { ky -- rie_ \ital e -- lei -- son \italx }



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


Re: Polymetric bar lines and bar numbering

2019-04-15 Thread Graham King


> On 15 Apr 2019, at 11:04, tapani  wrote:
> 
> I have created a polymetric score with independent bar lines in different
> parts, using the instructions here: 
> http://lilypondblog.org/2014/05/independent-meters/
>   
> 
> However, this option turns off bar numbering in the score. Adding it
> explicitly like this doesn't work:
> 
>  \context {
>\Score
>\remove "Timing_translator"
>\remove "Default_bar_line_engraver"
>\consists "Bar_number_engraver"
>  }
> 
> I tried adding \consists "Bar_number_engraver" to the Staff context, but now
> the bar numbers are printed for every part, rather than the score (as one
> would expect...).
> 
> How can I restore bar numbering to the score?
> 
> Many thanks. Tapani
> 

I suspect that the best you can hope for is bar-numbering for the top stave of 
the score.

There is a long thread about this[1], in which the first post has an attachment 
that _might_ help you.  The conclusion that I drew from the discussion was that 
bar numbering in polymetric scores is a can of worms, to be avoided unless the 
specific use-case is simple enough to side-step the problems that arise.

Have a look through the thread and see what you think.

HTH
- Graham

[1] the thread starts at 
https://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00187.html 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Clairnote tablet sheetmusic reader app?

2019-01-01 Thread Graham King
On 1 Jan 2019, at 00:22, Carter Sanders wrote:

> Hi-
> 
> Sorry if this has been asked before. I'm new to the list and couldn't find 
> anything about it in the archives. 
> 
> Does anybody know of or use a clairnote-compatibile sheet music reader like 
> forscore? Has anybody tried to feed clairnote into forscore's reflow feature?
> 
> Thanks-
>   Carter

I didn't know about clairnote, nor about Forscore's reflow feature, but I've 
just experimented a bit:

The Mozart string 4tet, K387, at 
https://clairnote.org/sheet-music-files/MozartWA/KV387/k387/k387-lys/k387-score-dn-a4.pdf
 seems to work just fine, as one would expect since Forscore is "just" a PDF 
reader and doesn't really understand the musical notation.

With conventional notation, reflow seems to need a bit of help with very busy 
scores that have many staves per system and variable systems per page.  Other 
than that, it seems quite impressive.  Thanks for pointing it out.

-- Graham


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


Re: Combine these segments for same score

2018-12-16 Thread Graham King


On 16 Dec 2018, at 18:05, Reggie wrote:

> Urs Liska-3 wrote
>> Reggie,
>> 
>> one thing you will have to accept is that the segment approach you're
>> after will not save compilation time of the score as a whole. What it can
>> do is give you a handle to compile only small chunks or "segments" at a
>> time *while editing*.
>> 
>> I'm only on my mobile phone so I can't go into detail now, but you should
>> clarify if that is what you mean or if my comment shows you that you were
>> hoping for something that doesn't exist.
>> 
>> Urs
> 
> Urs hello this is 100% what I am desiring to save on small chunk segments
> compile times during editing. I am aware and OK with of course having to
> wait in the "end" when the full score needs to be compiled :)) I am
> interested in how to create segments as I go along and the piece gets longer
> and I compile segments as NEEDED during editing yes yes. Can you at your
> convenience help in this thread with how segments work I feel so stupid.
> Thank you hugely.
> 
I hope I'm not missing the point.  Could this be what you're looking for?
"Skipping corrected music"  Section 3.4.2 of the Notation Reference.
http://lilypond.org/doc/v2.19/Documentation/notation/skipping-corrected-music

It's a way of saving compile time when you don't need to see the entire length 
of a piece.


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


Re: Drawing extenders for the full duration of a note

2018-10-19 Thread Graham King
Lucas,
how about abusing a hidden grace note?  I can't guarantee that this kludge will 
be robust against future changes...

\version "2.19.82"

<<
 { \afterGrace 15/16 c'1 {\hideNotes c'16} R1 } \addlyrics { o __ }
 \relative c' { c8 d e f g f e d c4 g' c,2 }
>>

HTH,
-- Graham

On 17 Oct 2018, at 21:59, Lucas Werkmeister wrote:

> <<
>  { c'1 r } \addlyrics { o __ }
>  \relative c' { c8 d e f g f e d c4 g' c,2 }


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


Re: [HT] Hairpin left edge/accidentals

2018-10-10 Thread Graham King


On 10 Oct 2018, at 08:51, Pierre Perol-Schneider wrote:

> Hi All,
> 
> Please consider the following outputs (#1: default, #2: tweaked).
> Could anyone tell me what Gould says about this situation?
> TIA. 

(at p.104): "Do not place a hairpin before a note is started, nor after a note 
is finished.  A hairpin should start at the first relevant notehead (not 
accidental) and end with the following notehead or at the first rest 
thereafter.  Good practice is to start the hairpin on the left-hand edge of the 
note and to finish it on the right-hand edge of a note[1] ... (If a dynamic 
symbol is present, the hairpin starts later and finishes earlier, so that the 
dynamic centres on the notehead or chord.)[2]"

(parenthetical expressions are Gould's).
[1] The illustrations make clear that the "right-hand edge of a note" implies 
that a "note" includes not just the notehead but also all the whitespace up to 
the left-hand edge of the next note or rest (or, optionally, up to 
just-before-the-barline).
[2] Last time I looked, lilypond had a small problem here: 
https://sourceforge.net/p/testlilyissues/issues/4837/

So, by these criteria, your output #1 is better than output #2 but, without 
seeing what happens after the middle-C, one can't say much about the right-hand 
end of the hairpin.

HTH,
-- Graham


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


Re: 3/2 unusual writing

2018-10-04 Thread Graham King


On 4 Oct 2018, at 10:09, Jacques Menu wrote:

> Hello folks,
> 
> I’ve found this in Charpentier’s Te Deum, as engraved by the Centre de 
> Musique Baroque de Versailles, which I had never seen before:
> 
> <3-2 unusual writing.png>
> 
> It’s quite readable indeed, maybe more than using the modern notation with 
> quarters, and I’ve wondered if there a way to obtain that with Lily.
> 
> Thanks for your help!
> 
> JM

Jacques, does this help?
The code works for your example, but it would need a bit of work to generalise 
it.

\version "2.19.82"

whiteheads = #(define-music-function (music) (ly:music?)
  #{
\temporary \override NoteHead.stencil = #ly:text-interface::print
\temporary \override NoteHead.text = \markup {
  \musicglyph "noteheads.s1" }
\omit \time 3/4
\shiftDurations #1 #0 { #music }
\omit \time 3/2
\revert NoteHead.stencil
\revert NoteHead.text
  #}
)

{ \clef bass 
  \key b \minor
  \time 3/2
  \relative { 
d1. |
e1. |
\whiteheads {fis2 b,4 cis d b} |
e1. |
\whiteheads {fis2. gis4 ais2 |
b2 b,4 cis d2 |
e2. d4 cis2} |
}}

kind regards
-- Graham


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


Re: \longa and \maxima

2018-06-06 Thread Graham King


On 6 Jun 2018, at 11:18, Urs Liska wrote:

> And I assume (hope) that the unusual glyph with two stems can be dismissed.

Outside of ligatures, I've never seen a notehead in mensural notation with an 
upstem and a downstem on opposite sides.  Even a plica (which this is not) has 
two upstems or two downstems.  Usually, a longa is a brevis with downstem to 
the right (signifying doubling* the note value), and a maxima is a longa with 
an elongated head (again doubling* the value).  Sometimes the downstem is 
replaced by an upstem (always to the right) without changing the semantics.

An upstem to the left invariably signifies the start of a c.o.p. ligature (the 
last ligature to survive in the era of printing).  This is _not_ a c.o.p. 
ligature (semibrevis-semibrevis).

Perhaps the thing that looks like an upstem here is merely a pointer to the 
explanatory text above the stave?

HTH
-- Graham

*or possibly tripling if modus and/or maximodus are "perfect".
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Backing track creation with LilyPond

2018-02-15 Thread Graham King

On 14 Feb 2018, at 14:23, Karlin High wrote:

> http://www.laweekly.com/news/instead-of-being-put-down-these-feral-cats-are-being-put-to-work-8963106
> 
> 
> Cats are a natural rodent deterrent, even if they're not actively hunting. 
> Mice can smell urinary proteins secreted by cats, snakes and other predators.

> 

Snakes.  Hmmm... Now there's a thought.  How about giving up on the cats and 
keeping snakes instead.  They'd keep the mice down, and the 
Bach/accordion/snake-charming videos would be sure-fire hits :)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-30 Thread Graham King

On 29 Jan 2018, at 20:36, Stefano Troncaro wrote:

> Hello again everyone!
> 
> In a recent thread I was asked to write a little bit depicting how I would 
> have liked to learn about using the Edition Engraver. I share it here so that 
> others can give their insights. Hopefully we can make a "quick start guide" 
> kind of thing to help future users.


Thank you Stefano; this is really helpful.

Would anyone care to comment about the relative advantages (and most 
appropriate use cases) of:
- Edition Engraver
- lilypond tags, and
- git version control branches?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Black Mensural notation support

2017-12-01 Thread Graham King
On Fri, 2017-12-01 at 17:58 +1100, Giampaolo Orrigo wrote:


> While searching for lilypond support of black mensural notation, I
> found the following in
> openlilylib: blackmensural-notation/definitions.ily (attached)
> The version under which it was developed is 2.12 and when I convert it
> convert-ly is not able to convert everything (error messages are in
> the file as comments).
> My knowledge of the inner workings of Lilypond is too limited to
> perform manual conversion, so I was wondering if anybody ever took a
> look at it and converted or if anybody is up to the task.
> 
> 
> Thanks!
> 
> 
> Giampaolo Orrigo, MBA


This code was originally written by Lukas Pietsch, and was on
openlilylib purely as a by-product of my pwn abortive attempt to port it
to a more recent version of lilypond.

The code has, in any case, been superseded by a more recent version that
also will not compile because of missing code.

You can find a fuller explanation at:
https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00212.html

If anyone has access to a working version of this code, or even a
reliable way to contact Lukas, please speak up!  There are several of us
on the list who would love to be able to use this work.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to get \fromproperty to work with score headers?

2017-10-29 Thread Graham King
On Sun, 2017-10-29 at 15:30 +, Graham King wrote:

> On Sun, 2017-10-29 at 03:21 -0700, Shevek wrote: 
> 
> > Does anyone know if there's an updated version of
> > http://lsr.di.unimi.it/LSR/Snippet?id=467 to work with score-level headers?
> > It's listed as "to do" in the snippet, but I believe that dates back to
> > several years ago. I'd like to use \fromproperty #'header:piece to put
> > movement titles at the top of pages. 
> > 
> > If there isn't a newer version that supports this, I can mess around with
> > trying to get it working, but I'd appreciated it if anyone can point me in
> > the right direction to start; what would score-level headers be called? is
> > the existing snippet structure adequate or is more complexity needed to cope
> > with bookparts consisting of multiple scores?
> > 
> 
> How about approaching the problem from another direction?  Would
> something like this be OK?
> 
> \version "2.19.40"
> 
> htitle="Trahe me post te"
> hcomposer="Victoria"
> 
> \header {
>   title=\htitle
>   composer=\hcomposer
> }
> 
> { c''1 \pageBreak 1 \pageBreak 1 }
> 
> \paper{
>   evenHeaderMarkup=\markup  \fill-line {
> \fromproperty #'page:page-number-string
> \htitle \hcomposer
>   }
>   oddHeaderMarkup= \markup  \fill-line {
> \on-the-fly #not-first-page \hcomposer
> \on-the-fly #not-first-page \htitle 
> \on-the-fly #not-first-page \fromproperty
> #'page:page-number-string
>   }
> }
> 
> With acknowledgments to Nacho Alvarez for the idea. 

I don't think this will work for "bookparts with multiple scores."  You
need a proper expert...
Apologies for the noise.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to get \fromproperty to work with score headers?

2017-10-29 Thread Graham King
On Sun, 2017-10-29 at 03:21 -0700, Shevek wrote:

> Does anyone know if there's an updated version of
> http://lsr.di.unimi.it/LSR/Snippet?id=467 to work with score-level headers?
> It's listed as "to do" in the snippet, but I believe that dates back to
> several years ago. I'd like to use \fromproperty #'header:piece to put
> movement titles at the top of pages. 
> 
> If there isn't a newer version that supports this, I can mess around with
> trying to get it working, but I'd appreciated it if anyone can point me in
> the right direction to start; what would score-level headers be called? is
> the existing snippet structure adequate or is more complexity needed to cope
> with bookparts consisting of multiple scores?
> 

How about approaching the problem from another direction?  Would
something like this be OK?

\version "2.19.40"

htitle="Trahe me post te"
hcomposer="Victoria"

\header {
  title=\htitle
  composer=\hcomposer
}

{ c''1 \pageBreak 1 \pageBreak 1 }

\paper{
  evenHeaderMarkup=\markup  \fill-line {
\fromproperty #'page:page-number-string
\htitle \hcomposer
  }
  oddHeaderMarkup= \markup  \fill-line {
\on-the-fly #not-first-page \hcomposer
\on-the-fly #not-first-page \htitle 
\on-the-fly #not-first-page \fromproperty #'page:page-number-string
  }
}

With acknowledgments to Nacho Alvarez for the idea.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Colouring grobs with \ed function and disappearing bar

2017-09-21 Thread Graham King
On Wed, 2017-09-20 at 10:53 +0200, Gianmaria Lari wrote:

> 
> 
> 
> Now I would like to make the same but with second measure grey. I use
> \ed function at
> 
> 
> http://lsr.di.unimi.it/LSR/Item?id=985


Is this alternative approach any help?
http://lilypondblog.org/2014/04/music-functions-4-recursion/
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A note which is three measures long

2017-09-06 Thread Graham King
David, Simon,
forgive me: a quirk of my email reader has hidden this fascinating
exchange until now.  Here are a few thoughts:

On Sat, 2017-09-02 at 01:20 +0200, David Kastrup wrote:
> Simon Albrecht  writes:
> 
> > On 02.09.2017 00:34, David Kastrup wrote:
>  Mensural music tends to be a lot less beat-centric (and chord-centric)
>  than later music.
> >>> I used to think that as well, and many people did, and do. For several
> >>> reasons, I don’t anymore:
> >>> 1) There’s the „notationskundliche“ (‘notationological’…) aspect,
> >>> which I already summarized in this thread: Composers first wrote
> >>> scores with barlines and ties on slates, then extracted parts (without
> >>> barlines) and erased the score.
> >> So?  Engineers use rulers for making technical drawings but that does
> >> not mean that you need to glue the rulers to the page or that something
> >> not drawn on checkered paper isn't a technical drawing.  Composer
> >> tallying tools and execution scores are different things.
> >
> > But doesn’t it say something important about how the music was thought
> > about?
> 
> It says that composers were expected to do their job, and that job was
> sufficiently different from that of the performers that the visual aids
> were different.
> 
> > Of course, if e.g. a /soggetto/ in semibreves is imitated starting a
> > minima later, the second entry shouldn’t be sung as ‘hard’
> > syncopations, but still be sung cantabile and according to word
> > stresses.  But my point is that it would be wrong anyway to infer the
> > former just from use of bar lines.  (Ultimately, there’s no way around
> > being acquainted with the style in order to give a good performance.)
> 
> If the visual representation stresses the relation to the metronome at
> the cost of the inner structure, the performance will move in that
> direction.  That's what typography does.
> 
> >> That makes it rather hard for the executioner to bring out the_inner_
> >> rhythmic and thematic structure without hanging every note from the
> >> rigid meter.
> >
> > In my experience, the difficulty is rather outweighed by not losing
> > any time with singers being confused by lack of bar lines (not to
> > speak of the lost sympathies one faces as choral conductor if they
> > have difficulty deciphering the rhythms in the first place).
> 
> Shrug.  In the choirs I was singing in, we were also expected to deal
> with doing chant from square notation.  Sure, it took more time to
> practice at first but it resulted in a more pliable flow better fitting
> the music than a transcription into note values would have delivered.
> 
> It's a matter of priorities.  Your priorities are to get fast
> approximations to the music with your singers.
> 
This is a familiar theme, and much depends upon the experience of the
singers.  A little while ago, I had the privilege of singing Giaches de
Wert's 6-part motet "Ascendente Jesu in naviculam" with a group of
friends from facsimile[1].  The motet tells the story[2] of Jesus
calming the storm on the Sea of Galilee, and uses techniques that in a
later era would be thought of as vivid word-painting (indeed, as a
seafarer, I recognise very specific sea-states there).  The storm scene
is a stupendous multiple canon at the semiminim, preceded by a short
section in which _all_ the parts are displaced from the tactus (the
piece is in tempus imperfectum) by a semiminim.  Having subsequently
sung the same piece from a modern edition[3] with a different amateur
group, I'm really not sure what style of modern notation would help
most.  Perhaps most singers detach their minds from the beat for the
duration of that section.  I certainly have a pair of Stravinsky-moments
each time I approach it!

How I _wish_ that Lukas Pietsch's work on mensural notation in
Lilypond[4] were published and usable!  Then we could offer a real
choice (and set Solesmes chant notation too, where needed).

-- Graham

[1] Harmoniae miscellae cantionum sacrarum (Typis Gerlachianis,
Nuremberg, 1583) available at: http://imslp.org/wiki/Harmoni%C3%
A6_miscell%C3%A6_cantionum_sacrarum_(Lechner,_Leonhard)
[2] Matthew 8:23-26
[3] Email me if you'd like the lilypond source and/or PDF.
[4] See
https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00212.html
for current status, AFAIK.


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


Re: Detecting null markup in Scheme

2017-09-04 Thread Graham King
On Fri, 2017-09-01 at 20:35 +0200, David Kastrup wrote: 
> Graham King <lilyp...@tremagi.org.uk> writes:
> 
> > On Fri, 2017-09-01 at 19:06 +0200, David Kastrup wrote:
> >> 
> >> I'd just try (equal? markupContents "") here.  equal? can compare any
> >> objects for "equality", and at least "" as input should compare equal
> >> then.
> >> 
> > thanks David.  I'm getting "Missing or extra expression in (if (equal?
> > markupContents ""))"
> 
> Well, missing.  You have a condition but no expression to be evaluated
> depending on it.
> 
Thanks again David.  After a long struggle, I've got somewhere.  The 
result is probably inelegant enough to cause some sucking of teeth 
among the congnoscenti, but it works for me:

( if ( equal? #{ \markup #markupContents #}
  #{ \markup { \concat { "" "" "" } } #} )
  #{ <> #}
  (case whereMarkup
 ((system) #{ \mark #markupContents #})
 ((staff)  #{ <>^   #markupContents #})
 (else #{ \mark \markup \color #red #markupContents #})
))

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


Re: A note which is three measures long

2017-09-01 Thread Graham King
On Fri, 2017-09-01 at 14:32 +0200, Simon Albrecht wrote:
> On 01.09.2017 13:37, Graham King wrote:

> 
> Which IIUC you don’t need to know if you’re only going as early as 
> Palestrina… ;-)
> 
Apologies.  I got over-enthusiastic and failed to read the question
properly.  Null Points.


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


Detecting null markup in Scheme

2017-09-01 Thread Graham King
I have a monstrous music-function that constructs a markup in Scheme and
then decides whether to put it at system-level or staff-level, along the
following lines (much-redacted):

foo = #(define-music-function (args...) (types...)
  (let* ((markupContents #{
\markup {
   \concat {
  #markupOne 
  #markupTwo
   }}
#})
  (case whereMarkup
 ((system) #{ \mark #markupContents #})
 ((staff)  #{ <>^   #markupContents #})
 (else #{ \mark \markup \color #red #markupContents #})
  ))
)

The problem is: how best to deal with the case where #markone and
#markuptwo are both empty, i.e. #{ \markup "" #}, and no markup at all
should be attempted?

I've tried variations on:
  ( if ( string=? ( markup->string markupContents ) 
  ( markup->string empty-markup ))
 (#{ <> #})
 (case whereMarkup ...

but my grasp of Scheme, never very firm, is slipping away.

Grateful for any suggestions, pointers to documentation/tutorials, etc.

-- Graham

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


Re: A note which is three measures long

2017-09-01 Thread Graham King
On Thu, 2017-08-31 at 16:06 +0200, Simon Albrecht wrote:

> On 31.08.2017 14:40, Bernhard Kleine wrote:
> > At the end of the Kyrie from Palestrina's Missa Brevis there is a note
> > three measure long. Is there any way to do that simply?
> 
> Yes, there is. However, that is actually a \maxima (with a duration of 
> 8*1) 

or even more, with "perfection" at the level of prolation, tempus, modus
or (theoretically) maximodus.


>  I always use Completion_heads_engraver and code the original 
> note values, instead of hard-coding any ties, in mensural music.

+1

You might get some help for your original question from Kieran's reply
to my question on Wednesday:
https://lists.gnu.org/archive/html/lilypond-user/2017-08/msg00398.html

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


Re: selectively suppressing barlines?

2017-08-30 Thread Graham King
On Wed, 2017-08-30 at 14:22 -0400, Kieren MacMillan wrote:

> Hi Graham,
> 
> > This technique, however, feels really clumsy by Lilypond standards.
> > Have I overlooked a better way?
> 
> Maybe something like
> 
> %%%  SNIPPET BEGINS
> \version "2.19.40"
> 
> \layout {
>   indent = 0
>   ragged-right = ##t
>   \context {
> \Staff
> \RemoveEmptyStaves
>   }
> }
> 
> cantusVoice = {
>   c''1 \break R1 \break
>   c''\breve*1/2 \once \omit Staff.BarLine s1
> }
> 
> altusVoice = {
>   c'1 1 1 1
> }
> 
> \score {
>   \new ChoirStaff <<
> \new Staff { \cantusVoice }
> \new Staff { \altusVoice }
>   >>
> }
> %%%  SNIPPET ENDS

Thanks Kieren,
that's much neater.  Staff.BarLine was the thing I had missed.

And I can use a tag to generate reasonable MIDI output.

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


selectively suppressing barlines?

2017-08-30 Thread Graham King
In transcribing renaissance polyphony, I like to do three things:

 1. represent the final "longa" of a section with a single note,
rather than a series of notes tied over barlines, while other
parts continue twiddling away;
 2. use \RemoveEmptyStaves to produce a Frenched score; and
 3. display bar numbers on the top (remaining) staff.

I recognise that there are valid objections to combining 1 & 3, but
please indulge me...

The following (almost) MWE, illustrates the default behaviour.  I'd like
to remove the superfluous barline at bar "4" in the upper part (only).
By globally replacing "%{" with "%%{" you can uncomment my usual way of
achieving the objective.

This technique, however, feels really clumsy by Lilypond standards.
Have I overlooked a better way?

\version "2.19.40"

cantusVoice = {
  c''1 \break R1 \break
  %{
  \omit \time 4/2 % invisibly change this to accommodate breve
  %}
  \breve
  \bar "|."
}

altusVoice = {
  %{ % Suppress bar numbers until RemoveEmptyStaffContext 
 % makes them necessary:
  \override Staff.BarNumber.break-visibility = ##(#f #f #f)
  %}
  c'1

  %{ % and show bar numbers again, when the upper line
disappears.
  \temporary \override 
Staff.BarNumber.break-visibility = ##(#f #f #t)
  %}
  1
  %{
  \revert Staff.BarNumber.break-visibility
  %}
  1 1
  \bar "|."
}

\score {
  \new ChoirStaff <<
\new Staff
%{
\with { \consists "Bar_number_engraver" }
%}
{ \cantusVoice }
\new Staff
%{
\with { \consists "Bar_number_engraver" }
%}
{ \altusVoice }
  >>
  \layout {
indent = 0
ragged-right = ##t
\context {
  \Score
  %{
  \remove "Timing_translator"
  \remove "Default_bar_line_engraver"
  %}
}
\context {
  \Staff
  %{
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
  %}
  \RemoveEmptyStaves
}
  }
}

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


Git version control (was: Re: Hello / a 1st question)

2017-08-10 Thread Graham King
On Thu, 2017-08-10 at 13:40 -0700, H. S. Teoh wrote:

> On Thu, Aug 10, 2017 at 06:40:10PM +, Vlad Kudelin wrote:
> >  Lilypond just makes it natural to put everything under
> >version control! 
> [...]
> 
> [...] I use git, which allows me to experiment with different
> branches (different ways of scoring a passage) quickly and easily, and
> without risk of losing previous versions should I decide to revert.
> 

So, here's a bonus, to be inserted immediately below the \version line
of your score:


\version "2.19.40"

% from snippet 197 (more to see at
http://lsr.di.unimi.it/LSR/Search ):
#(define comml(object->string (command-line)))
#(define loc  (+ (string-rindex comml #\space ) 2)) 
#(define commllen (- (string-length comml) 2))
#(define filen(substring comml loc commllen))
% filename
#(define modt (stat:mtime (stat filen)))
% Last modified
#(define modts(strftime "%d %b %Y %H:%M:%S" (localtime
modt)))  % Command line

% gitrev (from

http://lilypondblog.org/2014/01/why-use-version-control-for-engraving-scores/#more-2151
 )
#(use-modules (ice-9 popen))
#(use-modules (ice-9 rdelim))

% NOTE: This function only reads the first line of the command!
#(define (strsystem_internal cmd)
   (let* ((port (open-input-pipe cmd))
  (str (read-line port)))
 (close-pipe port)
 str))

#(define-markup-command (strsystem layout props cmd) (markup?)
   (interpret-markup layout props
 (strsystem_internal cmd)))

gitrev = \markup { \strsystem "/opt/local/bin/git rev-parse
--short HEAD" }

\header {
  tagline = \markup{  \center-column{ 
\concat {"Music engraving by Lilypond " 
$(lilypond-version) "-www.lilypond.org"
}
\line { "Version control for this edition: gitrev "
\gitrev " " \modts }
}}
}


Now you can tell whether that paper copy is up-to-date.  Of course, you
don't want this code cluttering up every lilypond score, so best put it
in a separate file and \include it.

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


Re: Hello / a 1st question

2017-08-10 Thread Graham King
On Thu, 2017-08-10 at 18:40 +, Vlad Kudelin wrote:
> Hello dear Lilypond community! 
> 
> 
> I am a new user, and a pretty happy one! Just found out about THIS a
> week ago, and God! I am so grateful to the creators!!! 
> 
> 
> I am a guy who knows music and computers, but... hates mouse. In fact
> I've got Carpal using mouse to enter 100s of notes in some s/w But
> now I am free! can use emacs or whatever! – un–be–live-able!!!
> And also (perfectionists will understand the torture I've been
> through) : Lilypond just makes it natural to put everything under
> version control! 
> un–be–f- live-able!!! 


Welcome to the list.  Yes, it's a wonderful piece of software :)


> 
> That said, I hope it's all right to ask questions here, even if one is
> a total newbee.
> Here it is: 
> 
> 
> I need to accomplish a trivial (I think) task: a book with a bunch of
> scores, in the form 
> 
> 
> Title, Composer... 
>  Score 
> Title, Composer... 
>  Score 
> 
> ...
> 
> 
> However it doesn't look like it's easy.
> I've spent two days reading the manual and the tutorial and
> googling here is what I've found relevant:
> 
> 
> 1) \bookpart : this does work, except for a page break that it creates
> after each score... 
> It doesn't work for me (my "book" is a bunch of tiny 1-2 line little
> songs for kids just starting to study piano);
> 
> 
> 2) The Help page at LilyPond Notation Reference: 3.2.1 Creating titles
> headers and footers 
> 
> 
> 
> LilyPond Notation Reference: 3.2.1
> Creating titles headers and footers
> 
> LilyPond Notation Reference: 3.2.1
> Creating titles headers and footers
> 
> 
> 
> 
> 
> 
> suggests using \header within \score; 
> 
>   * After the music expression in a \score block.
> 
> 
> 
> However this either takes the *last* header and makes it global
> (ex1), 
> or doesn't create headers at all (ex2). 
> 
> 
> Any help would be greatly appreciated. 
> 

How about:


\version "2.19.40"

\paper {
  #(set-paper-size "a4")
  print-all-headers = ##t
}

\score {
  \header {
title = "A score of A's"
composer = "Albinoni"
  }

  { \repeat unfold 24 a'1 \bar "|." }
}

\markup \vspace #10

\score {
  \header {
title = "Better with B's"
composer = "P.D.Q.Bach"
  }

  { \repeat unfold 24 b'1 \bar "|." }
}

\markup \vspace #10

\score {
  \header {
title = "All at C"
composer = "Chopin"
  }

  { \repeat unfold 24 c''1 \bar "|." }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken (?) snippets in openlilylib/snippets

2017-07-10 Thread Graham King
On Mon, 2017-07-10 at 14:02 +0200, Urs Liska wrote:
> 
> Am 06.07.2017 um 20:37 schrieb Graham King:
> > On Thu, 2017-07-06 at 18:17 +0200, Urs Liska wrote:
> >> Hi all,
> >>
> >> I'm wrapping up a number of things in openLilyLib, and I came across
> >> snippets where the example files don't compile (with LilyPond 2.19.60).
> >> Please go through this list and if you feel responsible for the snippet
> >> please have a look:
> >>
> >> * notation-snippets/blackmensural-notation
> > This one is just a copy of Lukas Pietch's code from January 2011 that I
> > was trying to get to work with a recent lilypond.  The files have been
> > completely superseded by Lukas' more recent work and may safely be
> > deleted.
> >
> > Alas, the more recent version doesn't work either (there is a missing
> > file).  Full details at
> > https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00212.html
> 
> Sorry, I'm not really sure what to think of these two seemingly
> contradictory statements. Is it now working *anywhere*? Can I remove the
> snippet from the repository?
> What exactly should I do?

Sorry if I was unclear.

The snippet in your repository should be removed, in my opinion.  

For lilypond-user's information only: There is a more recent version, at
a URL in the message to which I referred; however, until we
find/re-invent its missing file, I don't see any point in including it
in openlilylib.  

-- Graham



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


Re: Broken (?) snippets in openlilylib/snippets

2017-07-06 Thread Graham King
On Thu, 2017-07-06 at 18:17 +0200, Urs Liska wrote:
> Hi all,
> 
> I'm wrapping up a number of things in openLilyLib, and I came across
> snippets where the example files don't compile (with LilyPond 2.19.60).
> Please go through this list and if you feel responsible for the snippet
> please have a look:
> 
> * notation-snippets/blackmensural-notation

This one is just a copy of Lukas Pietch's code from January 2011 that I
was trying to get to work with a recent lilypond.  The files have been
completely superseded by Lukas' more recent work and may safely be
deleted.

Alas, the more recent version doesn't work either (there is a missing
file).  Full details at
https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00212.html

-- Graham


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


Re: No R in input! (Proposal for discussion)

2017-04-02 Thread Graham King
On Sat, 2017-04-01 at 17:21 +0200, David Kastrup wrote:
> Simon Albrecht  writes:
> 
> > Hello everybody,
> >
> > once again I find myself typesetting ancient music, which poses
> > special challenges with regard to separation of content and
> > presentation. Right now, I’m talking about the fact that bar lines are
> > an editor’s decision and not part of the musical content – different
> > editors might place bar lines after a breve, a semibreve, none at all,
> > or only inbetween staves.
> >
> > This means amongst others that in order to use the same music source
> > for different editions, it should not be hardcoded which rests are
> > MMRs and which aren’t. Also, I don’t think there’s any ambiguity in
> > the following translation: Every rest which fills one or more entire
> > bars should be treated as a MMR by the typesetting engine.
> >
> > Thus, I would like to deliver a plea to perspectively abolish the
> > distinction between r and R in LilyPond source code and have the
> > engravers handle the difference.
> >
> > This would also get us rid of one possibility to make mistakes in engraving.
> >
> > I had this idea right now and it feels too convincing to me to
> > actually be as good as it seems. Hence I’d love to hear your
> > opinions. What complications are there (aside from the effort of
> > implementation) that I fail to see?
> 
> Polyphony can become rather awkward to read if some voice has a full bar
> rest while another has material.
> 
> {
> << c''1 \\ R1 >>
> }
> 
> Formatting is completely different (multi measure rests are spanners!),
> so articulations etc will behave surprisingly if LilyPond switches on
> its own initiative.
> 
As a fellow-editor of editions from mensural notation, I too would
welcome Simon's proposal to separate presentation from content.  In the
context of such editions, the objections that David identifies would not
arise.
Could Simon's proposal be implemented as an engraver, to be invoked in
such editions alongside Completion_rest_engraver ?
Autoidentify_whole_measure_rest_engraver anyone?


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


Re: Performance advice: Tied quavers in British (sacred) music

2016-11-18 Thread Graham King
On Thu, 2016-11-17 at 23:31 +0100, Michael Gerdau wrote:


> [longish explanation about how tied quavers are to be sung
>  in british choral music snipped]
> 



> It is my understanding that there is no such thing as a strict rule
> as to how that is to be sung. 

Agreed.  I'm English (through no fault of my own) and in forty+ years of
singing I don't recall coming across a formal statement about this.  The
practice might have arisen from the frustration of composers confronted
with bad amateur choirs whose singers were careless about the placement
of final consonants.  We've all heard the results: half a bar of
sibilance when the word ends in "s" for example.  Conductors will often
instruct choirs precisely where to place certain word-endings, having
regard to ensemble, harmony, acoustics, etc., and often consciously
amending the written score.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Stepping down and moving on

2016-11-17 Thread Graham King
David,
I'll add to the thread my deep thanks for your skill, insight, hard
work, helpfulness, articulacy, and (yes, really) diplomacy. May your new
employer prove as congenial and rewarding as they are evidently
discerning.

best regards
-- Graham


On Wed, 2016-11-09 at 18:09 +0100, David Kastrup wrote:

> Hi folks and team,
> 

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


Re: \eps-file error

2016-08-29 Thread Graham King
On Mon, 2016-08-29 at 18:15 +0200, Federico Bruni wrote:

> \version "2.19.46"
> \markup {
>   \eps-file #X #0 #"test.eps"
> }
> 

\eps-file should be \epsfile (no dash).  After that, test.eps throws an
error on my system, but your mileage may vary.

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


Re: GSoC update; Q's about final/draft modes, and triggering footnotes

2016-06-29 Thread Graham King
On Mon, 2016-06-27 at 19:50 -0400, Jeffery Shivers wrote:
> Hi fellow LP users,
> 
> Firstly, thanks to Urs for all his guidance in the project so far. The
> LaTeX package for scholarLY is inching forward still, and hopefully I
> will share an initial version after a few more kinks have been worked
> out with a couple of the features. I'll have more substantial details
> soon, and ideally all will be wrapped in some sort of early
> documentation along with the package and example docs.


Jeffery,
thanks for your work on scholarLY.  

Please don't be discouraged by sparse feedback from the list: there are
certainly some of us who are keen to use scholarLY but who do not know
LaTeX, or are unwilling to wrap our existing lilypond scores in it.
Both lilypond and LaTeX have steep learning curves, and not everyone is
willing to tackle both of them.  Speaking for myself, I have used
\criticalRemark, but until it can produce lilypond/score footnotes it is
little more than an elaborate comment in the source code.  Once it can
produce such footnotes, we'll be able to use it to greater effect, your
user base will grow, we'll be in a position to understand some of the
choices you are offering, and you'll get better feedback.

Looking forward to v1.0.

-- Graham


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


Re: Introduction Bracket glyphs

2016-06-19 Thread Graham King
On Sat, 2016-06-18 at 23:19 -0700, Breanne Szilagyi wrote:
> Good Evening,
> 
> 
> I am arranging a hymn for organ and need to indicate the recommended
> measures to use for an introduction.  I am looking for square
> brackets: the first bracket is the top and left sides of a square and
> the second bracket is the top and right sides. And I want to place
> them above the system.



This is related to the issue of colouration brackets and ligature
brackets discussed at
https://lists.gnu.org/archive/html/lilypond-user/2011-08/msg00186.html.
IIRC, the approach there used unicode characters resembling the required
glyphs.  

Last time I tangled with this, a friend suggested:


> > I think I’ve managed to get a handle on how lilypond deals with font
> > selection.  Analysing your L’homme armé score was complicated by
> > your choice of glyphs for colouration brackets – characters U+250F
> > “Box Drawings Heavy Down And Right” and U+2513 “Box Drawings Heavy
> > Down And Left” are absent from a surprising number of fonts, forcing
> > the font manager to go and hunt in exotic places to try and find
> > them.  The characters U+250C “Box Drawings Light Down And Right” and
> > U+2510 “Box Drawings Light Down And Left” are much more common.
> > 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: RE:Programming error - cross fingers

2016-06-17 Thread Graham King
On Thu, 2016-06-16 at 13:24 -0400, Stephen MacNeil wrote:

> The way I approach an error like this may or may not help. But I can
> tell you what I do. I start deleting large sections of the source.
> Bottom up.

Stephen doubtless already knows this but, for the benefit of all:

block
comments
%{ delineated 
by
percent-openbrace
and
percent-closebrace
%}
are your friend
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using extended mensural notation support for Lilypond

2016-05-11 Thread Graham King
On Wed, 2016-05-11 at 22:31 +0200, Noeck wrote:

> Hi,
> 
> were there changes since "Extended mensural notation support for Lilypond":
> https://lists.gnu.org/archive/html/lilypond-devel/2015-02/msg00152.html
> 
> Or in other words, can someone please show me how to use it? Is it
> usable directly or do I need to patch lilypond somehow? There were some
> discussions about including a patch back then, but I don't know if it
> happend.
> 


Joram, that's remarkable timing; I was looking into this subject earlier
tonight.  I too would dearly like to get Lukas' enhancements to work.

Here's how I understand the status:

Back in February 2015 there were some very encouraging posts[1] on
lilypond-devel, in which Lukas Pietsch submitted the last of the C++
patches for his work on mensural notation.  He referred to a dropbox[2]
containing a document manual/custommensural.html that describes in
scholarly detail what appears to be a largely-complete body of code
representing a _huge_ advance in lilypond's ability to produce various
early notations.  The patch to lilypond's /scm/output-ps.scm mentioned
in the document seems to have been applied[3], as of lilypond 2.19.17.

This work clearly supersedes and surpasses the code published on Lukas'
website[4] four years ago, so I've given up trying to get that earlier
code working with 2.19.

The dropbox also contained a set of lilypond include files from 23 Feb
2015, but unfortunately one of them, lib.ly, seems to be missing, so
I've been unable thus far to use the newer software.

I've tried emailing Lukas a couple of times over as many years, but
without response, and I'm loth to pester him.  Even so, it is very sad
that this remarkable improvement to lilypond appears to remain unusable.

[1]
https://lists.gnu.org/archive/html/lilypond-devel/2015-02/msg00204.html
[2]
https://www.dropbox.com/s/nrcz11hkslsbc52/custommensural-2015-02-23.zip?dl=0
[3] http://sourceforge.net/p/testlilyissues/issues/3882/
[4] http://lukas-pietsch.de/Music/
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[OT] Scribal abbreviations (Was: Re: Using strings and other types to return markup)

2016-05-11 Thread Graham King
Strictly speaking, I think we're talking about a macron, rather than a
tilda.  It's not just macrons of course: Phil is dabbling in the
wonderful world of scribal abbreviations.  Most people are interested in
expanding (rather than reproducing) the abbreviations, and for anyone
trying to do so the following reference might be helpful (particularly
if you're dealing with facsimiles of manuscript, rather than early
printed sources):

"The elements of abbreviation in medieval Latin paleography" by Adriano
Capelli, translated by David Heimann & Richard Kay[1] 

Unicode support for these glyphs is described at the Medieval Unicode
Font Initiative [2].

The whole subject is a bit of a rabbit-hole, and can easily lead to an
entire evening spent translating the attached image to the word
"jocundissima" ... :)

[1] https://kuscholarworks.ku.edu/handle/1808/1821
[2] http://folk.uib.no/hnooh/mufi/specs/index.html

Hope this is helpful and not too far off-topic.

-- Graham

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


Re: duration using variable

2016-04-27 Thread Graham King
On Wed, 2016-04-27 at 13:02 +0200, David Kastrup wrote:

> Graham King <graham.k...@tremagi.org.uk> writes:
> 
> > perhaps try:
> > \scaleDurations 2/1 { \cC }
> 
> Doesn't change the visuals.
> 

Sorry.  More haste, less speed.  I meant \shiftDurations.  It might
require other things to be adjusted too: \time is given as an example
here.  This code was developed some years ago, so there might be better
ways of doing it now.


\version "2.19.40"

music = { c'4 4 4 4 }

{ \time 4/4 \music }

#(define RF 1) % 1 to double note values, 2 for unchanged, 4 for
halved, etc.

{ \shiftDurations #(rationalize 
(inexact->exact (- (/ (log RF) (log 2)) 1))
1/10) #0
  { \time #(cons 4 (* RF 2)) \music }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   3   >