Re: Pedal cautionary after a line break (current status and improvements)

2020-06-26 Thread Valentin Villenave
On 6/25/20, Paolo Prete  wrote:
> The lack of a cautionary pedal on a bracket could be seen as an enhancement
> only in a self-referential context, which doesn't make sense to me. A
> proper way to proceed is to check what modern professional engravers do
> with it, and check as a consequence if Lilypond is coherent with them (->
> common practice)

Greetings Paolo,
determining whether this issue is a “Defect” or an “Enhancement” is
largely inconsequential; as Jean said (and we should be thankful to
him for opening a tracker page on your behalf, by the way), that does
not imply a different priority.

That being said, can you please document your claims? As a pianist
myself (and although I did specialize in contemporary music), I can’t
remember _any_ score where I’ve seen a pedal reminder after a system
break, off the top of my head. But that’s just me.

As you correctly point out, LilyPond’s aim of producing high-quality
music scores closely tracks what well-established engravers do;
obviously we’ve been mainly following 19th-century engraving practices
though, and pedal brackets have evolved a *lot* since then -- though
I’m not sure it could be argued that any “standard” pedal notation has
emerged in the past 70 years.

If you can provide us with (scanned) examples of several mainstream
editions that use these reminders, then indeed either Jean or I will
add these to the GitLab page, and relabel it as a Defect rather than
an Enhancement. As Jean said, this will be a crucial first step
towards implementing that feature (and, to begin with, acknowledging
that it is objectively something LilyPond needs).

Cheers,
-- V.



Re: How to submit improved LSR entry?

2020-06-19 Thread Valentin Villenave
On 6/19/20, Lukas-Fabian Moser  wrote:
> But this seems not to have been taken up for the database, neither as an
> addition nor as a replacement for 792 (see
> http://lsr.di.unimi.it/LSR/Search?q=clef+change).
> Did I do something wrong?

No, you did everything right (TBH, you could also have added the
“correction wanted” tag but that’s not what prevented your
contribution from being taken into account).  I’ve merged your
corrections into 792 and deleted 1109 (I could have left it unapproved
but that’s just likely to create further confusion down the line).

The LSR is only tended to by “Thomas Morley” and myself these days
(and unlike him, I am doing a lousy job of it), and since there’s no
notification system we have to remember to check it out regularly for
new snippets (which are marked as “unapproved” by default -- that is
why your new snippet didn’t appear in the search results), verify
their tags, and either approve them or merge them into an existing
snippet when, as in this case, they’re intended as a correction.

Actually, sending an e-mail to either of us or on -user is also a
great way to get our attention, as you can see here :-)

Thanks for your contribution!

Cheers,
-- V.



Re: Fine tuning of MetronomeMark's expression

2020-06-19 Thread Valentin Villenave
On 6/19/20, Paolo Prete  wrote:
> Is there a way, for the above metronome indication " (quarter = 120) "  of
> the above MetronomeMark to apply the same font parameters (\abs-fontsize,
> \bold etc.) specified in the \markup expression?

Well, you can always redefine a Scheme function (see the definition of
metronome-markup in scm/translation-functions.scm)...  That being
said, it might be easier to go through an override instead of putting
stuff into the markup block:

{
  \override Score.MetronomeMark.font-size = #4
  \tempo  "Allegro" 4 = 120 c'
}

Cheers,
-- V.



Re: Making Lilypond faster

2020-06-13 Thread Valentin Villenave
On 6/13/20, Paolo Prete  wrote:
> At this point, I'm meditating about a "selective" way of compiling a score
> with a preprocessor, so to save time.

Also remember that if you have fixed page breaks, you can easily
recompile only some pages using skipTypesetting or
show[First|Last]Length. (You can even use that with command-line hacks
without modifying your main .ly source code.) This makes things
*considerably* faster.

Cheers,
-- V.



Janus M. Nowacki

2020-06-12 Thread Valentin Villenave
Greetings everybody,
I just wanted to let you know that Janus Nowacki, one of the founders
of the TeX Gyre font suite that is used by default in LilyPond, has
recently died:
http://www.gust.org.pl/news/jmn-obit-en
And his personal website (in Polish): https://jmn.pl/

The TeX Gyre font project was started in 2006 to provide high-quality,
free-licensed replacements for existing URW fonts:
http://www.gust.org.pl/projects/e-foundry/tex-gyre/nfp11.pdf

Its adoption in LilyPond was discussed from 2008 onwards, but took
more than seven years to finally be committed. (TeX Gyre Schola has
many advantages, less bugs and excellent support for non-Western glyph
sets such as Cyrillic and Hebrew.)
https://gitlab.com/lilypond/lilypond/-/issues/4552
https://lists.gnu.org/archive/html/lilypond-devel/2008-01/msg00174.html

Cheers,
-- V.



Re: lilypond-user Digest, Vol 211, Issue 44

2020-06-12 Thread Valentin Villenave
On 6/12/20, Valentin Petzel  wrote:
> I’m not sure if \newSpacingSection is a nescessarily good idea, because it
> basically divides the score into parts of different spacing. And I’m not
> sure about that, but I think this may cause inconsequent spacing.

Well, IMO as soon as you start contradicting LilyPond’s decisions
you’re losing consistency anyway. \newSpacingSection may at least give
you some consistency at a local level (unlike adding skips as the OP
was understandably reluctant to do).

> (Also it is overly complicated for overriding a single bit auf spacing).

“Auf” oder “von”? :-)

> What we would  want to do is to remain in one sense of spacing and
> modify spacing only for single exceptions.

That is one way to do it (I actually hadn’t seen your message when I
posted mine; your mail client seems to be messing with subject lines,
as this message is another example).

Anybody who’s ever been using GNU LilyPond will tell you two things anyway:
- no matter where you look, there’s _always_ more than one way to skin a cat;
- no matter where you look, spacing algorithms are _always_ the single
most complex piece of LilyPond.

(Well actually I cheated a bit, because vertical spacing is certainly
even worse. But the point still stands for horizontal spacing within
systems.)

So your answer is certainly a good one; mine may be a bit simpler
although it may have its downsides, depending on taste.

Cheers,
-- V.



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-06-12 Thread Valentin Villenave
On 6/7/20, Rutger Hofman  wrote:
> My first attempt is here:
> https://www.rutgerhofman.nl/lilypond/divisi-doc/divisi-doc.html

Very nice!  I have a few minor remarks:
- The writing style differs a bit from our recommended style, see CG
5.5.3 and 5.5.4
http://lilypond.org/doc/v2.21/Documentation/contributor/documentation-policy

- If we’re to make that a part of the NR (as I’m wishing for),
cross-references, index entries etc. will have to be added;
@lilypondfile examples will need to be directly embedded as @lilypond
blocks, etc.

- Some trimming or summing-up will certainly be needed; besides, the
keepAliveInterfaces example I recently added could be merged with your
quoteDuring example etc.

- I think your PMP macros could (and should) be integrated upstream,
by making them as general and universally-applicable as possible. In
which case you’ll need to think of more suitable names, doc strings
etc.

But that does look promising indeed!

Cheers,
-- V.



Re: How to pass a fraction as a parameter for a Scheme function

2020-06-12 Thread Valentin Villenave
On 6/10/20, Paolo Prete  wrote:
> When I looked at the list of predicates...;
>
> https://lilypond.org/doc/v2.19/Documentation/notation/predefined-type-predicates.it.html
>
> ... I have been misled by the term "rational". In fact, in the italian
> language the term "rational" (---> razionale)  means an irreducible
> fraction of two coprime integers, while in the english language it means a
> number that can be expressed as the quotient or fraction p/q of two
> integers.

Oh, that’s interesting.

> For example, "2/4" is not rational in italian, but it is rational in
> english. Then I did not even consider that predicate.
> I suggest the italian maintainer of the translation to keep note of this
> ambiguity.

I’m CCing Federico, but if you’re interested you may also want to join
the brand new Italian-speaking mailing list he’s just launched!
https://lists.gnu.org/mailman/listinfo/lilypond-it

Cheers,
-- V.



Re: horizontal spacing inside \magnifyMusic

2020-06-12 Thread Valentin Villenave
On 6/10/20, Eby Mani  wrote:
> Is there any way to add horizontal spacing to make music more readable
> without using "skip" inside violin section commented in the score ?.

Well, you probably can get a slightly better result by inserting
\newSpacingSection in a few of these places (and also overriding or
reverting the spacing-increment setting); see
http://lilypond.org/doc/stable/Documentation/notation/new-spacing-section

The reason why I’m saying “slightly better” is that your system is
already quite crowded so it’s somehow inevitable that some notes end
up quite close together.

Cheers,
-- V.



Re: pdf bookmarks

2020-06-10 Thread Valentin Villenave
On 6/5/20, Frédéric  wrote:
> Has anything been done yet? Can I help?
> In the past, I've already added to a postscript file some bookmarks.
> It was just adding postscript commands somewhere. I would need to find
> that again but then, the most difficult will be to make the links to
> the pages.

Well, we already have page-link ability (for \table-of-contents) so
that’s not a problem (see scm/output-ps.scm).  What remains to
implement is how to determine which one of these these pdfmark markers
have to be included in , with a title and possibly a hierarchical
structure; tocItem provides some of that but probably needs to be
extended.

I’ve cooked something up on
https://gitlab.com/lilypond/lilypond/-/merge_requests/145: it remains
a bit of a hack but if you and the team can help me smooth it out,
there’s a chance it can be included in the next development release.

It doesn’t affect C++ files so you may even try it yourself without
needing to compile LilyPond entirely, just by copying your
installation directory and inserting the modified scm files and
toc-init.ly into it.

Cheers,
-- V.



Re: pdf bookmarks

2020-06-05 Thread Valentin Villenave
On 6/5/20, Frédéric  wrote:
> Is there any possibility that \tocItem generates such a bookmark?

It’s certainly possible using pdfmark commands, but not supported yet
(actually, I’ve been investigating that feature for a little while).

Cheers,
-- V.



Re: Changing the text of a TimeSignature

2020-06-05 Thread Valentin Villenave
On 6/5/20, Paolo Prete  wrote:
> Is there a way to change displayed text in the TimeSignature's fraction,
> without changing the effective value?

Yes, by overriding its 'stencil property:
http://lsr.di.unimi.it/LSR/Item?id=554

Good luck!

Cheers,
-- V.



Re: Adding metronome click track to MIDI

2020-06-04 Thread Valentin Villenave
On 6/4/20, Francesco Petrogalli  wrote:
> thank you both for your help. I have created a solution based on your
> examples. I hope you don't mind the copy and paste + tweak exercise,

Hey, that’s what the list is for!  Also, I’ve uploaded a copy of my
own function onto http://lsr.di.unimi.it/LSR/Item?id=1114 which makes
it Public Domain.

> The code that works for me is the following, I will merge it when I
> get an "OK go" from both of you:
> https://github.com/fpetrogalli/trr/pull/1/files

Note that if you’re using a \score block specially for MIDI output,
then you don’t need a Devnull, you could simply use a \new Staff or
\new DrumStaff and therefore you’d no longer need all the \consists
lines.

Or even shorter, instead of \new whatever, you can just type
  \drums \repeat unfold 83 {wbh4. trim4. trim4. trim4.}
which also removes the need for midiInstrument and \drummode.

> The `unfold 83` is a bit ugly, but it allows me to obtain what I need
> without having to dig into lilypond internals and scheme syntax.

I can understand that!  Also note that the <>\ff is just for dynamics
(to make the clicks louder) so whether you want to keep it or not, is
up to you.

Cheers,
-- V.



Re: A weird spacing problem

2020-06-03 Thread Valentin Villenave
On 6/3/20, Mark Stephen Mrotek  wrote:
> When I set piano four part I let Lilypond do all the work.

Hear hear! (Even for more than four parts, btw.)

> I have taken the liberty of recoding the section using four-part voicing.

Yeah, so did I!  That sure was tempting wasn’t it? :-)

Cheers,
-- V.



Re: A weird spacing problem

2020-06-03 Thread Valentin Villenave
On 6/3/20, Robert Blackstone  wrote:
> Overall there are several instances where I needed "\once \override
> NoteColumn #'force-hshift = #x" , and a few "\once\override
> NoteColumn.X-offset = #x”.

Ouch.  That’s pretty brutal.  May I ask why you felt the need to use
all these?  This alters drastically the layout, and basically amounts
to force your own spacing decisions onto LilyPond’s.

Frankly, I’ve written (and transcribed) very complex piano scores, and
not once have I needed to mess with Lily’s own idea of where the
NoteColumn objects should begin and end; of course \voiceThree and
\voiceFour internally rely on that, but with some fairly sane (and
tame) predefined values.  If you need some non-standard alignments,
I’d recommend using the simplest of tricks like invisible rests and
duration multipliers instead:



upperI = \relative {
  fis'8 r fis2 fis2.~ fis8 f d2
}

upperII = \relative {   
  8 r s32 4*15/16( 
  s4*3/4  c b)~ 2.
}

lowerI = \relative {
  \oneVoice 8 r 2
  \voiceOne s4*3/4 f a gis s2.
}

lowerII = \relative {
  s2. es 
}

\new PianoStaff <<
  \accidentalStyle PianoStaff.neo-modern
  \new Staff = "up" <<
\time 3/4
\new Voice { \voiceOne \upperI }
\new Voice { \voiceTwo \upperII }
  >>
  \new Staff = "dn" <<
\clef bass
\new Voice { \voiceOne \lowerI }
\new Voice { \voiceTwo \lowerII }
  >>
>>

\layout { \context { \Staff \consists #Merge_rests_engraver } }



Cheers,
-- V.



Re: showLastLength

2020-06-03 Thread Valentin Villenave
On 6/3/20, David Kastrup  wrote:
> Once you stop assuming that the manual writers are incompetent
> […] it should be obvious that

Hmm, since we’re on -user, let’s not antagonize people coming here
asking for advice, perhaps? :-)
https://en.wikipedia.org/wiki/Wikipedia:Assume_good_faith

The OP may have made a mistake somewhere in his code (there’s actually
a good chance for that to be the explanation, as you and I both know),
but _from his point of view_ if something that purportedly works in
the doc suddenly doesn’t when he tries it, then he has every
legitimate reason of wondering why, hasn’t he?

If anything, him immediately coming here to inquire about it goes to
show how much trustworthiness and reliability he’s used to find in our
documentation.

(And yes, I fully realize the irony of me finding myself on the “nice”
side of a good cop/bad cop situation for once.)

Cheers,
-- V.



Re: showLastLength

2020-06-03 Thread Valentin Villenave
On 6/3/20, David Sumbler  wrote:
> I have never used 'showLastLength' or 'showFirstLength' until today.

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

Are you sure there isn’t an unclosed block (which is to say, a missing
closing curly brace) somewhere?
showLastLength and showFirstLength need to be defined at the top
level; if you’re using Frescobaldi, you can try clicking on Tools >
Code Formatting > Re-Indent to catch any mismatched braces.

Otherwise, please post some code so that we can help you investigate.

Cheers,
-- V.



Re: Adding metronome click track to MIDI

2020-06-03 Thread Valentin Villenave
On 6/3/20, Francesco Petrogalli  wrote:
> Is there a special midi instrument I could use for that?

Not that I know.
BTW, here’s a quick-and-dirty way of adding a click track, in case you
might find it useful:

%%

addTicks =
#(define-music-function (m) (ly:music?)
   #{ << $m
 \new Devnull \with {
   \consists Drum_note_performer
   \consists Staff_performer
   \consists Dynamic_performer
   midiInstrument = #"woodblock"
 } \drummode {
   <>\ff \repeat unfold
   $(ly:moment-main-numerator
 (ly:moment-div
  (ly:music-length m)
  (ly:make-moment 1 4)))
   rb4 }>> #})

music = \relative  c' { c2 d e f g a b c }

\score {
  \new Staff \addTicks \music
  \layout {}
  \midi {}
}



Cheers,
-- V.



Re: list of strings from a string

2020-06-03 Thread Valentin Villenave
On 6/3/20, Freeman Gilmore  wrote:
>   % Gives me this: (-3 A -6 1 -B),

Well, it _is_ a list of strings, as you can verify by adding:

#(display (map string? Y))

Or you can use
  #(write Y)
instead of (display Y), which will print the double quotes.

>   % I need: ("-3" "A" "-6" "1" "-B"), how do I get this?  A list of
> strings.

Well, you can always do

#(set! Y (map (lambda (s) (string-append "\"" s "\"")) Y))

but as I said, that’s not necessary.

Cheers,
-- V.



Re: Making Lilypond faster

2020-06-03 Thread Valentin Villenave
On 6/3/20, Paolo Prete  wrote:
> Did you succeed (or someone else) in compiling with guile-3, meanwhile ?
> If so, did you see some improvement in speed?

No, for now guile 2.0 has become nearly as reliable as 1.8 but there
remains a noticeable performance drop; building LilyPond with guile
2.2 is possible but triggers some annoying bugs, and with guile 3.0 I
don’t think anybody’s even been giving it a try. The only sure thing
is that 2.20 will be the last stable version requiring guile 1.8,
since that’s been phased out in most GNU/Linux distributions. And,
yes, the possibility of using JIT bytecode starting with Guile 2.0 can
potentially lead to a speed gain, but not until several additional
bugs have been ironed out.

That being said, regardless of the Guile situation, there is a lot of
ongoing optimization work on LilyPond’s c++ code, logic and
computation, which should eventually lead to a speed gain of at least
15 or 20% (I think) on some parts of the processing. The next stable
release will certainly be quite interesting.

Cheers,
-- V.



Re: A weird spacing problem

2020-06-03 Thread Valentin Villenave
On 6/3/20, Robert Blackstone  wrote:
> I’m vainly struggling with a weird spacing problem

Hi Robert,
Unless you post some code, it’s gonna be difficult to help you. You
should first double check your source files in case there’s some
\override affecting the DotColumn object somewhere?

Cheers,
-- V.



Re: Error while trying to put a Text above a notehead

2020-06-03 Thread Valentin Villenave
On 6/2/20, Robin Bannister  wrote:
> Well, you could define your own markup command(s).
> Have a look at /scm/define-markup-commands.scm for examples,
> including \abs-fontsize.

Well, for once, there’s even some documentation about it!
http://lilypond.org/doc/v2.21/Documentation/extending/new-markup-command-definition

Cheers,
-- V.



Re: IMSLP upload policy (was: Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.)

2020-06-02 Thread Valentin Villenave
On 6/2/20, Rutger Hofman  wrote:
> I know that pdftk can add attachments to PDFs. Is that now also built
> into Lilypond?

Well… yes!
https://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=0fa6f042cccacb643d46781dde23617c71a9753e

Man, I wish more people would know about that feature.  I need to take
a look at the docs because right now it’s only buried here:
http://lilypond.org/doc/v2.21/Documentation/usage/command_002dline-usage

> My preference for uploading parts is the other way around, i.e. the way
> I did it. The parts alone for this typeset total to 311 pages. I don't
> like the idea of 100 orchestra members each downloading that huge thing,
> also enhanced with a few megabytes of lilypond source

Well, that’s mainly because you have a huge raster image in there :-)

To each their own; your reasons are as valid as mine depending on the
point of view.

> I would of course never urge anybody to get an IMSLP membership :-), but
> the fee is (un)reasonably small (a few collaboration actions for IMSLP
> would already suffice).

Are you spared the waiting time as an IMSLP contributor? I know I’m not.

> But in any case, 10 seconds delay would be dwarfed by
> the alternative of downloading and perusing 311 pages.

I guess it depends how they work; if that’s for printing individual
parts as two-sided booklets (for example with a spiral binding), your
approach is indeed the most convenient. If that’s for downloading
everything as quickly as possible and then being able to keep a copy
at hand, mine works.  (By the way, when it comes to “perusing 311
pages”, LilyPond also supports creating a table of content :-)

Cheers,
-- V.



Re: string-split procedure

2020-06-02 Thread Valentin Villenave
On 6/2/20, Thomas Morley  wrote:
> (string-split "root x 0 0 root /root /bin/bash" #\SPACE)

I think the recommended syntax is #\space (which is internally an
alias for #\sp if I understand correctly).

Cheers,
-- V.



Re: When (in seconds) does each page begin?

2020-06-02 Thread Valentin Villenave
On 5/30/20, Matt Wallis  wrote:
> But I'd still like to know how to find out when a page of a score begins

Well, there is something to be done with the 'page-number and
'rank-on-page properties, as demonstrated in this regtest:
https://git.savannah.gnu.org/cgit/lilypond.git/plain/input/regression/multi-measure-rest-reminder.ly

The problem is that the page-breaking algorithm runs fairly late in
the process, so whenever I try adding that to the aforementioned
Grob_metadata_engraver, either ly:grob-system doesn’t return anything
or it remains stuck on 0.  (The regtest I mentioned works around that
in a pretty convoluted way, by creating a new grob and then suiciding
it.)

You might want to have a look; maybe your guess’s gonna be better than mine.

Cheers,
-- V.



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-06-01 Thread Valentin Villenave
On 6/1/20, Rutger Hofman  wrote:
> And I could contribute a bit on techniques to have >2 voices per staff,
> rhythmically homophonic or rhythmically polyphonic, especially in the
> context of divisi staves.

That would certainly be interesting. As you can see in the patch I
posted earlier in this thread, I’ve just been adding some stuff to the
Notation Reference:
https://gitlab.com/lilypond/lilypond/-/merge_requests/91/diffs?view=parallel

There’s no “orchestral music” subsection in NR 2, like there is for
guitar music, percussion etc.; I don’t think it would be wise to have
one because it’s linked with numerous other sections (I could be
convinced otherwise, but I’m really not sure how there’s a reasonable
argument to be made here).

What I’ve been doing instead is use NR 2.1.6.1 (“References for opera
and stage musicals” which is the closest we have to an Orchestra
subsection, and I added a link to that at the very top of NR section 2
“Specialist notation”.

The other main area where we can document stuff is, obviously, NR
1.6.3 “Writing parts” (that’s where I’ve added a new subsection about
\compressMMRests a few months ago). And NR 1.6.2.3 “Hiding staves”,
which is what this patch addresses (on top of recent additions by Jean
Abou Samra).  If you have other ideas that fit well with our current
structure and guidelines, don’t hesitate to chip in.

> What would be the best venue for this? Lilypond docs? User list? Scores
> of Beauty? If it gets into the Lilypond docs, it is there to "stay
> forever" which would be nice.

Sure; you’d need to take into account the most recent version though,
and not what you can find on lilypond.org -- actually, I’ve just
uploaded a recent doc build (that includes my patch about divisi
staves) on
http://lilydoc.villenave.net/Documentation/notation-big-page.html
in case you want to check it out.

Now, depending on what you have in mind, a blog entry might be
preferable, particularly to show off large, beautiful examples.  (Jean
wanted a Berlioz fragment in the NR; that’s about the maximum we can
afford, and even then its source code is not quoted verbatim.)

On that note:

> One elaborate example of my experiences is found in the score and parts
> of "3 Bruchstücke aus Wozzeck" by Alban Berg, see
> https://imslp.org/wiki/Wozzeck%2C_Op.7_(Berg%2C_Alban)

I appreciate that you’re making available your source code, but you
could simply embed it within the PDF files (LilyPond can do that
now!).  See for example
https://imslp.org/wiki/Oboe_Concerto_No.1_in_E-flat_major_(Herschel%2C_William)
(btw, I generally prefer publishing all individual parts as a single
PDF; people can then print whatever they want within it, but it makes
it *much* easier for ensembles out there in my experience,
particularly when IMSLP starts imposing a 15-second delay for all
downloads.)

Cheers,
-- V.



Re: bach chorales

2020-05-31 Thread Valentin Villenave
On 5/31/20, Ph. Hezaine  wrote:
> The link
> http://superbonus.project.free.fr/spip.php?article48
> is up again but not all the site. For instance the midi files of
> Superbonus are missing.

Hey Phil,
good to know!  Thanks for bringing it back online in good shape.

> For Matt: If you want you can remove the git
> repository until the next time. Next months I'll try to update the
> lilypond version of the files but I can't promise at all.

Well, that can work either way; if other people have time to try and
update the source code, then perhaps you can in turn mirror _that_
updated version on your website.  (Same goes for your drum templates
and other works.)
Or you could even put these things yourself on a public git repo,
which could then be the reference branch for anyone out there (I have
no sympathy towards Github but fortunately there are other hosts
available.)

Anyway, there’s no emergency here.  Take care of what’s important in
your life, and feel free to come visit us on -user or -user-fr
whenever you get a chance to!

Cheers,
-- V.



Re: Text spanner with middle text

2020-05-31 Thread Valentin Villenave
On 5/31/20, James Worlton  wrote:
> Is there a way to do this using a single text spanner? I could probably
> fake it with 2 spanners, but would rather not if I didn't have to, since
> the positioning of the middle text would be trial and error.

Indeed.  But I think that if you’re looking for something simple, that
remains the easiest way by far:



\version "2.20.0"

insertTextSpan =
#(define-music-function (txt) (markup?)
   (make-music 'CrescendoEvent
   ; 'tweaks (list (cons 'font-shape 'upright))
   'span-direction START
   'span-type 'text
   'span-text txt))

{
  b1\insertTextSpan "poco"
  b
  b\insertTextSpan "a"
  b
  b\insertTextSpan \markup \bold "poco"
  b
  b\!
}



Cheers,
-- V.



Re: Fingering inside staff

2020-05-30 Thread Valentin Villenave
On 5/30/20, Thomas Morley  wrote:
> add-stem-support is not really documented.
> Alas, I've not the time and energy to write a patch myself and fight
> my way through the new GitLab process.

“Fighting your way” sounds pretty accurate these days.

If I may give it a try:
https://gitlab.com/lilypond/lilypond/-/merge_requests/109

Cheers,
-- V.



Re: Bar line definition with annotation

2020-05-30 Thread Valentin Villenave
On 5/30/20, Thomas Morley  wrote:
> Above means; at line-end use ||-bar, which has ||-span-bar.

TBH, the NR documentation isn’t entirely clear in this regard (I
remember having to go look at the source code to understand how it
actually works).

I’m submitting some additions to the Notation Reference manual,
including your nice example:
https://gitlab.com/lilypond/lilypond/-/merge_requests/102

Cheers,
-- V.



Re: Fingering inside staff

2020-05-30 Thread Valentin Villenave
On 5/30/20, Valentin Villenave  wrote:
> Excellent; NOTABUT then.

Ouch.  NOTABUG.  (Though I can’t say I wasn’t childishly tempted to
add an additional T :-)

V.



Re: Fingering inside staff

2020-05-30 Thread Valentin Villenave
On 5/30/20, Thomas Morley  wrote:
> Fingering.add-stem-support is per default set to 'only-if-beamed'

Of course!!  I vaguely remembered having come across something like
that.  Sorry for making a fool of myself.

> Try:
> \override Fingering.add-stem-support = #'()
> and it'll work

Excellent; NOTABUT then.

Thanks!

Cheers,
-- V.



Re: Fingering inside staff

2020-05-29 Thread Valentin Villenave
On 5/29/20, Pierre Perol-Schneider  wrote:
> Hi Simone,
> A basic solution:
> \relative c' {
>   \stemUp
>   \override Fingering.staff-padding = #'()
>   4 8 
> }

Sure there are workarounds, but: shouldn’t we be treating this as a
bug? There’s no obvious reason why unsetting staff-padding should be
ignored on a beamed note and not on an unbeamed note.



\relative c' {
\stemUp
\override Fingering.staff-padding = #'()
4 8
}

\relative c' {
\stemUp
  \override Fingering.staff-padding = #'()
  4 8 
}



I can’t find a glyph small enough to trigger it with other grobs
(a.k.a StringNumber, Script or anything else), so I can’t tell if it’s
limited to fingerings.

Cheers,
-- V.



Re: use variable out side procedure

2020-05-29 Thread Valentin Villenave
On 5/29/20, Ralf Mattes  wrote:
> No, no, no! While all the books you mention are very good books (even so
> very special) they are really bad books for smeone trying to learn Scheme to 
> get
> along with Lilypond.

Well, to each their own I guess.  Getting some useful basics in
programming has never hurt anyone; what I’d be more worried about is
that some of these deal with Scheme implementations other than Guile.

It’s a pity there’s a lot more nice documentation about Racket,
DrScheme, Chicken, even MIT Scheme, than about Guile’s dialect
specifically. In fact, Guile’s barely mentioned on schemers.org
although it’s been one of the most ubiquitous Scheme environment in
use for the better part of three decades.

Just to address f. Gilmore’s question, this has also been discussed
recently right here:
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00171.html
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00172.html
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00173.html
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00191.html

Cheers,
-- V.



Re: italian list or forum

2020-05-29 Thread Valentin Villenave
On 5/29/20, Federico Bruni  wrote:
> Next week I'll send a patch to update the website.

Great!  This should also appear in news-headlines, methinks.

Looking forward to seeing your patch!

Cheers,
-- V.



Re: use variable out side procedure

2020-05-29 Thread Valentin Villenave
On 5/29/20, Freeman Gilmore  wrote:
> But how do i get Z (or x) out side so i can use the variable?  for example:
> #(display Z)

You need to define it at the top-level; then you can change its value
using set!:



\version "2.20.0"
#(use-modules (ice-9 regex))

#(define Z '())

j =
#(define-void-function
  (x)
  (string>?)
  (set! Z x))

\j "-3 +8  -6+1-8"

#(display Z)



Cheers,
-- V.



Re: When (in seconds) does each page begin?

2020-05-29 Thread Valentin Villenave
On 5/29/20, Matt Wallis  wrote:
> BTW, I didn't see a vibraphone example. I scanned a few branches, but
> maybe I didn't try the right branch.

That’s the “pools” example.  You can try the following:

##

git clone https://gitlab.com/sigmate/lilypond-html-live-score

cd lilypond-html-live-score

python2 ./make-live-score -i examples/pools.ly -o pools.html \
  --ogg-vorbis-file=examples/pools.ogg --m4a-file=examples/pools.m4a

xdg-open pools.html

##

Cheers,
-- V.



Re: How to enter chords names in makam.ly

2020-05-29 Thread Valentin Villenave
On 5/28/20, prosfigaki80  wrote:
> Hi, I am writing music including makam.ly but chords names different from
> natural notes are not recognized by Lilypond

Greetings,
you’re right.  You can fix it by adding this at the top of your file:



\include "makam.ly"
#(set! language-pitch-names
   (append language-pitch-names
   (list `(makam . ,makamPitchNames
#(set! standard-alteration-glyph-name-alist
   (append standard-alteration-glyph-name-alist
   makamGlyphs))
\language "makam"



I’ll edit the makam.ly file itself to include that in the next LilyPond release.

Even with this modification, however, chord notation remains limited
for non-semitones accidentals: for example the following example works
(more or less) for NoteNames, but not very well for ChordNames:


music = { }

<<
  \new Staff \music
  \new NoteNames \music
  \new ChordNames \music
>>


Cheers,
-- V.



Re: When (in seconds) does each page begin?

2020-05-28 Thread Valentin Villenave
On 5/28/20, Matt Wallis  wrote:
> The output from event-listener is so close. I just need to get it to
> listen to the appropriate events ... if that is possible.

Then you should definitely have a look at the last link I sent
(lilypond-html-video); IIRC it uses a Scheme engraver (so no patching
Lily itself) to output svg with additional timing information encoded
as data- attributes for each rhythmic event. Then one can use that to
get a cursor, change CSS attributes on the fly (e.g. noteheads
opacity), switch from one page to the next, etc.  It’s still very much
WIP, but you can have a look at the examples (particularly the
vibraphone one) to get an idea.

I’m CCing Mathieu as it’s his project. Mathieu, you can read Matt’s
previous message here:
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00527.html

Cheers,
-- V.



Re: When (in seconds) does each page begin?

2020-05-28 Thread Valentin Villenave
On 5/28/20, Matt Wallis  wrote:
> I would like to obtain timing information to tell me at how many seconds
> into the score each page begins. I have had a go at this, and failed.

If you’re trying to make videos out of LilyPond scores, here are some
links for you:
https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00275.html
https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00276.html
https://lists.gnu.org/archive/html/lilypond-user/2017-11/msg00098.html
https://lists.gnu.org/archive/html/lilypond-user/2017-07/msg00234.html
https://gitlab.com/sigmate/lilypond-html-live-score

(That doesn’t answer your question, but others will certainly chime in :-)

Cheers,
-- V.



Re: Strange error from define-syntax

2020-05-28 Thread Valentin Villenave
On 5/28/20, John Schlomann  wrote:
> Thank you, David, for your quick response. I'm not sure what you mean by
> "stick to macros". I thought define-syntax was the way to define a macro.
> What am I missing?

I think David may have been referring to LilyPond macros; have a look
at that for example:
http://lilypond.org/doc/v2.21/Documentation/extending-big-page#interfaces-for-programmers

Cheers,
-- V.



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-05-27 Thread Valentin Villenave
On 5/27/20, Lib Lists  wrote:
> merge the stems so
> that the final result looks like one voice.

In that case, what you want clearly is \partcombine (\partCombine since 2.21).

If you have more than two voices, then you can always apply another
\partCombine on top of the first two voices, or use other tricks to
deal with the more complex situations.

> Finally, adding a \shortInstrumentName in the StaffGroup gives an
> error, but the resulting pdf is otherwise correct.

instrumentName and shortInstrumentName are both siple property
definitions, not variables or functions so the \ is not needed; just
 instrumentName = "something".

Cheers,
-- V.



Re: GitLab access

2020-05-27 Thread Valentin Villenave
On 5/27/20, Aaron Hill  wrote:
> I probably could have been (or rather should
> be) submitting patches for consideration.

Hear hear!  But as I said, helping out on the lists is certainly not
less worthy as a way of contributing.

> I went ahead and linked my GitHub with GitLab, so I am @seraku24 on both
> sites.

OK, so now you should be able to send a membership request directly
from GitLab (I’m CCing Jonas just so he knows whom it’s coming from).

Welcome onboard!

Cheers,
-- V.



Re: registering a composition

2020-05-27 Thread Valentin Villenave
On 5/27/20, Francesco Petrogalli  wrote:
> I am replying here in the middle of the thread, because I decided to
> opt for an open source license after reading the considerations in
> this email. The source is available here:
> https://github.com/fpetrogalli/trr

Hi Francesco,
That’s excellent news!  The score looks great, very groovy; the only
thing that’s missing, I think, is the date somewhere (in many
countries there are two things required for a copyright to be valid,
regardless of which license you may add on top of it: the author’s
name, and the publication year).

Good work, looking forward to hearing it and reading whatever you guys
come up with next!

Cheers,
-- V.



Re: GitLab access

2020-05-27 Thread Valentin Villenave
On 5/27/20, Aaron Hill  wrote:
> Apologies for hijacking the thread.

No apology needed.

> The link you provided worked for me
> without needing an account.  What level of access are you talking about?
>   Is it something a mere mortal like me (i.e. someone who is not
> currently a collaborator nor contributor) would need?

Well, you most certainly *are* a contributor judging by the number of
helpful replies, nifty tricks and brilliant snippets you post each
week on the list :-)
The GitLab pages are publicly accessible (and I strongly hope they’ll
remain so); with a GitLab account I *think* there are a few things one
can do (post comments? open issues? unsure), but being referenced as a
project member gives you more access, to take part in patch reviewing,
to be assigned some issues and to be more easily CC-ed in various
discussions.  I’d be delighted to see you get involved in that sort of
stuff, but that’s up to you of course!

Cheers,
-- V.



Re: Some new tutorials in Spanish

2020-05-26 Thread Valentin Villenave
On 5/26/20, Francisco Vila  wrote:
> I'd like to share my last attempt of a series of ultra-fast tutorials in
> Spanish.

That’s great! (At least, I’m sure it is :-)
BTW, if you have an account on GitLab, feel free to let us know so
that you can be added and gain access to the tracker, merge requests
and everything…

V.



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-05-26 Thread Valentin Villenave
On 5/26/20, Xavier Scheuer  wrote:
> I have used several times the technique mentioned on this list and
> documented only in the regression test ‘divisi-staves.ly’.

It may indeed be more useful if added to the NR; I’ve just written a
patch with that mind:
https://gitlab.com/lilypond/lilypond/-/merge_requests/91

BTW Xavier, if you have a GitLab account and whish to gain access to
the tracker and patch reviewing tool, please let us know!

Cheers,
-- V.



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-05-26 Thread Valentin Villenave
On 5/26/20, Lib Lists  wrote:
> For example, I'd start with the concertmaster's part, then duplicate
> it and edit it to generate the music the second soloist, then the
> other soloists, then desks, divisi and so on.

Greetings,
I wouldn’t recommend to “duplicate” any code. As Xavier said, you can
easily use multiple for files to enter variables containing music for
each instrument, then \include these files in a common file to
generate the full score or the set of individual parts. Even if there
are some differences needed, you can do pretty much anything with
different tags and then \keepWithTags or \removeWithTags as needed.

> The other option would be to create temporary staves when needed, but
> I'm not sure which one is the best strategy.

Generally speaking, Xavier’s trick is definitely what would be best
suited to that sort of situations. If you need advice on particular
cases, you’ll need to be more specific.

Cheers,
-- V.



Re: AW: Are Lilyponds beams thick enough?

2020-05-26 Thread Valentin Villenave
On 5/26/20, David Kastrup  wrote:
> 0.5 would likely result more often in beam thicknesses getting rounded
> up sometimes, down at other times, making for an uneven look after
> digitisation.

You’re right in theory, but that doesn’t sound like a convincing
argument within the LilyPond ideological framework. See for example
the debate we had in late 2007 for using slightly rounded barlines so
that music scores would appear more nicely in many PDF viewers; that
was dismissed by Han-Wen because the point of LilyPond is to produce
good print quallity, not to compromise and accommodate improper
software implementations.

If really needed, it could be .4999 or .51 or anything, but
Valentin’s (hee) point stands: .48 is perceptibly thinner than
most engraving practices. (I actually like his example of .55 much
more than I’d have expected myself to.)

Valentin (heyy), your question has actually been asked in the past for
what it’s worth:
https://lists.gnu.org/archive/html/lilypond-devel/2012-01/msg00265.html

Cheers,
-- (other) V.



Re: Identify included files

2020-05-25 Thread Valentin Villenave
On 5/25/20, R. Padraic Springuel  wrote:
> It depends on the state of the relative-includes variable.  If true, then
> paths are relative to the file in which the include statement appears.  If
> false, the paths are relative to the main input file.  Default behavior is
> false.

Careful, the default will be set to true from version 2.21.2 on:
https://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=16b5212f7c1745e14e29792fdcf7cb307bc23ad5

Cheers,
-- V.



Re: musicxml2ly

2020-05-25 Thread Valentin Villenave
On 5/23/20, Martin Tarenskeen  wrote:
>
> On Sat, 23 May 2020, Martin Tarenskeen wrote:
>> There must be something seriously broken if musicxml2ly can't convert
>> this
>
> P.S. I just tried downgrading to lilypond 2.19.84 (from Fedora repo) and
> the problem disappeared. So it does look like a regression to me.

Thanks Martin; I’ve opened this tracker page:
https://gitlab.com/lilypond/lilypond/-/issues/5994

It seems weird that such a problem wasn’t caught by our
pretty-extensive test suite, so I’m wondering what might be particular
to your test file.  (At any rate, this will need to be added to the
regtests once the problem’s been solved.)

Cheers,
-- V.



Re: bach chorales

2020-05-24 Thread Valentin Villenave
On 5/24/20, Ph. Hezaine  wrote:
> many thanks Valentin. It seems my precedent mail was not receipt.

Hey!!  Nice to hear from you Phil.  I hope your family’s all right,
and I wish your health gets better soon.  There are quite a few people
here and on -user-fr who’ll be delighted to exchange with you if/when
you find the time, energy and motivation to drop by… And as you can
see, your work continues to be appreciated after all these years :-)

Best wishes,

-- V.



Re: registering a composition

2020-05-24 Thread Valentin Villenave
On 5/24/20, David Kastrup  wrote:
> You are working from the premise that everybody except you is an idiot.

Guys, stop bickering and veering off-topic.  The original purpose of
this thread was to help Francesco gain some insight into the copyright
modalities and possible publishing choices; arguing about whether one
particular license authorizes or not to sell software and/or CDs
and/or services may be interesting (though I believe this has already
been discussed ad nauseam elsewhere, and by more knowledgeable people
than *any* of us) but it remains absolutely orthogonal to the matter
at hand.

Granted, I was probably the one who opened that can of worms in the
first place; although I do have my own principles and beliefs, the
only point I’ve been trying to get across is that Francesco has
_several_ options (and not that many risks), rather than the Single
Mandatory Way that’s ordinarily offered to authors and artists.

As far as I’m concerned, there is no invalid or morally corrupt choice
(even publishing under all-rights-reserved and subjugating oneself to
some private copyright organization), as long as it _is_ a choice,
made deliberately and not out of ignorance or fear.

Cheers,
-- V.



Re: bach chorales

2020-05-24 Thread Valentin Villenave
On 5/24/20, Andrew Bernard  wrote:
> Who are we to thank for this wonderful and useful work? I see the name
> Ph. Hardy in the score with an email. Is he still active?

It’s an alias of Philippe Hézaine, who was quite active on -user and
-user-fr a few years ago:
https://lists.gnu.org/archive/html/lilypond-user/2012-05/msg00169.html

You can find the sources and PDF for his edition of Bach’s Chorals
here, before his website got defaced:
https://web.archive.org/web/20160906112534/http://superbonus.project.free.fr/spip.php?article48

You can still find his other website here:
http://philippe.hezaine.free.fr/

The address given on that website doesn’t appear to be relevant
anymore, but you can find another one at the bottom of this page if
you want to try and reach him:
https://www.mutopiaproject.org/cgibin/piece-info.cgi?id=760

That being said, I can’t seem to find any recent traces of him online.
I hope he’s okay; I remember him as a very nice guy (from northern
France, I think), full of ideas and generosity; as an example, the
musical play he wrote is dedicated “To Richard Stallman; To the FSF;
To the LilyPond guys; To the Ardour guys; To food banks.” That doesn’t
sound like someone who would object to his work being copied and made
available online…

Cheers,
-- V.



Re: registering a composition

2020-05-23 Thread Valentin Villenave
On 5/23/20, Francesco Petrogalli  wrote:
> Hi Valentin - I am all new to these things and every time I look into
> this I get more confused.

No problem. (I’m adding back the list, just in case others may correct
me if I say something wrong and/or stupid.)

> Say I give a CC BY license to the work, and I publish it on github.
> Will I still be able to collect the royalties if someone plays it?

No. If that’s what you’re looking for, I think you should indeed
register with a Rights Management Organization (RMO): Ascap, BMI, or
any other one.  (Like I said, Ascap *used* to be one of the least
worst options.  Not sure nowadays; the race to the bottom rages on.)

Two reasons for that:
- first of all, if someone plays it then who’s going to tell you that
it’s been played somewhere? Who’s going to collect the money? That’s
what a RMO is for.
- second, if you choose a license such as CC-by, you’re giving many
authorizations to everyone: basically, all CC-by does is force them to
credit you as the author (or as a co-author, if they’ve modified your
original song to create a new work). So, you can’t _both_ authorize
people to copy, perform, and create modified versions of your work…
and forbid them from doing so unless they give you money.

A bit less open that CC-by, are “copyleft” licenses: CC by-sa, or the
Free Art License (http://artlibre.org/licence/lal/en/) which I
personally use.  They give the same permissions than CC-by, _but_ if
anyone creates copies or modified versions of your work, then they
have to share it under the same license as the one you’ve chosen
initially. Since traditional publishers and big media companies are
very reluctant to take any risk, that ensures that no “big” commercial
player is going to take advantage of your work.

Then, still a bit less open, are so-called “non-commercial” licenses;
CC-by-nc for example.  Their purpose is to give you even further
protection: you’re authorizing people to copy, perform and make
modified versions of your work, but ONLY in a non-commercial context.
The problem is that no one, so far, has any good legal (and
enforceable) definition of what “commercial” means; if a school
performs your song to gather money for a school trip, does that count?
 If someone plays it in the street, with a hat placed before them on
the sidewalk to encourage donations, does that count? etc.

Then, even less open, you have no-derivatives licenses: CC-by-nd.
This allows people to download and copy your work, but ONLY as you
published it in the first place: modifying it is not authorized by the
license.  Which is a problem when it comes to art; a music score, for
example, is bound to be reinvented and interpreted (which is to say,
“modified”) every time someone plays it.  And what about remix?  And
“theme and variations”, as composers used to do?  And musical quotes
(for example in jazz improvisations)?  There isn’t a single composer
in the 18th and 19th century who wouldn’t have ended up in jail (or in
debt) if the law had been what it is today: no more Bach turning
Vivaldi’s violin concertos into harpsichord pieces, no more Telemann,
well, at all; no more Ravel orchestrating Moussorgsky, and so on.

Note that I said “not authorized by the license”.  No matter the
license you choose, anyone can still get in touch with you, and
negotiate a “license exception”: some special, limited authorization
outside the license’s terms -- which you can grant if that person’s
offering you money, or if you decide to help them or whatever.

… BUT that last sentence only applies if you’re managing your rights
on your own. If you sign up with a RMO, then all bets are off; _they_
will decide for you which authorizations to give, how much money to
ask for, whom to sue in your name,… and you will have NO control
whatsoever over it.  (Most of the time actually, you won’t even know
what’s happening with your work until months later or even a couple
years after the fact.)

> I would feel too bad if the CC license on the PDF wouldn't allow
> me to record this with a band and register the recording (not the PDF
> itself) with ASCAP.

Unfortunately, that won’t work: imagine someone else, with another
band (or a guitar, or whatever) downloads your score and records your
song.  If _your_ recording has been registered with Ascap, that makes
this _other_ recording a counterfeit in their eyes, and they won’t
hesitate to sue them.  (Unless it’s a more famous and powerful band
already registered with another RMO or even with Ascap itself, in
which case you’d be surprised how fast they’ll let it slide and give
you mere pennies for your trouble).

Actually, it goes even further: since you’re not allowed to authorize
exceptions by yourself, YOU cannot even share copies of your own work
as freely as you’d want. You won’t be able, for example, to upload a
video of your song on YouTube without half a dozen of copyright robots
immediately complaining about “infringement”, demanding to slap ads on
it, or even to 

Re: italian list or forum

2020-05-23 Thread Valentin Villenave
On 5/22/20, Federico Bruni  wrote:
> Do you know how can I ask GNU to create a new mailing list?

LilyPond has currently four admins listed on Savannah:
https://savannah.gnu.org/projects/lilypond/
Han-Wen or David might be your best bet these days.

You can refer to this thread:
https://lists.gnu.org/archive/html/lilypond-devel/2009-12/msg00678.html

My advice would be to name your list lilypond-it like Paco did for the
Spanish-speaking list, rather than lilypond-user-fr which we’ve been
stuck with since forever. (I’m cc-ing him; maybe he’ll have more
insights for you.)

When your list gets created, of course you’ll need to update
Documentation/web/community.itexi, add an announcement to
web/news-new.itexi and a link to web/news-headlines.itexi so that it
appears on the front page.

In case you want to customize your mailing list’s HTML pages like I
did, here’s the templates I’ve made up (look at the source code):
http://valentin.villenave.net/upload/files/listinfo.html
http://valentin.villenave.net/upload/files/subscribe.html
http://valentin.villenave.net/upload/files/options.html
You can edit the templates for your list at
https://lists.gnu.org/mailman/edithtml/lilypond-it (or whatever your
list’s name will be).

You may also want to edit some of the translated strings in the admin
interface; I found that many of these were a bit confusing; again you
can compare
https://lists.gnu.org/mailman/listinfo/lilypond-user
with
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

Of course, you can also create a "forum" at Nabble afterwards, and add
the link to community.itexi (we have many, many inexperienced users
who use that for some reason; I never quite understood why).  In that
case, try to explain clearly to your new Nabble subscribers that they
actually need *two* subscriptions: one at Nabble, and one to the
actual mailing list.

Good luck!

Cheers,
-- V.



Re: italian list or forum

2020-05-22 Thread Valentin Villenave
On 5/21/20, Federico Bruni  wrote:
> What would you suggest to use?

Hey Federico,
in case you end up opening a GNU mailing list, may I offer you some of
my CSS overrides?

Before:
https://lists.gnu.org/mailman/listinfo/lilypond-user
After:
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

I’ll let you judge which one looks more welcoming :-)

Cheers!
-- V.



Re: registering a composition

2020-05-22 Thread Valentin Villenave
On 5/21/20, Francesco Petrogalli  wrote:
> In the spirit
> of open source, I initially wanted to use a CC-BY license on the work,
> then I read this and completely changed my mind.
> https://www.ascap.com/playback/2007/FALL/FEATURES/creative_commons_licensing,
> which somehow seems to contradict
> https://creativecommons.org/2010/06/30/response-to-ascaps-deceptive-claims/.

Uh, that’s the other way around.  The CC foundation has been trying to
counter the deceptive claims and outright lies spewed by the copyright
industry and its lackeys.

(To think that ASCAP once used to be the least worst option for
open-minded composers…)

Here’s where I can perhaps bring my own testimony, since I’ve created
some sort of a precedent by having some of my works performed in major
international venues *while* under copyleft licenses (including their
LilyPond source code).  What I opted for was individual handling of my
intellectual rights, since the various collective rights management
organizations in France are, in my view, not respectful enough of
citizenhood and democratic values (let alone any artistic or moral
integrity).

I did receive some legal threats, intimidation and what amounted to
racketeering.  Having done my homework in advance, I calmly asked them
to refer to the exact law articles (national and international) I was
operating under and get back to me.  Each time, I never heard back.
Meanwhile, not having intermediaries such as a third-party publisher
and a rights management organization to answer to, I was free to
contract directly with my commissioning structures and ask them for a
higher cut, while their own cost were lower.

Other benefits include a much closer relationship with music teachers,
small non-profit societies, musicians _everywhere_, librarians,
journalists, priests even (which is quite ironic as far as I’m
concerned), you name it.  Publishing under alternative licenses is an
ethical, human choice, which many people acknowledge and appreciate.

There are two caveats, however.

The first one is with regard to grants and subsides.  Although these
come from the government (local or national), they are generally
handled by private companies (namely, the so-called rights management
organization) and chances are that not subscribing to them will bar
you from ever getting any public sponsoring.  (Granted, the chances
are slim in the first place.)

The second one is that, for better and worse, these are indeed people
that have a very binary world view: you’re either with them, or
against them.  As soon as you’re branded as an enemy (a leftist in my
case), you can expect all sorts of pressure, all the more if you’re
starting to gain traction and artistic reputation.  Some of that
pressure is ridiculously obvious (menacing phone calls, legal threats,
see above); BUT some is much more sneaky: for example, I got blocked
twice on major projects that had _already_ been commissioned (though
the money hadn’t been delivered yet, obviously).  In the first case
the opera house’s accountant received some threats (subsides on an
other ongoing project were taken as hostage) and, as we all know, arts
programming is primarily handled by the accountants nowadays.  In
another case it was some political higher-up that picked up his phone,
asked for my head and got it immediately.

If I had to do it again, I most certainly would (and if anything, I’d
try to make even _more_ noise about it).  But it’s been, and has
remained, an uphill battle; one where you certainly can’t expect the
other side to ever “play fair” -- you are, after all, an existential
threat to all they’ve ever known and everything they’ve been making
profit of.

In the beginning, all I wanted was to spare future musicians the
hassle (the terror, really) that comes with sheet music photocopy in
all French music schools, and which any self-proclaimed “democratic”
nation should be ashamed of.  But the more I’ve discovered and the
more I’ve experienced the system from the inside (and by talking with
innumerable other composers who, just because they’ve once been silly
enough to sign up with a rights management organization, are now
feeling hopelessly trapped and taken advantage of, and look at my own
position with envy), the more I’ve been convinced that I’m, in all
respects (even my bank account, since that’s basically all what the
propaganda comes down to), on the right side of history.

Just my two cents :-)

Cheers,
-- V.



Re: bug in \caps

2020-05-22 Thread Valentin Villenave
On 5/22/20, Pierre Perol-Schneider  wrote:
> Hi Frédéric,
> See: http://lilypond.org/doc/v2.19/Documentation/changes-big-page.html

By the way Frédéric, do feel free to ask such questions on the
-user-fr mailing list (assuming your subscription is still active).
Both Pierre and I can be reached there, as well as a lot of
knowledgeable contributors and/or beginners (to whom accented
characters may be useful as well :-)

Cheers,
-- V.



Re: registering a composition

2020-05-21 Thread Valentin Villenave
On 5/21/20, Francesco Petrogalli  wrote:
> I have written it with lilypond, but it hasn't been performed yet. I
> wanted to secure the copyright before performing it. Given that there
> is no performing artist yet, there is no recording, so I cannot
> register it with ASCAP. Have I got this right?

No registration anywhere is needed to "secure the copyright". All you
need to have is a way of proving your anteriority if anyone were to
come and claim they’ve written it instead of you. There are several
commercial services that can do that for you (though many are scams),
but there are cheaper and simpler ways; a simple web search brought me
to the following page:
https://copyright.co.uk/legal-copyright-law.html

“““
It is essential to prove the date of creation of the work. An easy but
somewhat unreliable method consists of posting a copy of your work to
yourself in a sealed envelope just after completion, and never opening
it. The postal service’s date stamp will theoretically prove the date.
This can then be opened in the presence of a judge or solicitor for an
official confirmation of the date. For this to work, the envelope seal
must be intact and not appear to have been tampered with.
”””

Now, before even considering registering with ASCAP, you should
perhaps ask yourself if you’re _really_ sure that you want to publish
under "All rights reserved" (which would prevent a _lot_ of people
from simply performing your work). There are many alternative licenses
out there, that may authorize "not commercial" uses (whatever that
means), copying, or even making new works based on your work while
still having to credit you appropriately. I’m just saying that you may
want to give this at least a thought before closing that door forever.

Cheers,
-- V.



Re: Tone cluster

2020-05-20 Thread Valentin Villenave
On 5/20/20, Pierre Perol-Schneider  wrote:
> Anything better?

Nothing better. I was about to suggest using a modifier Arpeggio
stencil, but your solution is simpler and better.

I’m not really sure why you’d need a music function at all, though:



toneCluster ={
  \once \override NoteHead.stem-attachment = #'(0 . 0)
  \once \override Stem.length =
  #(lambda (grob)
 (- (ly:stem::calc-length grob) 4.5))
  \once \override Stem.thickness = #8
}

%% Test:
{
  a' \toneCluster  a' \toneCluster 
}



Now, there must be a way of doing that with \tweak, but I couldn’t find it.

Cheers,
-- V.



Re: Combining percussion parts in one staff

2020-05-20 Thread Valentin Villenave
On 5/20/20, Christopher R. Maden  wrote:
> ... I get rests scattered all over the place, not to mention redundant
> dynamics.  Is there a way to combine the different drum parts on one
> staff without engraving a terrible mess?

Well, I’m not gonna lie: that’s a tough one. That’s typically what
\partcombine (nowadays \partCombine) is for, but as we’ve seen over
the years, it’d take a substantial amount of effort to make that work
with \drummode.

The best and simplest way you can go, I think, is to decide with voice
is the "master" one, and use all the other voices only for notes but
neither rests nor dynamics:



bassMusic = \drummode {
  bd4 \f r bd r |
}

snareMusic = \drummode {
  r4 sn \f r r |
}

\score {
  \new DrumStaff = "percussion" <<
\bassMusic
\new minorDrumVoice \snareMusic
  >>
}

\layout {
  \context {
\DrumVoice
\name minorDrumVoice
\remove Dynamic_engraver
\remove Rest_engraver
  }
  \context {
\DrumStaff
\accepts minorDrumVoice
  }
}

%

I’m not saying it’s perfect, but it may be the simplest option. Now if
you need/want something more advanced, it can be done but not without
some hacks and some assembly required. Have a look at the following
example:



#(define (dynamic? x)
   (let ((name (ly:music-property x 'name)))
 (or
  (eq? name 'DynamicEvent)
  (eq? name 'AbsoluteDynamicEvent)
  (eq? name 'CrescendoEvent)
  (eq? name 'DecrescendoEvent)
  (eq? name 'SpanDynamicEvent

removeDynamics =
#(define-music-function (parser location m) (ly:music?)
   (music-filter
(lambda (x)
  (let ((tags (ly:music-property x 'tags))
(dir (ly:music-property x 'direction)))
(not (and
  (dynamic? x)
  (not (memq 'keep tags))
  (null? dir)
m))

makeRestsInvisible =
#(define-music-function (parser location m) (ly:music?)
   (music-map
(lambda (x)
  (if (and
   (music-is-of-type? x 'rest-event)
   (not (memq 'keep
  (ly:music-property x 'tags
  (skip-of-length x)
  x))
m))

makeNiceTogether =
#(define-music-function (parser location v0 v1 v2 v3)
   (ly:music? ly:music? ly:music? ly:music?)
   #{
 \new DrumVoice <<
   \removeDynamics \makeRestsInvisible $v1
   \removeDynamics \makeRestsInvisible $v2
   \removeDynamics \makeRestsInvisible $v3
   \removeWithTag #'rm $v0
 >>
   #})

keep =
#(define-music-function (parser location m) (ly:music?)
   #{ \tag #'keep $m #})

rm =
#(define-music-function (parser location m) (ly:music?)
   #{ \removeDynamics \makeRestsInvisible $m #})

bassMusic = \drummode {
  bd4 \f \rm r bd r |
}

snareMusic = \drummode {
  r4 sn \f r r |
}

\score {
  \new DrumStaff = "percussion"
\makeNiceTogether
  \bassMusic
  \snareMusic
  {} %% Extra voice if you need it
  {} %% Extra voice if you need it
}



(It’s a pity you’re running 2.18, as 2.20, and 2.21 even more so, have
some nifty shortcuts that could’ve made that syntax a bit more
concise.)

Now, every voice gets crunched together in a single voice, and the
rests get removed. Again, one of the voices acts as the master voice
and all its rests and dynamics are kept (except if you precede them
with the \rm command); reciprocally, all other voices get filtered
like in the previous example (but now the \keep command allows you to
select events that will be kept).

What you *could* do is insert all the definitions above in a .ly file
that you can then include at the top of your master file.

In another .ly file, you could write a dummy definition for rm and keep, such as

rm =
#(define-music-function (parser location m) (ly:music?)
  #{ $m #})

So when you need to compile your voices individually without changing
anything, you can \include the latter (dummy) definition file, but
when compiling the master file you can use the actual useful
definition file. (Unfortunately, the way LilyPond works means that you
can't currently use both at the same time.)

Cheers,
-- V.



Re: Rests vertical position problem

2020-05-19 Thread Valentin Villenave
On 5/19/20, Jacques Menu  wrote:
> This doesn’t change the position of the rests in measure 2, since there’s a
> single voice playing then.

Well, yes: as I said, it doesn’t work yet.  (And the way it’s
currently written, I suspect it would require some fairly substantial
changes.  Or perhaps a whole new Scheme engraver; I’m tempted to look
into it because it would certainly be quite useful.)

On 5/19/20, Jacques Menu  wrote:
> This dates back to four years ago, when I started working on xml2ly...
> Thanks for pointing this enhancement out!

Huh, the
\tempo "text" dur = bpm
actually dates back to 2008 (it was implemented by Reinhold precisely
for musicxml2ly, and then I added a few additional features a couple
years later).  It’s been available since 2.12.

Cheers,
-- V.



Re: Rests vertical position problem

2020-05-19 Thread Valentin Villenave
On 5/19/20, Jacques Menu  wrote:
> In the attached example, the \voiceOne and \voiceTwo commands used for the
> first score lead to the eigth rests in measure 2 to appear too high.

Well, it’s merely printed the way the source code’s requesting it.
\voiceOne rests are consistently placed at the top of the staff.

> Is there a way to use some equivalent of \voiceOne and \voiceTwo
> measure-wise in such a case, using it only in measures that have more than
> one voice playing?

I *think* your best bet would be to take a look at the
#Merge_rests_engravers (in scm/scheme-engravers.scm), which should be
able to handle that sort of case (I just checked; it currently
doesn’t). You could then \consist it into all your Staff contexts by
default.

By the way, why is xml2ly \tempo markup so convoluted when you could have simply

\tempo "" 4 = 110

(plus, it would remove the need for \markup \note, whose syntax has
recently changed.)

Cheers,
V.



Re: PNG generation ignoring color

2020-05-16 Thread Valentin Villenave
On 5/16/20, David Kastrup  wrote:
> Like the warning LilyPond prints out indicates, the X11 #rrggbb
> convention is not supported for specifying colors.  x11-color instead
> supports _named_ colors like "green".

Chris, you *could* simply change the definition or your function as follows:



color =
#(define-music-function (parser location color) (string?)
   (define (hexa->decimal x)
 (let ((num (string->number x 16)))
   (if (= 0 num)
   num
   (exact->inexact
(/ 255 num)
   (let* ((str (string-take
(if (string-prefix? "#" color)
(string-drop color 1)
color)
6))
  (r (string-take str 2))
  (g (string-drop (string-drop-right str 2) 2))
  (b (string-take-right str 2))
  (translated-color
   (map hexa->decimal
(list r g b)))
  (lily-color (primitive-eval
   (cons rgb-color translated-color
 #{
   %\override Staff.StaffSymbol.color = #lily-color
   \override Staff.LedgerLineSpanner.color = #lily-color
   \override Staff.Clef.color = #lily-color
   \override Staff.KeySignature.color = #lily-color
   \override Staff.TimeSignature.color = #lily-color
   %% Remove Staff. below to only affect individual voices:
   \override Staff.NoteHead.color = #lily-color
   \override Staff.Stem.color = #lily-color
   \override Staff.Flag.color = #lily-color
   \override Staff.Beam.color = #lily-color
   \override Staff.Accidental.color = #lily-color
   \override Staff.AccidentalCautionary.color = #lily-color
   \override Staff.Rest.color = #lily-color
   \override Staff.MultiMeasureRest.color = #lily-color
   \override Staff.MultiMeasureRestText.color = #lily-color
   \override Staff.MultiMeasureRestNumber.color = #lily-color
   \override Staff.Dots.color = #lily-color
   \override Staff.Slur.color = #lily-color
   \override Staff.PhrasingSlur.color = #lily-color
   \override Staff.Tie.color = #lily-color
   \override Staff.Script.color = #lily-color
   \override Staff.TextScript.color = #lily-color
   \override Staff.TupletBracket.color = #lily-color
   \override Staff.TupletNumber.color = #lily-color
   \override Staff.DynamicText.color = #lily-color
   \override Staff.DynamicTextSpanner.color = #lily-color
   \override Staff.DynamicLineSpanner.color = #lily-color
   \override Staff.Hairpin.color = #lily-color
 #}))



Cheers,
-- V.



Re: Resources For Learning Scheme?

2020-05-16 Thread Valentin Villenave
On 5/16/20, Caio Barros  wrote:
> I wasn't aware Urs wrote this book. This is very nice!

I agree.

Obviously one of the first places to check out is our in-house manual
(sadly still unfinished):
http://lilypond.org/doc/v2.21/Documentation/extending/

Cheers,
-- V.



Re: Page numbers

2020-05-16 Thread Valentin Villenave
On 5/15/20, brahim.pro  wrote:
> I would like to change the page number position. Now, it's in the left for
> right pages and on the right for left pages. I would like to put them always
> on the left. And I would like also to change its font size.

Greetings,
as Pierre explained, it’s handled by the evenHeaderMarkup and
oddHeaderMarkup variables, which are defined in a \paper { } block.

You can read more about it here:
http://lilypond.org/doc/v2.21/Documentation/notation/creating-titles-headers-and-footers#default-layout-of-headers-and-footers
However, the best thing to do is probably to go look by yourself in
the source files of your LilyPond installation, more precisely the
file titling-init.ly located in the subdirectory ly/.

Good luck!

Cheers,
-- V.



Re: Identify included files

2020-05-15 Thread Valentin Villenave
On 5/15/20, Fr. Samuel Springuel  wrote:
> Before I start writing a script to do this, is there an existing tool which
> will identify all the `\include` files that a LilyPond file depends on?
> Even better, one that will work in a recursive fashion?

Since 2.19.39, you can simply use this:

#(display (ly:source-files))

And you can even embed all the required source files into the PDF with:

#(ly:set-option 'embed-source-code #t)

Cheers,
V.



Re: is it possible to change midi channels in the middle of a song ?.

2020-05-13 Thread Valentin Villenave
On 5/13/20, Eby Mani  wrote:
> Is it possible to specify midi channel numbers for a given voice or switch
> channels in the middle of a song in lilypond ?.

That should be possible by just using
\set Staff.midiInstrument = #"something else"

You may need to adjust midiChannelMapping as well:
http://lilypond.org/doc/v2.21/Documentation/notation/midi-channel-mapping

Cheers,
-- V.



Re: Suggestion to make sharps and flats persistent

2020-05-13 Thread Valentin Villenave
On 5/13/20, Paul McKay  wrote:
> If I'm writing music in F, then I suggest that I be able to use *bF*  as a
> pitch instead of *bf*. The *F* would indicate that all subsequent *b*s
> would be flattened until one is encountered with a different accidental or
> until the end of the current music expression.

Interesting.  It’s never been The LilyPond Way® too assume what the
user means (much like you wouldn’t expect a simple notepad to fix your
spelling for you, although I’m sure Microsoft has thought of it at
some point).

Something similar to what you’re suggesting could be implemented
without modifying the parser, for example with a fairly simple music
function or a Scheme engraver:



persistentAccidentals =
#(define-music-function (music) (ly:music?)
   (let ((alt-alist '())
 (m (ly:music-deep-copy music)))
 (music-map
  (lambda (note)
(let ((pitch (ly:music-property note 'pitch))
  (force? (ly:music-property note 'force-accidental)))
  (if (ly:pitch? pitch)
  (let* ((alt (ly:pitch-alteration pitch))
 (n (ly:pitch-notename pitch))
 (o (ly:pitch-octave pitch))
 (mem-alt (assoc-get n alt-alist)))
(if (eq? force? #t)
(set! alt-alist
  (assoc-remove! alt-alist n))

(if (= alt 0)
(if mem-alt
(ly:music-set-property!
 note 'pitch
 (ly:make-pitch o n mem-alt)))
(set! alt-alist
  (assoc-set! alt-alist n alt))
  note))
  m)
 m))

\persistentAccidentals \relative c' {
  c des e fis g f e f! e d' g, d
}



#(define Persistent_accidentals_translator
   (lambda (context)
 (let ((alt-alist '()))
   (make-engraver
(listeners
 ((note-event engraver event)
  (let ((note (ly:prob-property event 'music-cause)))
(if (ly:music? note)
(let ((pitch (ly:music-property note 'pitch))
  (force? (ly:music-property note 'force-accidental)))
  (if (ly:pitch? pitch)
  (let* ((alt (ly:pitch-alteration pitch))
 (n (ly:pitch-notename pitch))
 (o (ly:pitch-octave pitch))
 (mem-alt (assoc-get n alt-alist)))
(if (eq? force? #t)
(set! alt-alist
  (assoc-remove! alt-alist n))
(if (= alt 0)
(if mem-alt
(ly:music-set-property!
 note 'pitch
 (ly:make-pitch o n mem-alt)))
(set! alt-alist
  (assoc-set! alt-alist n alt))
  note)

\score {
  \new Staff \relative c' { c des e fis g f e f! e d' g, d }
  \layout {
\context {
  \Voice
  \consists #Persistent_accidentals_translator
}
  }
}



V.



Re: Off-topic: BeOS and Haiku (was Re: Your Bespoke Lilypond Environment)

2020-05-08 Thread Valentin Villenave
On 5/8/20, Aaron Hill  wrote:
> I have to commend the Haiku team for having the
> dedication to preserve what they could from the BeOS world.

Well, yes and no. They managed to maintain binary compatibility for an
impressively long time, but the need for newer GCC versions and 64-bit
arch means that ship has more or less sailed in recent years.

That being said, they *did* recompile whatever they could get the
source code for, and reimplement quite a few things from scratch
(starting with, er, the whole frigging OS and GUI).

> I might just have to spin up a VM now.

If you can afford it, it does run quite well on bare metal as well (I
spend nearly half of my computer time on native Haiku). For me the
game-changer was the introduction of their package management
infrastructure: it’s very simple (some may say basic) but efficient
and rather well thought-out, both for system upgrades and
installing/removing stuff with dependencies etc.

Yes, the lack of LilyPond (or TeX) is a pity (though as a command-line
app, running it remotely is quite affordable). But Frescobaldi works
well, and I can do nearly everything I need on Haiku. There is still
the occasional system crash (KDL), but it happens at least four or
five times less often than it used to. The rest of the time it’s an
absolute delight to work with.

Cheers,
-- V.



Re: horziontal spacing in chants

2020-05-07 Thread Valentin Villenave
On 5/7/20, Christian Masser  wrote:
> I am currently working on my Master thesis and would like to show parts of
> gregorian chants in modern notation for comparison purposes.

Greetings, good luck for your thesis!

> Is it possible to get the note heads even closer together, so that they are
> kind of glued together? Probably someone did this before but I wasn't able
> to find it yet.

Well for once, you could use \omit rather than \hide, since with \hide
the graphical objects still take up horizontal space. Next you can
shrink the NoteHead object’s horizontal extent (rather than the
BarLine), but the results will look quite ugly quite fast,
particularly with regard to the lyrics:



spiritus = \relative {
  \time 1/4
  \override Lyrics.LyricText.X-extent  = #'(0 . 3)
  d'4 \tuplet 3/2 { f8 a g } g a a4 g f8 e
  d4 f8 g g8 d f g a g f4 g8 a a4  s
  \tuplet 3/2 { g8 f d } e f g a g4
}

spirLyr = \lyricmode {
  Spi -- ri -- _ _ tus  _ Do -- mi -- ni  _ re -- ple -- _ vit _
  or -- _ bem _  ter -- ra -- _ rum, al -- _ _ le -- _ lu
  -- _ ia.
}
\score {
  \new Staff <<
\new Voice = "chant" \spiritus
\new Lyrics = "one" \lyricsto "chant" \spirLyr
  >>
  \layout {
\context {
  \Staff
  \remove "Time_signature_engraver"
  %\override BarLine.X-extent = #'(-1 . 1)
  \omit Stem
  \omit Beam
  \omit BarLine
  \omit TupletNumber
  \override NoteHead.X-extent = #'(-0.1 . 0.1)
}
  }



Cheers,
-- V.
}



Re: [bug] 2.20.0 -> 2.21.1 Multi_measure_rest_engraver

2020-05-06 Thread Valentin Villenave
On 5/6/20, Trevor Bača  wrote:
> The following MWE works under 2.20.0 but crashes LilyPond under 2.21.1.

Wow, that’s a nice one. I’m marking this as Critical because its a/ a
segfault, b/ a regression and c/ not that unusual a use case.
https://sourceforge.net/p/testlilyissues/issues/5964/
Since it got broken recently, that should be fairly easy to bisect.

Cheers,
-- V.



Re: Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Valentin Villenave
On 5/4/20, Mats Bengtsson  wrote:
> What was the rationale to recommend (and only mention) \compressMMRests
> instead of \compressEmptyMeasures in
> http://lilypond.org/doc/v2.21/Documentation/notation/writing-rests#full-measure-rests?

Well, precisely the fact that \compressEmptyMeasures is applied
blindly to all objects, not just rests.
https://sourceforge.net/p/testlilyissues/issues/3687/
https://sourceforge.net/p/testlilyissues/issues/4375/

> In my opinion, it's a bit more cumbersome to use the music function
> syntax than the macro \compressEmptyMeasures

I actually agree. Having to wrap stuff into a music function doesn’t
make things easier.

In fact, \compressFullBarRests (or \compressEmptyMeasures) was no
longer explained nor mentioned *anywhere* as soon as
\compressMMRests{} was implemented, which is why I thought it should
deserve a proper explanation in a subsection of its own.

Besides, the similarity between \compressEmptyMeasures and
\compressMMRests remains unfortunate and prone to confusion. (I
actually toyed with the idea of naming one of them
\contractEmptyMeasures, then opted against it.)

> The situation with multi-measure note
> durations, described in your new subsection, should be extremely rare in
> practice

Apparently this may occur in some old editions. Can’t say I’ve ever
encountered one myself.

Since you’re much more experienced than I am in dealing with newcomers
and fundamental ease-of-use, please feel free to suggest what sort of
implementation may make things easier.

V.



Re: lilybin

2020-05-04 Thread Valentin Villenave
On 5/3/20, Kevin Barry  wrote:
> I was able to find the broken link in our unstable documentation
> version. It looks like it's a bug arising from a switch to https (this
> link was probably changed unintentionally).

Indeed. Thanks Stefan, I’ve just pushed a fix and it should appear on
the next website update!

Cheers,
V.



Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Valentin Villenave
On 5/3/20, Paul Scott  wrote:
> Out of simple curiosity what is the purpose of the \compressMMRests { }
> structure rather than the \set or \override action I would think of?
> I'm guessing \compressMMRests does \set \unset or \override \revert pairs.

As you can see if you open the music-functions-init.ly file in your
LilyPond installation, it’s a fairly simple music function that relies
on the skipBars property:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/music-functions-init.ly#n313
As does compressEmptyMeasures, formerly compressFullBarRests -- but
these are just a mere override:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/property-init.ly#n168

Now, your question is exactly why I felt the need to add a whole new
subsection to the Notation Reference:
http://lilypond.org/doc/v2.21/Documentation/notation/writing-parts#compressing-empty-measures
I hope this can answer your question (as well as the rationale behind
the renaming of FullbarRests into EmptyMeasures); please do tell us if
that seems unclear to you or if you have some suggestions to improve
that part of the documentation.

Cheers,
-- V.



Re: Lilypond svg output to stdout?

2020-05-03 Thread Valentin Villenave
On 4/30/20, David Wright  wrote:
> On Thu 30 Apr 2020 at 21:58:28 (+0200), Marcel Aartsen wrote:
> I don't think you can use stdout itself, as LP already uses it.

Well, there *used* to be some work towards something like that; see
the framework-socket.scm file in LilyPond’s source code…

> I haven't tested whether LP *insists* on adding an .svg extension.

It does, but that can be overriden:
https://lists.gnu.org/archive/html/lilypond-user/2019-12/msg00414.html

Cheers,
-- V.



Re: Scores for piano four hands

2020-04-23 Thread Valentin Villenave
On 4/18/20, Stephan Schöll  wrote:
> Have there been any functionality increments in
> Lilypond regarding this task, or would you still recommend the same
> procedure? (2 scores, merge them with pdftk)

As far as I know there’s still no native support for that sort of
thing (except perhaps a very complicated setup with \skipTypesetting
on a page-per-page basis, which would be a nightmare to get right
anyway).

You’re better off with the two-scores approach, I think (the only
difference being that I’d use pdfseparate and pdfunite which are both
lighter than pdftk…).

Cheers,
  - V.



Re: Manual in the terminal

2020-04-23 Thread Valentin Villenave
On 4/17/20, foxfanfare  wrote:
> I know you can access to the manual page inside a terminal with "info
> lilypond", but I was wondering if there was also a similar option available
> to access the "internal documentation"

Well, I suspect what you want is `info lilypond-internals’. In fact,
in addition to `info lilypond’, you have:

`info lilypond-essay’
`info lilypond-learning’
`info lilypond-usage’
`info lilypond-notation’
`info lilypond-extending’
`info lilypond-internals’
`info lilypond-contributor’
and even:
`info lilypond-web’
and
`info lilypond-changes’

Cheers,
V.



Re: edit to Lilypond wikipedia article

2020-04-19 Thread Valentin Villenave
On 4/17/20, David Olson  wrote:
> If some of you take a look and make changes
> (or instruct me to do so), it can be better.

How about mentioning lilypond-book first?

Perhaps the paragraph could open with:
"""
An integration with various document formats (not only [[TeX]]-based
systems such as [[LaTeX]] and [[Texinfo]], but also [[DocBook]] and
[[HTML]] pages) is natively supported through the companion program
lilypond-book, developed and maintained by the LilyPond
community.{{Cite web
| url = http://lilypond.org/doc/latest/Documentation/usage/lilypond_002dbook
| title = LilyPond Usage manual
| author = LilyPond community,
| year = 1996-2020.
}} This allows to embed musical elements within texts, such as
musicology, song booklets, work sheets for teaching, and school
examinations. Another solution to integrate various musical elements
(music symbols, song lyrics, guitar chords diagrams, lead sheets,
music excerpts, guitar tablatures, or multi-page scores) within
documents has appeared more recently in the form of lyLuaTeX, a LuaTeX
package that includes features for matching layout and appearance of
the musical elements with the surrounding text
document.etc.

By the way, since lilypond-book isn't geared only towards LaTeX, you
may want to make the subsubsection title a bit more general:
"Integration into text documents" or something like that.

Cheers,
V.



Re: RemoveEmptyStaves doesnt remove percussion staff

2020-04-19 Thread Valentin Villenave
On 4/16/20, neuro黃學仁  wrote:
> How can one remove the empty percussion staff in Grandscore?
> The \RemoveEmptyStaves seems not working on percussion staff.

Greetings,
here is a solution:



\layout {
  indent = 2.6\cm
  short-indent = 1.6\cm
  \context {
\Staff
\RemoveEmptyStaves
  }
%% You need to add this:
  \context {
\DrumStaff
\RemoveEmptyStaves
  }
}



Cheers,
V.



Re: Libraries (was: Re: Read git tags using Scheme)

2020-04-19 Thread Valentin Villenave
On 4/18/20, Noeck  wrote:
> It could not adapt this to my situation:
> https://stackoverflow.com/questions/11961400/getting-rid-of-git-usr-local-lib-libz-so-1-no-version-information-available
> Any idea about this?

Well, the easiest solution I found was to compile LilyPond myself.
Not, however, that this message doesn’t prevent Scheme from executing
whatever system calls you want.

Cheers,
V.



Re: SVG style and contributing barrier to entry

2020-04-19 Thread Valentin Villenave
On 4/16/20, Werner LEMBERG  wrote:
> Well, you just *did* submit a patch, and I'm going it to apply soon.

Indeed; initiating, or taking part in, discussions on some of our
mailing lists (or forums) is a pretty easily-achievable first step.
LilyPond (like most Free Software projects, and perhaps even more so)
is a community-driven process where there’s no distinction whatsoever
between users and contributors, and where the former are warmly
encouraged to act as the latter whenever they feel like it. (In this
regard however, Patrice’s referring to messages from the bug list as
`spam’ does make me feel a bit uncomfortable.)

Patrice, since you appear to speak French and to possibly be looking
for a lower-volume LilyPond mailing list, I’d be remiss in not
reminding you about our French-speaking list, where you’d be happily
welcome to post any questions, answers, suggestions or contributions
to both the program and its documentation:
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

Cheers,
V.



Re: SystemStart changes after stop/startStaff - how to get it back

2020-04-12 Thread Valentin Villenave
On 4/12/20, Thomas Morley  wrote:
> Over the last decades I tried again and again to find a better
> workaround, with less manual work.

Apparently we stumbled upon your white whale :-)

> I now come up with the attached.

Brilliant.  Although it’s still a workaround.

> To get the gaps in container-contexts one would need to drop the
> relevant commands. No manual figuring out any values (apart from the
> width of the gap).

And even that may not be indispensable; AFAIK that’s not something
ever required when dealing with mono-staff systems.

The nicer implementation I can think of would be to have some
\stopSystem \startSystem switch (possibly with the corresponding new
event interfaces as well), with the latter reprinting all system-start
grobs (possibly sans BarNumber). It may be cleaner that way so that
the system delimiter engraver doesn’t need to bother which staves are
or aren’t stopped at the given moment.

That being said, I do realize that it would imply extending, and
rewriting considerable parts of, the engraver.

> I'll continue research after some break ;)

Thanks for looking into it! Should we open tracker pages meanwhile?
(The SystemStart 'brace thing looks like an intrinsically different
issue.)

Cheers,
V.



Re: SystemStart changes after stop/startStaff - how to get it back

2020-04-12 Thread Valentin Villenave
On 4/12/20, Thomas Morley  wrote:
> Hi,
> The SystemStartBrace vanishes after stop/startStaff.

Weird.  That’s definitely an unwanted behavior (in other words, a bug).

> consider the following code:
>
>
> mus = \new Staff { R1 \break R \stopStaff s \startStaff R \break R \break R
> }
>
> \new StaffGroup
>   \with {
>   systemStartDelimiterHierarchy =
> #'(SystemStartBracket (SystemStartBrace a b c))
>   }
>   << \mus \mus \mus >>
>
>
> I'm at a loss here, it does not work out of the box for every version
> from 2.12.3 up to master.
>
> Any chance to get the additional SystemStartBrace back?

Your guess is as good as mine.  I wonder if it’s because the
\stopStaff triggers the engraver’s 'finalize' step, where the nesting_
list gets deleted:

// system-start-delimiter-engraver.cc

void
System_start_delimiter_engraver::finalize ()
{
  if (nesting_)
{
  nesting_->set_bound (RIGHT,
   unsmob (get_property
("currentCommandColumn")));
  nesting_->set_nesting_support (0);

  delete nesting_;
}
}

But I’m obviously talking out of my arse here.

Cheers,
V.



Re: Get current staff size

2020-04-10 Thread Valentin Villenave
On 4/10/20, Kevin Barry  wrote:
> As it happens, I found another solution

Good job!

Now, if you’ve found a solution with which you’re happy, could you try
and build a nice snippet for the LSR?  (Explaining why this is useful,
and why it’s tricky to achieve.)  It may help people who’d stumble
upon the same question in the future.

Cheers,
V.



Re: Proposal: Changing tremolo beam gap implementation

2020-04-10 Thread Valentin Villenave
On 4/9/20, Thomas Morley  wrote:
> https://lists.gnu.org/archive/html/lilypond-user/2020-04/msg00160.html
> It's ofcourse a workaround, but usable, afaict.

Could it be worth mentioning on the tracker page for #704/#3143/#318/whichever?

Cheers,
V.



Re: Coda / split staff

2020-04-10 Thread Valentin Villenave
On 4/9/20, Pierre Perol-Schneider  wrote:
> Dear Harm et all,
> Would you mind putting the following snippet to the LSR?
> Originally:
> http://lilypond.1069038.n5.nabble.com/Appending-coda-on-last-line-td44971.html#a44972

Or some version of the latest update:
http://lilypond.1069038.n5.nabble.com/Appending-coda-on-last-line-td44971.html#a156311
https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01027.html
I tried to make it fit into fewer LOC but it doesn’t seem possible…)

V.



Re: Get current staff size

2020-04-10 Thread Valentin Villenave
On 4/9/20, Kevin Barry  wrote:
> Is there a way to obtain the current value of the staff size as set
> with set-global-staff-size (or the layout version)?

Would something like that help?

%%%

  \applyOutput Staff.StaffSymbol #(lambda (grob org cur)
   (ly:message "\nCurrent staff size is: ~a\n\n"
(* 4 (ly:output-def-lookup
 (ly:grob-layout grob) 'staff-height \new Staff { b }

%%%

Cheers,
V.



Re: Your Bespoke Lilypond Environment

2020-04-08 Thread Valentin Villenave
On 4/7/20, Karlin High  wrote:
> DDR-SDRAM sure beats having to say
> "double data rate synchronous dynamic random access memory."

Here I was, thinking that these memory cards were all from East-Germany… :-)

As for OP’s request, it depends whether I’m on tty or graphical
interface. In tty mode, emacs is my main LilyPond environment (vi only
for small quick edits, as I never took the time to learn more useful
macros). In another tty, I have lilypond running on a loop on the same
file, so that I don’t have to relaunch it myself. (For large scores
with several dozen thousands LOC, there is a 20s time-lag between my
edits and the compilation result, but I’ve learned to live with it.)
And occasionally I switch to a graphical tty (used to be fbdev,
nowadays it’s wayland) where I have a full-screen pdf viewer opened
(possibly zathura).

When I’m not in tty mode, I only use Frescobaldi now (it’s _extremely_
well-thought, even for power users).

The other environment I tend to use is… an Android cell phone. I used
to have lilypond running in a full GNU/Linux chroot, and I kept
switching between vi in a terminal and an Android-provided PDF viewer
(MuPDF). I ended up getting rid of my 1GB chroot image, and I only use
Termux instead; LilyPond is more or less impossible to build in Termux
(not for lack of trying, believe me), but I only ssh to my proper
GNU/Linux server and work from there (with, again, lilypond running in
a loop). I’ve typeset entire scores on a 4-inch entry-level Chinese
ARM phone (sometimes even without a bluetooth keyboard, which, why
yes, is bordering on insanity).

The other desktop environment I happily use is Haiku (haiku-s.org);
LilyPond is again not available (but could conceivably be ported, as
most of the toolchain is already there; as of now I’m stuck at the
TeX/mf requirements). But I still can ssh into my server so that’s not
a problem; besides Frescobaldi _is_ available under Haiku, and can
very easily be installed (with minor adjustments) through pip. Now,
_that’s_ bespoke if nothing else!

V.



Re: lilypond score in youtube video

2020-04-08 Thread Valentin Villenave
On 4/8/20, Martin Tarenskeen  wrote:
> I now have found my own workflow

Well, do feel free to share :-)

Cheers,
V.



Re: [Off-topic] A question about opera scores

2020-04-01 Thread Valentin Villenave
On 3/30/20, Daniel Rosen  wrote:
>> do you as a conductor
>> prefer to see the vocal parts above the strings,
>> or within the strings
>> (between the violas and
>> cellos)?

Greetings,
I personally always put the vocal parts above the strings.  IMO the
only case where it’s still making any sense to mix them in between the
cellos and violas, is when you have bass figures just below the cello
line (and likely no separate staff for double bass).

At least one conductor thanked me for printing the score that way.
(but, YMMV :-)

Cheers,
V.



An exciting new release… of Sibelius!!!

2020-03-27 Thread Valentin Villenave
Hi everybody,
I know it’s off-topic but I wanted to share the news because, let’s be
honest, nobody in their right mind would want to miss it:
Yes!  It’s finally here!  The latest and brightest version of Sibelius
is out…  *And* it offers one particularly exciting, exclusive new
feature:
https://is.gd/x16C0B

… Oh wait, that’s the wrong link.  There you go:
https://is.gd/ussdKG

Seriously guys, how cool is that??

Cheers,
V.



Re: divisi music for one measure

2019-04-05 Thread Valentin Villenave
On 4/5/19, N. Andrew Walsh  wrote:
> How can I keep this phrasing slur where
> it is, when the lyrics in both voices terminate on a note tied to that f4.
> in Bar 8?

Greetings Andrew,
I’m not sure what’s happening there (an example would be helpful):
phrasing slurs entered as \( \) are not supposed to affect lyrics.
(That’s the point of using these instead of slurs entered with
parentheses.)

If there’s a hyphen error, then most likely your syllable count has
changed somewhere due to your tricks with associatedVoices, and
therefore no longer matches the notes.

As far as slurs go, you may be interested in various useful hacks, for
example using the empty chord <> as an anchor in case you need to
switch between mono- and polyphonic constructs:

{
  g'1\(
  << {a'2 b'} \\ fis'1 >>
  <>\)
  d'1
  b\( <>\)
  << {e'2 fis'} \\ cis'1 >>
}


And by the way, one last thing: I noticed in your first post that you used
 \markup { 1. Was}
for the beginning of your German lyrics. There are less complicated
possibilities, for example
 "1. Was"
or
1._Was
(ok, that last one is sort of a hack).
My point is, you could prefer using \markup for cases where adding
formatting is required, for example in this case:
\markup { \small \number 1. Was }

Cheers,
V.

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


A LilyPond Café in Paris

2019-04-05 Thread Valentin Villenave
Greetings everybody,

just to let you know that a French contributor, Mathieu Demange, has
managed to put together a LilyPond event tomorrow in Paris:
https://lists.gnu.org/archive/html/lilypond-user-fr/2019-02/msg00178.html

We’re hoping that it can turn into a regular event; at the very least
the location that’ll be hosting it is quite enthusiastic and willing
to help us make it so. (It’s taking place at the Musical Library in
Forum des Halles, dead center of Paris where all subway and train
lines converge. Which is to say, no one could ever dream a more
suitable place.)

Quite a bunch of French-speaking users and contributors are expected
to attend; among others, long-time developer John Mandereau is said to
drop by, as well as Pierre Perol-Schneider who’s also active on
English-speaking lists, and many others (among whom yours truly).
Offered as a "free buffet" from 3 to 6pm, this event welcomes both
hardcore LilyPonders doing quite complicated things, as well as mere
beginners or simply curious people interested either in music or nifty
pieces of Free software (ideally in both). There should be some short
lectures, as well as more informal exchanges, Q. sessions, demos,
tutorials and so on.

I’ll let you know how it went, but hopefully this can set a precedent
and possibly provide some kind of a roadmap for other people to
organize similar events elsewhere in France and other countries!

Cheers,
V.

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


Re: divisi music for one measure

2019-04-04 Thread Valentin Villenave
On 4/4/19, N. Andrew Walsh  wrote:
> how do I ensure that only the lyrics in \altvocoLyricsSop get
> attached to it, then resume following \voceMusicSop afterwards?

You can \set the associatedVoice property to another Voice’s name
whenever you want; see
http://lilypond.org/doc/latest/Documentation/notation/common-notation-for-vocal-music#aligning-lyrics-to-a-melody

Good luck!

Cheers,
V.

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


Re: Adding parallel thirds to the notes of a melody

2019-04-03 Thread Valentin Villenave
On 4/3/19, Gianmaria Lari  wrote:
> I don't have lilypond programming experience and I would like to know:
> - if there are hidden mistakes

No, that’s quite clean actually!

> - if it is better to write the function in a different way

I think in this case, simpler is better.

> - how I could avoid to write \voiceOne in \test {\voiceOne a b c'}

Just invert the order of the arguments to \partCombine: first the
uppermost (transposed) music, then the original music.

> - how I can encapsulate scale, inside the "test" function

You can use a "local" (which means temporary, just for the scope of a
single function) variable, defined with "let":


\version "2.21.0"
test  =
#(define-music-function (music) (ly:music?)
   (let ((scale #{ c d e f g a b #}))
 #{
   \partCombine
 \modalTranspose c e $scale $music
 $music
 #}))

\test { a b c'}



See "Local Bindings" in
https://www.gnu.org/software/guile/manual/html_node/Local-Bindings.html#Local-Bindings

Cheers,
V.

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


Re: treble and bass clef simultaneously

2019-04-02 Thread Valentin Villenave
On 4/2/19, Werner LEMBERG  wrote:
> Can you suggest a (possibly read-only) property or properties that
> could be easily added to either the `Clef' or `NoteColumn' grob on the
> C++ side, and which would considerably simplify the code?

Hi Werner,
upcoming new features notwithstanding, could you point me to the
latest version of that nifty workaround, so that I may update the
existing LSR snippet or (perhaps preferably) post a new item on the
LSR?

That looked quite interesting but I lost the thread at some point…

Cheers,
V.

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


Re: lilypond 2.21 & scheme unbound variable

2019-04-01 Thread Valentin Villenave
On 4/1/19, Valentin Villenave  wrote:
> You just need to first define the number-or-markup? function, which
> isn’t included in Scheme or in LilyPond out-of-the-box

… Actually, you’d better use integer-or-markup? which _is_ provided,
and which would be more appropriate for fingerings anyway.

Just replace number-or-markup? with integer-or-markup? in your
newFinger definition, and you won’t need anything else.

Cheers,
V.

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


Re: lilypond 2.21 & scheme unbound variable

2019-04-01 Thread Valentin Villenave
On 4/1/19, Gianmaria Lari  wrote:
> How can I fix it?

You just need to first define the number-or-markup? function, which
isn’t included in Scheme or in LilyPond out-of-the-box:

#(define (number-or-markup? x)
   (or (number? x) (markup? x)))

Cheers,
V.

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


  1   2   3   4   5   6   7   8   9   10   >