Re: Spacing between staves

2024-04-25 Thread Michael Werner
Hi Peter,

On Thursday, 25 April 2024 09:44:56 EDT Peter Mayes wrote:
> What I want is for the second movement, on the second page, to have
> slightly increased vertical spacing between staves. (It has 32nd and
> even a few 64th notes, and just looks a little "bunched up" to my eyes.)
> 
> I can only see ways to set the vertical spacing globally in the \paper
> block.

You can indeed accomplish this, with a little bit of rearranging. \paper blocks 
can go a few 
different places, one of which is a \bookpart  And as \bookparts are by default 
separated 
by a page break, and you are (apparently) wanting a page break between the two 
movements, this is a bit of two birds, one stone thing here.

Basically, put each movement into it's own \bookpart. You can then give each 
movement 
it's own paper block, while still having a global paper block if you want one. 
The bookparts 
will also take care of the page break for you, so that can be removed. You'll 
end up with a 
structure something like:

\version "2.24.1"

\paper { global \paper settings }

FirstMovement = { ... }

\bookpart {
  \paper { \paper setting specific to the 1st movement }
  \score {
\new Staff { \FirstMovement }
\layout {}
  }
}

SecondMovement = { ... }

\bookpart {
  \paper { \paper setting specific to the 2nd movement }
  \score {
\new Staff { \SecondMovement }
\layout {}
  }
}

\bookpart sections can have their own \paper block, even their own \header 
blocks. For a 
bit more see:
https://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book[1]
-- 
Michael


[1] 
https://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book


signature.asc
Description: This is a digitally signed message part.


Re: Horizontal note spacing in chant template

2024-04-17 Thread Michael Werner

Hi Richard,

On 2024-Apr-17 06:45, rich...@oneill-griffiths.net wrote:


Hi, I’ve been using the Anglican chant template to set items for our choir and 
I’ve just a note spacing problem with one chant (Walford Davies) last quarter.

How do I address the note spacing for the B/C clash in the 3^rd bar?

Now if there’s also an easier way to show that voice split in the tenor part, 
I’d appreciate it.



Probably better ways to go about this, but what I came up with is to change the 
tenor part to:

TenorMusic = \relative { g1 af2 c2 c2 \new Voice = "melody" { << \new Voice { 
\voiceFour \once \override NoteColumn.force-hshift = 1.2 bf4 af4 g1 } { \voiceOne c2 c1 } >> } }

This results in:

--

Michael



OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: afterGrace, glissando, and hidenotes

2024-04-12 Thread Michael Werner
Hi Walt,

On 4/11/24 13:11, Walt North wrote:
> Hello, I would appreciate some help with this music function.
>
> The end goal is have a define function produce a glissando after a
> note going either up or down to undetermined second note.  For
> example a guitar slide down off the note.

If I'm understanding correctly what you're after there's an existing
function for this. Have a look at:
https://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-as-curves#index-fall-1
As an example:

\version "2.24.2"

musicOne = \relative c'' {
r4 c4\bendAfter #+1 r2
r4 c4\bendAfter #-1 r2
r4 c4\bendAfter #+2 r2
r4 c4\bendAfter #-2 r2
}

musicTwo = \relative c'' {
\override Score.SpacingSpanner.shortest-duration-space = #4.0
r4 c4\bendAfter #+1 r2
r4 c4\bendAfter #-1 r2
r4 c4\bendAfter #+2 r2
r4 c4\bendAfter #-2 r2
}

\score {
\musicOne
}

\score {
\musicTwo
}

This gives:

[image: image.png]

--
Michael


Re: indicate scordatura at beginning of piece

2024-04-05 Thread Michael Werner
Hi Dirck,

On Fri, Apr 5, 2024 at 5:36 PM Dirck Nagy  wrote:

> Hello Michael!
>
> First of all, thank you for your patience!  I don't have much computer
> code experience, so i apologize if i am asking questions that are obvious
> to most others.
>
> This custom header looks like the most promising solution, but I had a
> couple problems:
>
>
>  1. The link you sent doesnt work; i cant find anything called
> "default header block" in the lilypond manuals.  Could you re-send, please?
>

The link I sent wasn't actually a web link - it was referring to a file
that will be on your hard drive as part of LilyPond itself. However, the
relevant section of the documentation would be section 3.3 of the Notation
Reference:
https://lilypond.org/doc/v2.25/Documentation/notation/titles-and-headers
for the 2.25 development series, or
https://lilypond.org/doc/v2.24/Documentation/notation/titles-and-headers
for the 2.24 non-development series.
To locate the file I referred to, you'll need to find where LilyPond is
installed on your system. The path I gave in my earlier email was a partial
file path, omitting the first section as that part will vary depending on
your specific installation. On my system, I have a general lilypond
directory in my home directory. All the different versions of lilypond just
get dropped into that directory. So, for the latest development version of
LilyPond (that's 2.25.14) the full path for my particular installation to
the file I referenced is:
/home/michael/lilypond/lilypond-2.25.14/share/lilypond/2.25.14/ly/
titling-init.ly

   2.  I couldnt get the examples.  I'm sure this is due to my
> misunderstanding of basic concepts, so could i ask you to send the complete
> lilypond file for the example you sent?  This way, I could paste it into an
> empty document.
>

Sure can. Here goes:

\version "2.25.14"  % Can also be changed to ...
% \version "2.24.3"  % ... or whichever version you use

\paper {
  bookTitleMarkup = \markup {
\override #'(baseline-skip . 3.5)
\column {
  \fill-line { \fromproperty #'header:dedication }
  \override #'(baseline-skip . 3.5)
  \column {
\fill-line {
  \huge \larger \larger \bold
  \fromproperty #'header:title
}
\fill-line {
  \large \bold
  \fromproperty #'header:subtitle
}
\fill-line {
  \smaller \bold
  \fromproperty #'header:subsubtitle
}
\fill-line {
  \fromproperty #'header:poet
  { \large \bold \fromproperty #'header:instrument }
  \fromproperty #'header:composer
}
\fill-line {
  \fromproperty #'header:meter
  \fromproperty #'header:arranger
}
\fromproperty #'header:scordatura  %  <-- This line is what defines
the custom header
  }
}
  }
}


\header {
  title = "Example Title"
  composer = "Composer here"
  poet = "Poet here"
  arranger = "Arranger here"
  meter = "Meter here"
  scordatura = \markup { \override #'(baseline-skip . 2.75)  % Adjust this
value ...
 \fontsize #-1.5 % ... and this
one as needed
 \column { \line { \circle "6" "= D" }
   \line { \circle "5" "= G" } } }
}

\score {

  \new Staff {
\new Voice {
  c''1 d''1
}
  }

}

The bookTitleMarkup block can be changed just as much or as little as you
desire. It's basically just a block of markup. Something like this (adding
a single custom header) is just scratching the surface. If you wanted, you
could completely redefine the entire header section, to make it completely
your own. Another part of just how configurable LilyPond can be. The
learning curve can be a bit steep at times, but I think it's well worth it.
-- 
Michael


Re: indicate scordatura at beginning of piece

2024-04-05 Thread Michael Werner
Hi Dirck,

On Thu, Apr 4, 2024 at 11:49 PM Dirck Nagy  wrote:

> Hi Lilypond
>
> What are my options for indicating scordatura such as the png image at the
> bottom of this email?
>

If this is something that you'll be doing on a regular (or even
semi-regular) basis I'd consider defining a custom header for this. It's
pretty easy to do.  The default header block is found at
share/lilypond/2.25.14/ly/titling-init.ly under the lilypond install
point. Probably best to copy and paste the header block into an include
file and make your tweaks there. That way it's all there and accessible but
out of the way. To add a custom field at, for example, the very bottom of
the header block, you can simply add a field as such:


\fill-line {
\fromproperty #'header:poet
{ \large \bold \fromproperty #'header:instrument }
\fromproperty #'header:composer
}
\fill-line {
\fromproperty #'header:meter
\fromproperty #'header:arranger
}
\fromproperty #'header:scordatura % Line added here

You would then use the newly defined scordatura header field like any other
header:

\header {
title = "Example Title"
composer = "Composer here"
poet = "Poet here"
arranger = "Arranger here"
meter = "Meter here"
scordatura = \markup { \override #'(baseline-skip . 2.75)  % Adjust this
value ...
  \fontsize #-1.5 % ... and this
one as needed
  \column { \line { \circle "6" "= D" }
\line { \circle "5" "= G" } } }
}

This will, in turn, produce:

[image: image.png]


-- 
Michael


Re: Question about voltas and repeats

2024-03-12 Thread Michael Werner
Hi Lucas,

> On Mar 12, 2024, at 7:00 PM, Lucas Cavalcanti 
wrote:
>
> >
>> > Hello. I've been thinking about Lilypond's usage on parts: for one
>> musician (for example, the singer singing the melody) I'd like to give them
>> a score containing voltas using the repeat and volta commands; for another
>> musician (for example, the drummer) I'd like to give them a score with no
>> repeats and voltas. I know that if I'd like to create a full-band score
>> (i.e a grid) I can use the \unfoldRepeats at every variable, creating one
>> straight through score.
>> >
>> > However, is it possible to create something like a "Tempo Map" of
>> sorts? Like a part/variable that gives instructions to the master grid to
>> create repeats and voltas without the need to create new parts?
>> >
>> > My objective is to figure out a way to create independent grid scores
>> from musician part scores. To give a singer one straight, 6 pages score, to
>> give a drummer a 1 page score and to give the conductor a 4 page score.
>> > Is that possible?
>>
>
Unless I'm misunderstanding what it is you're after, I think this can be
done. If you shift where you're calling the \unfoldRepeats function it
seems to work just fine, while still following the guideline Kieren
mentioned of including the volta structure. Something like:

\version "2.24.3"

melody = {
  \relative c' {
\repeat volta 2 {
  g4 bes c r
  \alternative {
\volta 1 { g bes des c }
\volta 2 { bes g r r }
} } } }

drumpart = {
  \new DrumStaff {
\drummode {
  \repeat volta 2 {
4   
\alternative {
  \volta 1 { 4}
  \volta 2 { 4}
} } } } }

%\book
\score {
  <<
\melody
\drumpart
  >>
}

\score {
  \unfoldRepeats
  <<
\melody
\drumpart
  >>
}

This gives two scores, with the same music. One with the repeats written
with the volta structure, the second with the repeats unfolded.
-- 
Michael


Re: Question regarding ChordNames

2024-03-12 Thread Michael Werner
Hi John,

On Tue, Mar 12, 2024 at 11:51 PM John Helly  wrote:

> Aloha.
>
> Here's an MWE to exhibit the issue.
>
> I have a flat note (bes) that I want to transpose down 4 half-tones to
> F#.  However, when the transpose is applied, the result is Gb.  I
> understand that a flat note was the initial value so maybe LP is preserving
> that specification?
>
> Nonetheless, short of re-writing the whole piece in A rather than C#, is
> there a way to specify the enharmonic representation for an F# rather than
> Gb, for example?
>

It's maybe a bit hackish, but what about first transposing from B flat to A
sharp. *then* transposing C sharp to A? Something like:

\version "2.25.13"

bflat = \chordmode { bes1 }

{
  \transpose cis' a {
\new ChordNames {
  \bflat
  \transpose bes ais { \bflat }
}
  }
}
-- 
Michael


Re: Tall bars in two-line music

2024-03-06 Thread Michael Werner
Hi David,

On Wed, Mar 6, 2024 at 10:00 AM David Wells <
drwells.mailingl...@fastmail.com> wrote:

> Hi,
>
> I'm working on typesetting some chants with two lines per staff and the
> resulting barlines are too tall. Tiny example:
>
%< snip >%

> Here, I expect the barlines to be the same height as the staff (i.e., not
> protrude) and I cannot figure out how to make that happen.
>

The property you'll want to modify here is the bar-extent of BarLine - this
sets the Y-extent of the bar line. Example:

\version "2.24.3"

\score
{
  \relative c'
  {
\time 9/4
\slurDown

\override Staff.StaffSymbol.line-count = #2
\override Staff.BarLine.bar-extent = #'(-0.5 . 0.5)
f4(g) a f(g) a(g) g2 |
f4(g) a f(g) a(g) g2 |
\break
  }
}

which produces:

[image: image.png]

Have a look at
https://lilypond.org/doc/v2.24/Documentation/internals/barline for all the
settings available for bar lines.
-- 
Michael


Re: \after syntax?

2024-02-21 Thread Michael Werner
Hi Matt,

On Wed, Feb 21, 2024 at 10:53 AM Matthew Pierce 
wrote:

> Hello all,
>
> For hairpin positioning within a whole note, the Manual gives the syntax
>
> \relative {
> \after 2 \< c'1
> }
>
> Is there an effective \after syntax for hairpin positioning within
> NON-whole notes, such as  the second note in this (intuitive but)
> nonviable expression?
>
>   \relative {
> \after 2 \< c'4 2.
>   }
>
> CONTEXT: I need to place an \espressivo-shaped, double-hairpin swell
> underneath a dotted half note. Also, I need it to be stretchable, so that I
> can horizontally align it with the other, more active parts/staffs in my
> orchestral score.
>

To emulate an \espressivo using actual dynamics by way of the \after
function:

\version "2.25.13"

musA = \relative c' {
  a'4 \after 8*3 \>  a2.\< a2\! a2
}

musB = \relative c' {
  a'4 \after 4. \> \after 2. \! a2.\< a2 a2
}

musC = \relative c' {
  a'4 \after 4. \> a2.\< <>\! a2 a2
}

\score {
  \new Staff {
\new Voice {
  \musA
} } }

\score {
  \new Staff {
\new Voice {
  \musB
} } }

\score {
  \new Staff {
\new Voice {
  \musC
} } }

will produce:

[image: image.png]

Three different ways of accomplishing the same thing. The first showing
that you can indeed use scaling in the \after function (i.e. the 8*3
meaning 3 8th notes worth) and terminating the decrescendo on the following
note. The second using \after to do the termination.  The third uses the
empty chord construct (i.e. the <> ) to attach the termination to. You are,
of course, free to mix and match whichever method suits you.
-- 
Michael


Re: dynamics in coulour

2024-02-20 Thread Michael Werner
Hi Stefan,

On Tue, Feb 20, 2024 at 9:49 AM Stefan Thomas 
wrote:

> Dear community,
> is it possible to display the dynamics, also haipins and other things like
> crescendo etc., in coulour?
> Could someone could give me a hint?
>

Sure can. Most (if not all) grobs have a color property that can be
overridden. If you want to change all grobs of that type in a score to a
certain color, you can put the override into the layout block. Or, if you
want to change just one instance, you can put the override into the music
expression. Here's some sample code showing both:

\version "2.24.3"

mus = \relative c' {
  f4\p a4\< c8 d b4\f |
  \once \override DynamicText.color = #yellow f4\p a4\< c8 d b4\f
}

\score {
  \new Staff {
\new Voice {
  \mus
}
  }
}

\layout {
  \context {
\Voice
\override Hairpin.color = #red
\override DynamicText.color = #blue
  }
}

producing:

[image: image.png]

The overrides in the layout block have gone into the Voice context, as
that's where they live by default. If, however, you put your dynamics into
a Dynamics context of their own you would need to modify the layout block
accordingly.

The override in the music expression is using the \once command, so that
only the next instance of that grob is affected. If you want to change
*all* the grobs of that type from that point onward, just omit the \once

Also, one of the (sometimes) tricky parts can be finding the right name for
the grob. The best resource I've found for that is:
https://lilypond.org/doc/v2.25/Documentation/ly-examples/visualindex.pdf
It's a 2 page PDF with an amazing amount of information. It's listed as
being in the 2.25 docs, but if you're using the 2.24 series it should still
be useful, as I'm pretty sure all the grob names, contexts, end engravers
are pretty much the same names.
-- 
Michael


Re: Numérotation des versets

2024-01-27 Thread Michael Werner
Hi there,

On Sat, Jan 27, 2024 at 6:35 AM Silvain Dupertuis <
silvain-dupert...@bluewin.ch> wrote:

> *Sorry for my question in French on an English-speaking forum... here is
> an Englsh version*
>
> Hello,
> Is there a way to automatically repeat the verse numbers on each line
> when it is defined by \set stanza = "1."
> without repeating this instruction within the verse text
>
> with this structure in the score part, lyrics being defined in variables
> \new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
> \new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }
> ...
>
> For a 5-verse song, it's best to repeat these verse numbers
>

So as I understand it you want the stanza number at the beginning of each
system such as after line breaks, instead of just the first? If that's the
case maybe try using shortVocalName, like this:

\version "2.25.12"

\new Staff { c' \break c' }
\addlyrics {
  \set stanza = "1."
  \set shortVocalName = \markup \bold \small "1."
  aah aah
}

\addlyrics {
  \set stanza = "2."
  \set shortVocalName = \markup \bold \small "2."
  ooh ooh
}

which gives:

[image: image.png]

-- 
Michael


Re: Footnote separator line

2024-01-23 Thread Michael Werner
Hi Kevin,

On Tue, Jan 23, 2024 at 8:06 PM Kevin Pye  wrote:

> For the first time in many years of using Lilypond, I have a need to add a
> footnote to some music. One thing puzzles me:
>
> As is traditional in all texts, Lilypond places a horizontal line above
> the footnotes, separating them from the music above. However the horizontal
> position of this line confuses me. I would have expected the line to be
> above the footnotes, starting at the left margin. However it is placed
> further to the right. This can be seen in the examples in the NR (
> http://lilypond.org/doc/v2.25/Documentation/notation/footnotes-in-music-expressions).
> In my case the footnote is in the second bar of music in the staff, and the
> line does not start until the beginning of that bar, potentially after the
> end of the footnote text. Because the music to which the footnote is
> attached may be several staves above the footnote text, this does not make
> sense to me.
>
> Is there some way of shifting this line to the left margin?
>
> Kevin.
>

The function defining the separator line can be found in ly/
paper-defaults-init.ly  It defaults to:
footnote-separator-markup = \markup \fill-line { \override #'(span-factor .
1/2) \draw-hline }
Copying that into the \paper block of your .ly file, you can then tweak it
to whatever you desire. Simply removing \fill-line will shift the line to
the left margin, leaving the length the same.
-- 
Michael


Re: tempo marks floating number

2024-01-22 Thread Michael Werner
On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo 
wrote:

> How can I simply write a bpm in floating number in lilypond (e.g.*♩ =
> 90.86 ) *?
> It seems that \tempo accept only integers.
> thanks
>

You can do pretty much any markup with the \tempo command. Two ways you can
do this are either:
\tempo \markup { \note { 4 } #UP " = 90.86" }
or
\tempo \markup { \rhythm { 4 } " = 90.86" }

The \note function is a bit simpler and creates a note stencil that's a tad
larger than what's produced by the \rhythm function. The \rhythm function,
however, is far more flexible in what it can produce. More info on the
\note function at:
https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
and for the \rhythm function see:
https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm

One caveat to keep in mind is that \tempo entries done with \markup do not
affect MIDI playback.
-- 
Michael


Re: Segno and Coda from LilyJazz in a DrumStaff

2024-01-14 Thread Michael Werner
Hi Sebastien,

On Sat, Jan 13, 2024 at 11:17 AM Sebastien Richard 
wrote:

> Hi all,
>
> I've been struggling with this for a long time without getting close to
> any solution.
>
> How can I use the Segno & Coda from LilyJazz in the example below ?
>

To clarify, you want just the segno and coda marks in the LilyJazz font,
while the rest of the notation remains in the default music font?  If so,
I'm not completely sure but I don't think that can be done with the 2.24
series.  However ...

As the 2.25 series has been developed, the arrival of 2.25.6 brought along
a significantly redone font handling system. One of the new features is
that font selection is now just another property, and can be modified on a
per-grob basis. Which makes what you want fairly simple and straight
forward. Once the LilyJazz font files have been placed as needed, it's just
a matter of modifying the properties of the SegnoMark and CodaMark grobs.
Like this:

\version "2.25.12"

drum = \drummode {
  sn4 sn sn sn
  \segnoMark 1
  sn4 sn sn sn
  \codaMark 1
  sn4 sn sn sn
}

\score {
  \new DrumStaff {
\drum
  }
}

\layout {
  \context {
\Score
\override CodaMark.fonts.music = "lilyjazz"
\override SegnoMark.fonts.music = "lilyjazz"
  }
}

This will mean that you would have to make the jump to the development
series, so you'll have to decide for yourself if that's something you're
willing to do.  I can say that I've been using the development versions for
a while and generally they're working just fine. The only real issue I've
encountered was when the newer versions switched to Guile 3 one of the
third-party packages I'm using didn't like that, but I've managed to get
through that. Other than that all has been well. So if Guile 3 isn't for
you, something between 2.25.6 and 2.25.10 (I think it was .11 where Guile 3
came in) should be safe.
-- 
Michael


Re: Help need with the "implicitBassFigures" command

2024-01-11 Thread Michael Werner
Hi there,

On Thu, Jan 11, 2024 at 5:49 AM Eef Weenink  wrote:

> \new FiguredBass \with { implicitBassFigures = #'(0) }
>
> %{if I set the implicitBass to 5, or other number, it works for the
> whole passage%}
>
> \figuremode {
>
>   \set figuredBassAlterationDirection = #RIGHT
>
>   \set figuredBassPlusDirection = #RIGHT
>
>   \override BassFigureAlignment.stacking-dir = #DOWN
>
>   <6 5->8 <5 4->8
>
>   \extendOn
>
>   \set Staff.implicitBassFigures = #'(5)
>
>   %{if I set the implicitBass to 5, or other number, it DOES NOT do
> anything%}
>
>   <5 3>4
>
>   \set Staff.implicitBassFigures = #'(0)
>
>   \extendOff <5 _+>8
>
>   <7>8 <6>8 <5>4
>

You had it almost right here. The one thing you need to change is that
the implicitBassFigures property is part of the FiguredBass context, not
Staff. Since there is no implicitBassFigures property in the Staff context
that \set command will just get silently ignored. So either change the
\set Staff.implicitBassFigures
to
\set FiguredBass.implicitBassFigures
or, since these statements are already in the FiguredBass context, just
leave the context off and make it just
\set implicitBassFigures
And then you should be good.
--
Michael


Re: How to put a big number in the upper left or right corner of a score?

2023-12-28 Thread Michael Werner
Hi Kris,

On Mon, Aug 28, 2023 at 4:44 AM Kris Van Bruwaene  wrote:

> (Lilypond version 2.24.1, Guile 2.2).
>
> What is the easiest way to put a big number (e.g. font size 4 bold)  in
> the upper left or right corner of a score? In previous versions I used to
> manage this with a double header, one in \book and one in \score, and
> faking a second "poet" (left corner) or "composer" (right corner), but this
> does not seem to work any more, at least not the way it used to. Moreover
> it isn't a very "clean" solution. Something like a regular (but huge) page
> number would be better.
>

If this is something you'll want on a regular basis I'd do a custom header.
They're pretty simple to define - I've got one I use for a score version. I
used to use either subtitle or subsubtitle, but ran into enough cases where
I actually had need of both that I finally just defined my own header to
use.  It goes into a \paper block, defined before the \header block where
you want to use it. For the docs see
https://lilypond.org/doc/v2.24/Documentation/notation/custom-titles-headers-and-footers
The part about defining your own is about half way down. The entry in the
\paper block for this would be something like:

bookTitleMarkup = \markup {
  \sans {
\override #'(baseline-skip . 3.5)
\column {
  \fill-line { \null \null \fontsize #4 \bold \fromproperty
#'header:bignumber }
  \fill-line { \fromproperty #'header:dedication }
  \override #'(baseline-skip . 3) % default 3.5
  \column {
\fill-line {
  \huge \larger \larger \bold
  \fromproperty #'header:title
}
\fill-line {
  \large \bold
  \fromproperty #'header:subtitle
}
\fill-line {
  \smaller \bold
  \fromproperty #'header:subsubtitle
}
\fill-line {
  { \smaller \fromproperty #'header:poet }
  { \bold \fromproperty #'header:myscoreversion }
  { \smaller \fromproperty #'header:composer }
}
\fill-line {
  { \smaller \fromproperty #'header:meter }
  { \large \bold \fromproperty #'header:instrument }
  { \smaller \fromproperty #'header:arranger }
}
  }
}
  }
}

In this case a new header field called bignumber is defined on the fifth
line, placed at the very top of the header block, in the top right corner.
If you want it in the top left corner, change that line to:
\fill-line { \fontsize #4 \bold \fromproperty #'header:bignumber \null
\null }
(BTW, Lilypond's default for this block is in titling-init.ly)  In this
block you can adjust the order and placement of all the headers, not just
your own custom ones. In this example, I've also added myscoreversion (the
one I mentioned earlier), put it where the instrument header used to be,
and moved instrument down a line centered between meter and arranger (a
spot left blank in the default).

To use your newly defined custom header, you set it just like any other
header:

\header {
  title = "Title Goes Here"
  bignumber = "42"
  composer = "Written by Somebody"
  subtitle = "Random subtitle"
}

Also, as this is now a defined header entry, it can be used just like any
other header entry, such as in subsequent page headers:

oddHeaderMarkup = \markup \sans {
  \fill-line {
\unless \on-first-page
\fontsize #4 \bold \fromproperty #'header:bignumber
\unless \on-first-page
\fromproperty #'header:title
\unless \on-first-page
\fromproperty #'page:page-number-string
  }
}

Granted, this all winds up being a fair sized chunk of code. But it's easy
enough to just save it all off into an include file, where it's out of the
way but accessible.
-- 
Michael


Re: displaying `script-priority`

2023-12-13 Thread Michael Werner
Hi Werner,

On Thu, Dec 14, 2023 at 12:03 AM Werner LEMBERG  wrote:

>
> Walking through some unanswered e-mails of mine I stumbled across this
> one, asked in October.
>
>   https://lists.gnu.org/archive/html/lilypond-user/2023-10/msg00222.html
>
> > How can I make LilyPond display the actual values of
> > `script-priority` for a stack of grobs?  [...]
>
> Any suggestions how to do that?  Otherwise I'll file an issue.
>

A few days ago I was looking for something, and stumbled across
https://lsr.di.unimi.it/LSR/Item?id=1017
And I thought that it might help here. I was able to modify it a bit to
pare down the info it returns, as it returns *everything* about each
occurence of the grob in question. The result:

\version "2.25.10"

#(define print-all-script-priority
   (grob-transformer 'after-line-breaking
 (lambda (grob orig)
   (format #t "\n~a:" grob)
   (format #t "\n~a:" "Text-Interface")
   (format #t "\n\t~a:  ~a" "text"
   (ly:grob-property grob 'text))
   (format #t "\n~a:" "Text-Script-Interface")
   (format #t "\n\t~a:  ~a\n" "script-priority"
   (ly:grob-property grob 'script-priority))
   )))

grobPropertiesInfo =
#(define-music-function (grob-name)(symbol?)
   #{
 \override $grob-name . after-line-breaking =
 #print-all-script-priority
   #})

\relative c {
  \set strokeFingerOrientations = #'(up)
  \set fingeringOrientations = #'(up)

  \grobPropertiesInfo #'StrokeFinger
  \grobPropertiesInfo #'Fingering
  

  \override Fingering.script-priority = #118
  
}

This produces the output:

Starting lilypond 2.25.10 [Untitled]...

Processing `/tmp/frescobaldi-01dbi2f4/tmpg0hzpy81/document.ly'

Parsing...

Interpreting music...

Preprocessing graphical objects...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Converting to `document.pdf'...


#:

Text-Interface:

text: 1

Text-Script-Interface:

script-priority: 96


#:

Text-Interface:

text: p

Text-Script-Interface:

script-priority: 121


#:

Text-Interface:

text: 4

Text-Script-Interface:

script-priority: 103


#:

Text-Interface:

text: a

Text-Script-Interface:

script-priority: 128


#:

Text-Interface:

text: 1

Text-Script-Interface:

script-priority: 114


#:

Text-Interface:

text: p

Text-Script-Interface:

script-priority: 121


#:

Text-Interface:

text: 4

Text-Script-Interface:

script-priority: 121


#:

Text-Interface:

text: a

Text-Script-Interface:

script-priority: 128

Success: compilation successfully completed

Completed successfully in 0.6".

Probably better ways to go about this, but it seems to work.
-- 
Michael


Re: text over hairpin

2023-12-13 Thread Michael Werner
Hi Paul,

On Wed, Dec 13, 2023 at 10:36 AM Paul Scott  wrote:

> How do I put text (molto) inside a hairpin?  I didn't see it in snippets
> or NR.
>

Found this in the Snippets:
http://lilypond.org/doc/v2.25/Documentation/snippets/expressive-marks_003a-center-text-below-hairpin-dynamics
-- 
Michael


Re: Hide a note inside a drumscore

2023-12-13 Thread Michael Werner
Hi Seb,

On Wed, Dec 13, 2023 at 11:00 AM Sebastien Richard 
wrote:

> Hello,
>
> How can I hide a note inside a drum score ? I tried following the doc here 
> *https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects
> *
>  but
> I did not managed to make it work
>

The issue you are running into is that overrides won't work on a single
item when there's more than one of them happening at the same moment in
the music. As these are (basically) notes within a chord, they're at the
same moment. And the \hide command is just a shortcut for an override on
the grob's Transparent property. In the case of simultaneous grobs, you
want the \tweak command.
http://lilypond.org/doc/v2.25/Documentation/notation/tweak-and-single

So, your code would become:

\version "2.24.2"

up = \drummode {
  \slurDown \grace { sn16 sn( }  4
}

\score {
  \new DrumStaff <<
\new DrumVoice {
  \voiceOne \up
}
  >>
  \layout {}
}

-- 
Michael


Re: lilypond "preprocessor"?

2023-12-10 Thread Michael Werner
Hi Stef,

On Sat, Dec 9, 2023 at 11:07 PM Stefano Antonelli <
santone...@algosolutions.com> wrote:

> Any other options for getting the header block from an included file?
>

 I don't know if this'll be directly usable in your use case, but I do
something like this with most of the music I engrave. The way I handle this
is my song.ly would be something like:

myHeaders =  \header {
% author and stuff
}

theMusic = new DrumStaff {
% the music
}

And then I would have anotherFile.ly containing something like:

\include "song.ly"

\book {
  \myHeaders
  \score {
\theMusic
  }
}

I'm not at all familiar with ly2video, so I really have no idea if this'll
be directly useful to you. But for getting the headers from an included
file, this is how I do it with nearly all the music I engrave. Maybe it can
serve as a starting point.
-- 
Michael


Re: Unexpected bar boundaries with volta repeats and lyrics.

2023-12-09 Thread Michael Werner
Hi Kevin,

On Fri, Dec 8, 2023 at 11:31 PM Kevin Pye  wrote:

> What silly mistake am I making here?
>

Not all that silly. Though the docs do talk about putting lyrics into the
same repeat structure as the music, there's one detail in
http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats
that you may have missed:

"... when one of the \alternative blocks starts with a rest, a repeat
construct cannot be used around the words"

Change the lyrics block to just

words = \lyricmode {
a b c d e
}

and it should behave itself a bit better for you.
-- 
Michael


Re: Centering a word before a gap in the lyrics

2023-12-04 Thread Michael Werner
Hi Paul,

On Mon, Dec 4, 2023 at 6:56 AM Paul Hodges  wrote:

> I don't know where in the documentation the difference in behaviour
> between \skip1 and "" as opposed to _ is explained.
>

It isn't much of an explanation, but in
http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats#index-_005cskip-1
is the line Note: do not use an underscore, _, to skip notes – an
underscore indicates a melisma, causing the preceding syllable to be
left-aligned.
A bit terse, to be sure. But mentioning an alignment issue I've always
stayed with using \skip to skip over a note, and only used _ when it really
was a melisma not explicitly notated in the music (such as a tie or a slur).

But the opportunity is missed on these pages, the first of which actually
> conflates the "" and _ notation:
>
>
> https://lilypond.org/doc/v2.25/Documentation/snippets/rhythms_003a-skips-in-lyric-mode-_00282_0029
>
> https://lilypond.org/doc/v2.25/Documentation/snippets/rhythms_003a-skips-in-lyric-mode
>

This was the first time I'd seen the use of "" for something like this.
I'll have to keep it in mind. And looking at those two snippet pages you
linked they make it seem like all three options are equivalent. Yet in the
NR page I linked it says they are different.

Well, I guess the important bit is you found something that does what you
need, and does it in a way that you're okay with.
-- 
Michael


Re: Centering a word before a gap in the lyrics

2023-12-04 Thread Michael Werner
Hi Paul,

On Mon, Dec 4, 2023 at 3:52 AM Paul Hodges  wrote:

> In the middle lyric, the first word is justified because the following
> skip (_ in this case) defines a melisma.  But I actually simply want there
> to be no immediately following word - this arises with multiple verses and
> alternatives in the repeat structure, for example.  I thought a quoted
> space would count as a word, but no...
>

> In the end I have done it above by a rather unnatural circumlocution, but
> is there a more natural solution which I've missed?
>

Sure. Just use a skip. Like so:

\version "2.25.10"

wordsA = \lyricmode { centred centred centred }
wordsB = \lyricmode { centered \skip 1 centred }

\score {
  \new Staff <<
\new Voice = "vvv" { r2 c'2 g'2 c''2 }
\new Lyrics \lyricsto "vvv" \wordsA
\new Lyrics \lyricsto "vvv" \wordsB
  >>
}


[image: image.png]

One thing to keep in mind - \skip when used in lyrics goes by notes, not
beats. So \skip 1 will skip one note, not an entire 4 beats. If you want to
skip multiple notes in one go (such as dealing with alternate endings with
multiple verses) something like:
\repeat unfold 15 { \skip 1}
comes in handy. A bit more on using \skip can be seen here:
http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats#index-_005cskip-1
and here:
http://lilypond.org/doc/v2.25/Documentation/notation/invisible-rests#index-_005cskip
-- 
Michael


Re: How do I arpeggiate across voices?

2023-11-27 Thread Michael Werner
Hi Kevin,

On Mon, Nov 27, 2023 at 7:43 AM Kevin Cole  wrote:

> Thanks. Not sure how I missed that in my search... That seems the best
> answer -- though, alas, the MIDI arpeggiator cannot take advantage of it.
> (I may be able to suss that out "the hard way" manually though.)
>

Sorry, but MIDI is an area I know almost nothing about, as I almost never
use it. My main focus is hardcopy.  Best I can come up with is to do
something a little like what is shown in


> MIDI arpeggiator:
> https://lists.gnu.org/archive/html/lilypond-user/2020-12/msg00036.html
>

It would involve basically making a parallel version of your music that,
while not looking like what you want the printed output to look like, will
sound right (or close to it) once run through the MIDI system. The two
versions would then be decided on via the tags as shown in the
linked example. It'll be a bit of a tedious PITA, but it'll get the job
done. Sorta kinda. Anyway, something like:

\version "2.25.10"
\language "english"

\include "../include/arpeggioMIDI.ly"

music = \relative c' {
  \set Staff.connectArpeggios = ##t % Need to tell Lilypond to play connect
the dots with the arpeggios
  e4 e e
  \tag #'layout {
<<
  { e4\arpeggio e4 b4 | e2 b8[ b8] | }
  \\
  { 2.\arpeggio | \stemUp gs2 \stemNeutral s4 | }
>>
  }
  \tag #'midi {
<<
  { \midiArpeggio 12 4 e b | e2 b8 b }
  \\
  { 2. | gs2 s4 }
>>
  }
  d'4 d d
}

\score {
  \new Staff \with {
\consists "Span_arpeggio_engraver" % Could also be done in a layout
block
  } {
\time 3/4
\new Voice {
  \removeWithTag #'midi \music
}
  }
  \layout {}
}

\score {  % Added this one out of curiosity - wanted to see what it would
look like.
  \new Staff \with {
\consists "Span_arpeggio_engraver" % Could also be done in a layout
block
  } {
\time 3/4
\new Voice {
  \removeWithTag #'layout \music
}
  }
  \layout {}
}

\score {
  \new Staff {
\time 3/4
\new Voice {
  \removeWithTag #'layout \music
}
  }
  \midi {}
}

That's the rough approach. And I'm not real sure just how close that MIDI
output sounds compared to what it should be. There's bound to be a better
way to do this. I just don't know what that better way might be.
-- 
Michael


Re: How do I arpeggiate across voices?

2023-11-26 Thread Michael Werner
Hi Kevin,

On Sun, Nov 26, 2023 at 7:38 PM Kevin Cole  wrote:

> I'm looking at a pice of music that shows an arpeggio between two
> dotted half-notes in one voice and a quarter-note in the other voice.
> Specifically, in the wee snippet below, the first e4 in the first
> voice is at the top of the arpeggio above the 2 in the second
> voice.
>

Having a look at
http://lilypond.org/doc/v2.25/Documentation/notation/arpeggio#index-arpeggio_002c-cross_002dvoice
it turns out there's a Span_arpeggio_engraver you can add to take care of
this. Also, a Staff.connectArpeggios property to set. Adding those in, your
example becomes:

\version "2.25.10"
\language "english"

music = \relative c' {
  \set Staff.connectArpeggios = ##t % Need to tell Lilypond to play connect
the dots with the arpeggios
  <<
{
  e4\arpeggio e4 b4  | %  1 - Need to mark both top and bottom of
connected arpeggios
  e2 b8[ b8]  | %  2
}
\\
{
  2.\arpeggio | %  1 - Need to mark both top and bottom of
connected arpeggios
  \stemUp gs2 \stemNeutral s4 | %  2
}
  >>
}

\new Staff \with {
  \consists "Span_arpeggio_engraver" % Could also be done in a layout block
} {
  \time 3/4 % Just a guess? Fixes the barcheck error
  \new Voice {
\music
  }
}
-- 
Michael


Re: Books with alternative lyrics minimizing code duplication?

2023-11-24 Thread Michael Werner
Hi,

On Fri, Nov 24, 2023 at 9:25 AM YTG 123  wrote:

> Hello,
>
> I have alternative versions of lyrics text, which I would like to export
> in different files (or \book blocks). The music, order of staves, etc.
> is identical.
>
> Ideally, I would want to do this as cleanly and with as little code
> duplication as possible.
>

I do something a bit like this on a regular basis - generating multiple
versions from the same music. In my case, instead of doing different lyrics
I'm doing some instrument specific formatting and such. But the basic idea
is pretty similar. Perhaps something like this?

\version "2.25.10"

music = { c'4 d' e' }
lyricsOne = \lyricmode { do re mi }
lyricsTwo = \lyricmode { a b c }

% Header info common to all versions
main_header =
\header {
  title = "Main Title"
  composer = "Written by Foo Bar"
}

% Here is the main body of the score, so we can call it as needed
main_score = <<
  \new Staff {
\new Voice = "VOne" {
  \music
}
  }
  \tag #'(showLyricsOne) {
\new Lyrics  \lyricsto "VOne" {
  \lyricsOne
}
  }
  \tag #'(showLyricsTwo) {
\new Lyrics  \lyricsto "VOne" {
  \lyricsTwo
}
  }
>>

% With what I usually do everything from here down is in a separate file,
that includes in everything above

\book {
  \paper {
output-suffix = "both_lyrics"
  }
  \header {
pdftitle = "Song Title - Both Lyrics"
subtitle = "Both Lyrics"
  }
  \main_header
  \score {
\main_score
\layout {
  % As needed
}
  }
}

\book {
  \paper {
output-suffix = "first_lyrics"
  }
  \header {
pdftitle = "Song Title - First Lyrics"
subtitle = "First Lyrics"
  }
  \main_header
  \score {
\keepWithTag #'showLyricsOne
%\removeWithTag #'showLyricsTwo
\main_score
\layout {
  % As needed
}
  }
}

\book {
  \paper {
output-suffix = "second_lyrics"
  }
  \header {
pdftitle = "Song Title - Second Lyrics"
subtitle = "Second Lyrics"
  }
  \main_header
  \score {
\keepWithTag #'showLyricsTwo
%\removeWithTag #'showLyricsOne
\main_score
\layout {
  % As needed
}
  }
}

As a source file named example1.ly this produces 3 PDFs:
example1-both_lyrics.pdf, example1-first_lyrics.pdf and
example1-second_lyrics.pdf
http://lilypond.org/doc/v2.25/Documentation/notation/output-file-names
goes over how to control the output file names.

Using pdftitle in a \header block to set the displayed PDF title gets
covered in
http://lilypond.org/doc/v2.25/Documentation/notation/creating-output-file-metadata

In this example I'm using tags to control which lyrics get shown when.
There are 2 ways to use them: \keepWithTag and \removeWithTag  Details on
how they both get used are in
http://lilypond.org/doc/v2.25/Documentation/notation/using-tags
Short version: \keepWithTag keeps music with that tag and untagged music,
while \removeWithTag keeps everything but the music with the selected tag.
There's more to it than that - especially if you get into using multiple
tags at the same time. But this example is simple enough that it could work
either way - swap the two commented tag commands in each score to try it
out, and you'll see that the output is the same.
-- 
Michael


Re: start/stop staff

2023-11-24 Thread Michael Werner
Hi David,

On Thu, Nov 23, 2023 at 7:10 PM bobr...@centrum.is 
wrote:

> I have a quartet piece with a recitative type section in one part.  The
> other parts play, essentially, punctuation.  The "solo" part is
> rhythmically complex enough that having it on the accompanying parts would
> make it far easier to play.  I could easily put the entire movement in each
> part as a StaffGroup but I would prefer a two-line staffGroup only for the
> sections where the solo part is not homophonic with the rest.  How would I
> go about starting/stopping such a thing?
>
> Put simply, I want to start the parts with a staffGroup which contains the
> individual part with the solo part above at a reduced size.  Then, when
> that section is done, reduce to the individual part.  Then reintroduce the
> solo part at a later section for the same reason.
>

I'd go about this with something like:

\version "2.25.10"

\paper {
  #(set-paper-size "a6")
}

solo = \relative c' {
  \repeat unfold 2 { a'4 b c d e d c b }
  R1*5
  a4 b c d e d c b
  R1*4  R1
}

individual = \relative c' {
  \repeat unfold 4 { c4 d e f g a b c b a g f e d c d }
}

\new StaffGroup
<<
  \new Staff \with {
\RemoveAllEmptyStaves
\magnifyStaff #2/3
  }
  \new Voice {
\solo
  }

  \new Staff {
\new Voice {
  \individual
}
  }
>>

[image: document.png]

Might take a little trial and error to get the right combination of the R1
multiples, but should be fairly straightforward.

Also, if a section either starts or ends partway through a stave there will
be empty measures - \RemoveAllEmptyStaves goes from line break to line
break. This is shown in the 3rd line of this example.

As this is Lilypond, of course there are other ways to do this. Have a look
at
http://lilypond.org/doc/v2.25/Documentation/notation/ossia-staves
and
http://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves
for some other examples.
-- 
Michael


Re: Cue notes above rests

2023-11-23 Thread Michael Werner
Hi Ralph,

On Thu, Nov 23, 2023 at 11:26 AM Ralph Palmer 
wrote:

> Greetings, All -
>
> As ever, I'm grateful (Thankful, given it's Thanksgiving Day where I live)
> for LilyPond and for the help the other users give to each other. I used to
> give more help myself than I do now, mostly because others are so much more
> knowledgeable and quick to respond.
>
> I'm having a problem with cue notes and the rests in the primary
> instrument. I don't know how to get the primary instrument's rests above
> the cue notes.
>

You almost had it. One small change:

\version "2.24.0"

\relative c' {
  a''2
  <<
{
  r2 |
  r1 |
  r1 |
  r1 |
  r2
}
\\
{
  \new CueVoice {
a,2~ |
a4 d, g2~ |
g4 e a g |
f4 g
  }
}
  >>
  d'2\f |
}

Adding the \\ between the two sections puts both sections into their own
context. And that produces:

[image: image.png]

Another option would be to explicitly assign voiceOne and voiceTwo, like:

\version "2.24.0"

\relative c' {
  a''2
  <<
{
  \voiceTwo
  r2 |
  r1 |
  r1 |
  r1 |
  r2
}
{
  \voiceOne
  \new CueVoice {
a,2~ |
a4 d, g2~ |
g4 e a g |
f4 g
  }
}
  >>
  \oneVoice
  d'2\f |
}

That gives the same result. Just make sure to add the \oneVoice afterward,
to put everything back to the defaults.
-- 
Michael


Re: tspan in SVG export

2023-11-23 Thread Michael Werner
Hi Johannes,

On Thu, Nov 23, 2023 at 10:37 AM Johannes Keller 
wrote:

> thank you! I tried this, but got "fatal error: compiled without
> CAIRO_BACKEND". Does this mean that I need to compile Lilypond myself,
> or is there an easier way? I work on Arch Linux, using the official
> "lilypond" package (which ships Lilypond 2.24.2 at the moment).
>

I'm on KUbuntu myself. There are pre-made binary tarballs on the Lilypond
site you can use. Go to http://lilypond.org/index.html and on the right
side of the page are two download links - one for the current stable
release (currently 2.24.3) and one for the current development version
(currently 2.25.10). Follow whichever one you want, download the tar.gz and
unpack it into the directory of your choice. It'll then be pretty much
ready to use. I've got a lilypond directory in my home directory I unpack
them into, but really you can put them pretty much wherever you want.
-- 
Michael


Re: Aligning verse text?

2023-11-22 Thread Michael Werner
Hi there,

On Tue, Nov 21, 2023 at 10:03 AM  wrote:

> ‌How to place (ooo -- oo o -- ooo --) verse to first (r1) rest and (uu --
> u -- uu) to (g'4 fis' g')?
>

Something like this, as in?

\version "2.24.3"

globals = {
  \key f \major
  \time 2/1
}

musicOne = {
  e'4. e'8 e'4 e' e'2 e'4 r | \break
  r1 g'4 fis' g' r
  r1 e'4 e' e' r
}

musicTwo = {
  e'4. e'8 e'4 e' e'2 e'4 e | \break
  e1 g'4 fis' g' g
  g1 e'4 e' e' e
}

verseOne  = \lyricmode {
  x -- xx xx -- xx -- xx -- xx \skip 1
  ooo_--_oo_o_--_ooo -- uu -- u -- uu
}

\score {
  \new Staff <<
\globals
\new Voice = "one" {
  \musicOne
}
\new NullVoice = "two" {
  \musicTwo
}
\new Lyrics \lyricsto "two" {
  \verseOne
}
  >>
}

musicTwo is the same rhythm as musicOne, with notes in place of the rests.
We can get away with doing that, because musicTwo is being used in a
NullVoice context. Details on the NullVoice context are at
http://lilypond.org/doc/v2.24/Documentation/notation/techniques-specific-to-lyrics#index-NullVoice
but the basics here are that this context will accept music as any regular
Voice, but produces no printed output. Near as I can figure, its primary
use is situations just like this - aligning lyrics to a melody other than
what's being printed in the staff. I frequently use this for songs that
have both a melody and a harmony part with different rhythms and common
lyrics that need to align to (usually) the melody rhythm.

Also, the ooo's had to be fiddled a bit to get them to fit. That's why the
underscores - to make that sequence align as if it were all one word. And
the \skip 1 is to skip over the quarter rest at the end of the first line.

Lots of further explanations in the docs - for much of the basics for
dealing with lyrics sections 2.1.1 and 2.1.2 of the Notation Reference will
pretty much cover the basics.
-- 
Michael


Re: Relative rhythms across bars for time changes?

2023-11-18 Thread Michael Werner
Hi Alasdair,

On Fri, Nov 17, 2023 at 9:28 AM Alasdair McAndrew  wrote:

> I'm typesetting some 16th century music which has a lot of time changes.
> And I'd like to add equivalences of notes across bar-lines, to indicate for
> example, that a quarter note in one bar is equal in time to a half note in
> the next bar.
>
> The sort of notation I want is in this snippet:
>
>
> https://lilypond.org/doc/v2.24/Documentation/snippets/rhythms#rhythms-creating-metronome-marks-in-markup-mode
>
> However, I want that equals sign to be aligned with the barline.  I have
> two questions: (a) how can I do this? and (b) is there an easier way than
> the markup given in the snippet?
>

In the time-honored tradition of "There's More Than One Way To Do It ™",
here's another option:

\version "2.25.10"

tempoChange =
#(define-music-function (alignValue firstNote secondNote) (number?
ly:duration? ly:duration?)
   #{
 \tweak self-alignment-X #alignValue \textEndMark \markup {
   \concat {
 (
 \fontsize #-3 \general-align #Y #DOWN \note { #firstNote } #UP
 " = "
 \fontsize #-3 \general-align #Y #DOWN \note { #secondNote } #UP
 )
 } }
   #} )

music = \relative c'' {
  c4 c c c | d d d d \tempoChange 0 4 2 | b a a b | d d d d | \break
  d d d e | f f f f | a f e d | e e e e \tempoChange -0.15 2 8. | \break
  e e a g | f f f f | e d d d | b b b b
  \fine
}

\new Staff {
  \new Voice {
\music
  }
}

producing:

[image: image.png]

It's still using the code from the snippet you referenced (slightly
modified), but wrapped into a function. This way you can tuck the function
definition away somewhere (such as the top of your source file or off in a
separate include file, whatever works best for you) so that the function
code itself is out of the way, but can still be used with a single function
call.

The first argument to the function call is an alignment value - 0 is
center, positive moves it left and negative moves it right.. The way the
code works, if the two notes are of the same size (such as a quarter note
and a half note) then the markup will be centered with an alignment value
of 0. But if one of the notes is larger (such as in the second example)
then the entire thing shifts over a bit. That's why in the second example
the first argument is -0.15 - that's just enough to put the markup centered
again.

The second and third arguments are simply note durations. This function can
only handle single notes, so no triplets or anything like that.

One other thing to note - this function uses the \textEndMark function.
There's also a \textMark function. The two work similarly, with the
exception of how they handle line breaks. The one I'm using here
(\textEndMark) puts the markup at the end of the system before the break.
The other one (\textMark) puts the markup at the beginning of the system
after the line break. So depending on which way you want things handled you
may or may not need to change which of the two you use.
-- 
Michael


Re: Fermata Markup below Staff

2023-11-12 Thread Michael Werner
Hi Johannes,

On Sun, Nov 12, 2023 at 11:44 AM Johannes Roeßler  wrote:

> Hi Michael,
>
> doesn't work well with a choirstaff though..
>

No, it doesn't, does it.  I missed the part in your original post where you
mentioned the choir staff bit. With a GrandStaff the span bar counts as a
single bar line, which you won't have in a ChoirStaff. So what we want
(maybe?) is something that'll put the fermata above the bar line in the
upper staff, and below the bar line in the lower staff. Am I understanding
correctly that's what you're after? If so, try:

upFermata = {
  \once \set Staff.caesuraType = #'((underlying-bar-line . "||"))
  \once \set Staff.caesuraTypeTransform = ##f
  \caesura ^\fermata
}

downFermata = {
  \once \set Staff.caesuraType = #'((underlying-bar-line . "||"))
  \once \set Staff.caesuraTypeTransform = ##f
  \caesura _\fermata
}

musicA = {
  f'1 \upFermata
  R1
  f'2 \upFermata f'2
  R1
  b'1 \upFermata \fine
}

musicB = {
  f'1 \downFermata
  R1
  f'2 \downFermata f'2
  R1
  b'1 \downFermata \fine
}

\new ChoirStaff <<
  \new Staff \musicA
  \new Staff \musicB
>>

Maybe that'll get a little closer to what you're after.
-- 
Michael


Re: Fermata Markup below Staff

2023-11-12 Thread Michael Werner
Hi Johannes,

On Sun, Nov 12, 2023 at 11:01 AM Johannes Roeßler  wrote:

> Hi all,
>
> I managed to place a fermata above a barline, I even managed to place it
> correctly at the end of the line, but now I would like to place a fermata
> sign below the barline (and rotate it 180°) too (in the bassvoice of a
> choir staff group) - simplified example:
>
> \version "2.24.0"
> \relative c' {
> e1 \break \once \override Score.RehearsalMark.break-visibility =
> #end-of-line-visible \mark \markup { \musicglyph #"scripts.ufermata" } \bar
> "||" e2
> }
>

There's a code snippet in the Notation Reference that does this.  It's at
the bottom of:
http://lilypond.org/doc/v2.24/Documentation/notation/writing-rests#caesuras
 --
Michael


Re: Score layout - ragged bottom and page break?

2023-11-12 Thread Michael Werner
Hi Alasdair,

On Sun, Nov 12, 2023 at 8:47 AM Alasdair McAndrew  wrote:


> How can I force each score with a book to have a last ragged bottom, and
> each score beginning on a new page?
>

Might try putting each score into a \bookpart section. When I put multiple
scores into a single PDF that's how I go about it - works quite well for
me. Something like:

\paper {
  ::global paper settings ::
}

\book {
  \bookpart {
\paper {
   :: paper settings for just this score ::
}
\score {
  :: the score ::
}
  }
  \bookpart {
:: and the next score, and so forth ::
  }
}

One note - using \bookpart inserts a page break between parts, so no need
for any explicit \pageBreak commands. For some more details have a look at:
http://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book
-- 
Michael


Re: pageNumber

2023-11-12 Thread Michael Werner
Hi David,

On Sun, Nov 12, 2023 at 7:18 AM bobr...@centrum.is 
wrote:

> I have the following in my \paper block.  I want to eliminate the page
> number on page 1.  I have 'print-first-page-number = ##f' but the
> oddHeaderMarkup is overriding it.  Is there a way around this? Some sort of
> conditional?
>

Turns out you just need to swap two lines. The \if conditional will apply
to the next item ... and just the next item. It prints the next item if
true, and leaves it blank if false. But the next item is the empty quotes,
so something that's already empty. So just swap the \if conditional line
down one to put it right before the page number line and all should be well.

  oddHeaderMarkup = \markup {
\fill-line {
  "" \larger\bold "SCORE"
  \if \should-print-page-number
  \fromproperty #'page:page-number-string
}
  }

There's also an alternative you can use, that kind of does this from the
opposite viewpoint. This will print the page number unless it's the first
page. Either should work, just going at things in two different ways. In
some circumstances (special cases? tricky layouts?) one might be preferable
over the other. But there are options to explore.

  oddHeaderMarkup = \markup {
\fill-line {
  "" \larger\bold "SCORE"
  \unless \on-first-page
  \fromproperty #'page:page-number-string
}
  }

For more details on these, have a look at:
http://lilypond.org/doc/v2.25/Documentation/notation/custom-layout-for-headers-and-footers
and
http://lilypond.org/doc/v2.25/Documentation/notation/conditional-markup
-- 
Michael


Re: Repeat volta Score.startRepeatBarType & Score.endRepeatBarType

2023-11-11 Thread Michael Werner
Hi Stu,

On Fri, Nov 10, 2023 at 11:18 AM Stu McKenzie  wrote:

> Thank you, Michael, for the working example.
>

You're quite welcome.

It seems that additional combinations of defineBarLine were added in
> version 2.25.
> I downloaded version 2.25.9 and found that adding break resulted in
> inconsistent results using the defineBarLine with the
> Score.startRepeatBarType and Score.endRepeatBarType.
>
> For example simply adding a \break before changing the
> Score.startRepeatBarType, i.e.:
>
>   c d e f
>   \break
>   \set Score.startRepeatBarType = #"[[|:"
>
> results in the bar line at the end of the first line to include the new
> start repeat bar type.
>
> I've tried defining various combinatons of bar lines, as defined on the
> documentation for 2.25.9, e.g.:
>   \defineBarLine "[[|:-StartDouble_fff" #'( #f #f #f )
>   \defineBarLine "[[|:-EndDouble_fff" #'( #f #f #f )
>   \defineBarLine "[[|:-StartDouble_ttf" #'( #t #t #f )
>   \defineBarLine "[[|:-EndDouble_ttf" #'( #t #t #f )
>   \defineBarLine "[[|:-StartDouble_ttt" #'( #t #t #t )
>   \defineBarLine "[[|:-EndDouble_ttt" #'( #t #t #t )
> but cannot get the results that I'd like, especially when alternatives are
> added to the repeat volta.
>
> Any further suggestions?
>

Yup. Try these:

  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f)
  \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f)

As we want the end repeat to show up at the end of a line but not the
beginning, and the start repeat to show at the beginning of a line but not
the end, the eol and bol booleans need changed. Basically the two are the
reverse of each other. So eol true for the end repeat, and bol true for the
begin repeat. I've left the span-bar set false for both - the built-in
single winged repeat appears to have it set to false, so I'm following
along with that here. And yes, I goofed in my first message - I said it was
beginning, mid and end of line. I skimmed the docs a bit too quickly
there.  It is end of line, beginning, and span-bar (as in the bar spanning
between staves when grouped, such as a StaffGroup).

 The next two are for use in \set Score.doubleRepeatBarType  They're the
repeat sign that shows when two repeated sections are back to back. The
first ( ":|][[|:" ) is going from a single winged repeat to a double
winged, while the second is going from double to double. And with those,
both the beginning of line and the end of line behavior are specified as
separate entries. That way if there's a line break with either of them it
should get the correct repeat sign either side of the line break.

So now we have:

\new Staff {
  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \new Voice {
\relative c' {
  \set Score.startRepeatBarType = #"[|:"
  \set Score.endRepeatBarType = #":|]"
  c' d e f
  \repeat volta 2 {
c d e f
  }
  c d e f
  \break
  \set Score.startRepeatBarType = #"[[|:"
  \set Score.endRepeatBarType = #":|]]"
  \repeat volta 2 {
c d e f
  }
  \fine
}
  }
}

producing:

[image: image.png]

and:

\new Staff {
  \defineBarLine "[[|:" #'( #f #t #f )
  \defineBarLine ":|]]" #'( #t #f #f )
  \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f)
  \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f)
  \new Voice {
\relative c' {
  \set Score.startRepeatBarType = #"[|:"
  \set Score.endRepeatBarType = #":|]"
  \set Score.doubleRepeatBarType = #":|][[|:"
  c' d e f
  \repeat volta 2 {
c d e f
  }
  \break
  \set Score.startRepeatBarType = #"[[|:"
  \set Score.endRepeatBarType = #":|]]"
  \repeat volta 2 {
c d e f
  }
  c d e f
  \set Score.startRepeatBarType = #"[|:"
  \set Score.endRepeatBarType = #":|]"
  \repeat volta 2 {
c d e f
  }
  \set Score.doubleRepeatBarType = #":|][[|:"
  \set Score.endRepeatBarType = #":|]]"
  \repeat volta 2 {
c d e f
  }
  c d e f
  \fine
}
  }
}

producing:

[image: image.png]

Hopefully this'll help get you a bit closer to what you're after.
-- 
Michael


Re: Repeat volta Score.startRepeatBarType & Score.endRepeatBarType

2023-11-09 Thread Michael Werner
Hi there,

On Wed, Nov 8, 2023 at 7:21 PM Stu McKenzie  wrote:

>
> I'd like to differentiate between two repeat voltas in a score by using
> 2 different start and end bar types.
>
> The following bar types are already defined in LilyPond:
>   Score.startRepeatBarType = #"[|:"
>   Score.endRepeatBarType = #":|]"
>
> I'd like to define a second bar type with double opening and closing
> parentheses, e.g.:
>   Score.startRepeatBarType = #"[[|:"
>   Score.endRepeatBarType = #":|]]"
>
> How would that be acheived?
>

Maybe something like this:

\version "2.25.9"
\language "english"

\new Staff {
  \defineBarLine "[[|:" #'( #t #t #t )
  \defineBarLine ":|]]" #'( #t #t #t )
  \new Voice {
\relative c' {
  \set Score.startRepeatBarType = #"[|:"
  \set Score.endRepeatBarType = #":|]"
  c' d e f
  \repeat volta 2 {
c d e f
  }
  c d e f
  \set Score.startRepeatBarType = #"[[|:"
  \set Score.endRepeatBarType = #":|]]"
  \repeat volta 2 {
c d e f
  }
}
  }
}

which produces:

[image: image.png]

For details on how to define the new bar lines, see
http://lilypond.org/doc/v2.25/Documentation/notation/bar-lines
But basically the two \defineBarLine lines are what actually define the
bars lines to use, then later on you use them as desired. The three bool
values after define the behavior a beginning of line, mid line, end end of
line. Those will need adjusted to your needs.
-- 
Michael


Re: fill page

2023-11-09 Thread Michael Werner
Hi David,

On Thu, Nov 9, 2023 at 10:47 AM bobr...@centrum.is 
wrote:

> I have a page of music but it is a bit short on the page.  I remember a
> long time ago that there was something involving padding (I think) as well
> as some opposing function that, when combined, would space out the systems
> to fill the page to the bottom margin.  I've been looking through the docs
> trying to find that solution but have failed.
>
> Simply put, I want the systems to spread down the page vertically to fill
> to the bottom margin.
>

 Sounds like you want ragged-last-bottom = ##f in your \paper block. Have a
look at
http://lilypond.org/doc/v2.25/Documentation/notation/fixed-vertical-spacing-paper-variables
-- 
Michael


Re: Score structure with alternate endings

2023-11-02 Thread Michael Werner
On Thu, Nov 2, 2023 at 9:43 AM N. Andrew Walsh 
wrote:

> Another question: is it possible to set the key signature for the two
> "alternate" sections to be different? I know I can hide one, but is it
> possible for different voices to have/display key signatures that are
> independent of one another?
>

Sure can, as long as each one is in its own staff. (As in, if there are
multiple voices sharing one staff they each have to be in the same key.)
You can either set the key signature at the staff level, or you can do it
at the voice level.  I prefer to put the key in with the music, something
like:

music = \relative c' {
\key c \major
c4 d e f
}

This way, the key information is carried along with the music.  You can
also put the time signature and the tempo into the music variable as well,
if you wish.  That way if you want / need to reuse the music the
information is there already.  Much of the music I deal with I'm reusing
the same music variable in multiple scores, each formatting the music
differently for different instruments.  But since the music itself is
already in a variable, reusing it like that is easy.  But that's my (rather
peculiar) individual situation and needs.  Others most certainly do things
differently.  It'll take time and a bunch of trial and error to figure out
what you need for whatever you're doing.  And then more time and more trial
and error to figure out how best to go about it.  It's a learning process.
--
Michael


Re: Score structure with alternate endings

2023-11-02 Thread Michael Werner
On Thu, Nov 2, 2023 at 7:11 AM N. Andrew Walsh 
wrote:

> One question: you add some extra padding between the two variants with an
> \override; is there a way to do the same thing for modifying the padding
> between two PianoStaff groups (but not change the staff-staff spacing
> within each of them)?
>

Absolutely. Just one catch - it has to be done differently.  For all the
gory details, I'm going to suggest you have a look through chapter 4 of the
Notation Reference, titled simply Spacing issues.  It's at
http://lilypond.org/doc/v2.25/Documentation/notation/spacing-issues
There's a lot in there, but the main thing to recognize and be aware of is
that different spacing settings get set in different places. Some can go in
a few different places (such as the staff-staff padding I added in the
example code), while others can only go in the paper block. And as it
happens, the setting you are asking about is one that has to go into the
paper block.  If you already have a paper block (for example setting
margins or indents, that kind of thing) you can just add this in. But
basically what you'll need is something along the lines of:

\paper {
  system-system-spacing.padding = #15
}

Here, system-system-spacing is the setting you want.  And each setting has
sub-settings - basic-distance, minimum-distance, padding, and
stretchability.  The docs I linked to above have all the details on what
each of those mean and how to go about changing them.  The number is the
space measured in staff spaces.  It'll probably take a bit of trial and
error to find the spacing you want, but it should be fairly straight
forward.
-- 
Michael


Re: Score structure with alternate endings

2023-11-01 Thread Michael Werner
On Wed, Nov 1, 2023 at 10:59 AM N. Andrew Walsh 
wrote:

> Hi List,
>

Hi Andrew,


> I have a client who's written a piece where he wants the last 16 bars to
> have two different variations, to be freely chosen by the performer. Sort
> of a choose-your-own-adventure score. It's scored for two voices and piano,
> but the ending(s) would only be the piano.
>
> So, grossly simplified, the score would have bars 1-53 as normal music,
> and then the performer adds a coda of either "A" or "B", each of which is a
> 16-bar section of one of the two variations. The bar numbers should be the
> same.
>
> How would I structure the score to do this? I'm thinking it'd be
> preferable to have the two variations on the top and bottom of each page,
> so that it's clear they're parallel, but I'm not sure how to set it up.
>

Well, like many things with Lilypond I'm sure there's more than one way to
do things. My take on this would be something like this:

\version "2.25.9"

length_of_main = #8
length_of_alt = #4

music_main = \relative c' {
  \repeat unfold \length_of_main { a4 b c d }
  %\break
  \repeat unfold \length_of_alt { s1 }
}

music_a = \relative c' {
  \repeat unfold \length_of_main { s1 }
  \break
  \sectionLabel \markup { \bold "A or B - pick one!" }
  \repeat unfold \length_of_alt { c4 b a b }
}

music_b = \relative c' {
  \repeat unfold \length_of_main { s1 }
  \repeat unfold \length_of_alt { e4 d c d }
}

\new StaffGroup
<<
  \new Staff \with {
instrumentName = "Main"
shortInstrumentName = "Main"
\RemoveAllEmptyStaves
  } \music_main
  \new Staff \with {
instrumentName = "A"
shortInstrumentName = "A"
\RemoveAllEmptyStaves
\override VerticalAxisGroup.staff-staff-spacing.padding = #8
  } \music_a
  \new Staff \with {
instrumentName = "B"
shortInstrumentName = "B"
\RemoveAllEmptyStaves
  } \music_b
>>

Here, music_main is the first part of the music running along by itself,
with music_a and music_b the two possible alternates. The main thing will
be to watch the spacer rests at the beginning of music_a and music_b - they
need to be the right number of measures worth. By using the variables in
the unfold statement I find it a bit easier to keep track and make sure the
right numbers are getting where they need to be. Also I've added some extra
space between the two alternates, might reinforce that they're only sorta
kinda together but not really.

Don't know if this is quite what you're after, but maybe it'll at least
serve as a starting point.
-- 
Michael


Re: fontsize of scripts.segno in \repeat segno

2023-10-30 Thread Michael Werner
On Tue, Oct 31, 2023 at 2:04 AM Paul Scott  wrote:

> How I change the font size of a segno in a \repeat segno structure?
>

You'll want https://lilypond.org/doc/v2.25/Documentation/internals/segnomark
for the details, but the short version is it's a score level override of
SegnoMark.font-size
-- 
Michael


Re: Show TacetStaff when StaffGroup empty

2023-10-30 Thread Michael Werner
On Mon, Oct 30, 2023 at 9:57 AM Pierre-Luc Gauthier <
p.luc.gauth...@gmail.com> wrote:

> Hello there,
>
> Please let this not be a duplicate.
>
> Is there a way for the tacet staff to be shown *only* when all the other
> staves are empty ? Manual intervention is not a viable option here.
>

If I understand correctly what you're after, the following seems to do the
trick:

\version "2.25.9"

\language "english"

tacet = {
  R1*40
}

musicA = {
  \repeat unfold 28 g'4 |
  \repeat unfold 4 g'4 |
  R1*10
  \repeat unfold 16 f'4 |
}
musicB = {
  R1*4
  \break
  \repeat unfold 16 c'4 |
  \break
  R1*10
  \break
  \repeat unfold 16 d'4 |
}

\new StaffGroup \with { \consists Keep_alive_together_engraver }
<<
  \new Staff \with {
instrumentName = "Tacet"
shortInstrumentName = "Tacet"
\override VerticalAxisGroup.remove-layer = 2
  } \tacet
  \new Staff \with {
instrumentName = "A"
shortInstrumentName = "A"
\RemoveAllEmptyStaves
\override VerticalAxisGroup.remove-layer = 1
  } \musicA
  \new Staff \with {
instrumentName = "B"
shortInstrumentName = "B"
\RemoveAllEmptyStaves
\override VerticalAxisGroup.remove-layer = 1
  } \musicB
>>

This is based on
http://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves
-- 
Michael


Re: Thinner Ledger Lines for Cue Notes?

2023-10-24 Thread Michael Werner
On Tue, Oct 24, 2023 at 2:50 AM YUKI  wrote:

> Hello,
>

Hi there.


> I'm working on a violin part score, and I want to make thinner ledger
> lines just for cue notes. I've tried using ledger-line-thickness but it
> seems that will affect the whole staff and normal size notes. Are there any
> other solutions for this?
>

Well, I'm not sure this is the best way to go about this. But I did come up
with something that seems to do what you want. Basically it involves
running two staves simultaneously. That way you can adjust the ledger lines
on one while the other isn't affected. You can do this by way of a
OneStaff. Details can be found at
http://lilypond.org/doc/v2.25/Documentation/notation/grouping-staves#index-OneStaff
Example code follows:

\version "2.24.1"

music = \relative c'' {
  f2\rest b4. b8 f2\rest b4. b8 f2\rest b4. b8 f2\rest b4. b8
}

cuenotes = \relative c'' {
  g8 e b e s2 s1 g8 e b e s2 s1
}

\score {
  \new OneStaff <<
\time 2/2

\new Staff = "main_music" {
  \music
}

\new Staff = "cue_notes" \with {
  \override StaffSymbol.ledger-line-thickness = #'(0.35 . 0.1)
} {
  \new CueVoice {
\cuenotes
  }
}

  >> % End OneStaff
} % End Score

\layout {
  \context {
\OneStaff
\consists Time_signature_engraver
  }
  \context {
\Staff
\remove Time_signature_engraver
  }
}

I've split the music entries out each into their own variable. To me, this
makes it easier to keep track of things. Spacer rests will be used to keep
things lined up as needed.  Also, you'll see in the music variable that the
r2 has been replaced by f2\rest  This is needed to raise the rest up to the
desired position. The rests aren't automatically placed higher, I'm
guessing because instead of two voices in one staff it's two staves
occupying the same vertical position. So a little more manual control on
spacing will be needed in cases like this. If you haven't run into the use
of the \rest command before, more of a description is at
http://lilypond.org/doc/v2.25/Documentation/notation/rests#index-_005crest

Next up is instantiating each of the various staves. The OneStaff is a
grouping staff, that can contain other staves and place them into the same
vertical space, instead of one above another like a StaffGroup or
GrandStaff would do. This is how you can effectively have two staves
running in the same place at the same time. This is also how you can adjust
the ledger lines for just the cue notes, by having them inhabit their own
separate staff. Also note that the two staves are grouped using the angle
brackets (i.e. << >>) instead of the curly brackets. This way the two
staves are running simultaneously. And, of course, the values for adjusting
the ledger lines will need adjusted according to your desires.

The layout block at the end moves the time signature engraver from the
individual staves to the OneStaff. Since the two staves are running at the
same time, I'm not sure this is actually needed. But it doesn't seem to
hurt, either.

Granted, I've only done a limited amount of testing on this. But so far it
seems to be working as desired. If nothing else, maybe it can at least
serve as a starting point.
-- 
Michael


Re: markup on ambitus?

2023-10-21 Thread Michael Werner
Hi Graham,

On Sat, Oct 21, 2023 at 9:48 AM Graham King  wrote:

> In the following MWE, is it possible to put a small markup above each
> ambitus to signify the voice to which the ambitus belongs?
>
> I'm just failing to see where to attach ^\markup { foo }
>

I couldn't find a place to directly attach a markup either. But I did come
up with a somewhat hack-ish workaround that seems to sorta kinda work, in a
somewhat roundabout way. I found that the Balloon_engraver can be pressed
into service to (more or less) do what you're looking for. By setting the
BalloonText.annotation-balloon to false the box that normally is drawn
around the target grob is removed. If you want the pointer line to be
removed, uncomment the marked line. For more details,
https://lilypond.org/doc/v2.25/Documentation/internals/balloontext
and
http://lilypond.org/doc/v2.25/Documentation/notation/balloon-help
contain all the gory details.

\version "2.25.9"

\new Staff <<
  \new Voice = "c_Instr" \with {
\consists "Ambitus_engraver"
\consists "Balloon_engraver"
  }
  \relative {
\override BalloonText.annotation-balloon = ##f
%\override BalloonText.annotation-line = ##f % Uncomment to remove the
pointer line
\balloonGrobText Ambitus #'(-2 . 4) \markup { \tiny "C Instr" }
c' d e f
  }

  \new Voice = "c_Singer" \with {
\consists "Ambitus_engraver"
\consists "Balloon_engraver"
  }
  \relative {
\override BalloonText.annotation-balloon = ##f
%\override BalloonText.annotation-line = ##f % Uncomment to remove the
pointer line
\balloonGrobText Ambitus #'(2 . 4) \markup { \tiny "C Sing" }
\override Ambitus.X-offset = #2.5
s1 a'4 b c d
  }
>>
-- 
Michael


Re: How to define a turn with two accidentals

2023-10-13 Thread Michael Werner
Hi Vlad,

On Fri, Oct 13, 2023 at 6:02 AM Volodymyr Prokopyuk <
volodymyrprokop...@gmail.com> wrote:

> I'd like to create a *music function* for convenience to be used like \after
> 4. { \udTurn \sharp \natural } g=''2 a8 g f e |
>
> How do I create a music function for this purpose? I've tried the
> following with the *error* of unknown command \sharp
>
>   udTurn = #(define-music-function (up down) (markup? markup?)
> #{ \markup \center-column {
>   \raise #-1 \teeny #up
>   \musicglyph "scripts.turn"
>   \lower #-1 \teeny #down
> } #})
>

I got something that seems to work by switching from a music function to a
markup function. This code:

 \version "2.24.2"

#(define-markup-command (udTurn layout props up down) (markup? markup?)
   (interpret-markup layout props
   #{ \markup { \center-column {
 \raise #-1 \teeny #up
 \musicglyph "scripts.turn"
 \lower #-1 \teeny #down
}
   } #} ))

\new Score {
  \new Staff {
\new Voice {
  \after 4. ^\markup{ \udTurn \sharp \natural }
  g''2 a8 g f e
  \after 4. ^\markup{ \udTurn \flat \sharp }
  g''2 a8 g f e
}
  }
}

is producing:

[image: image.png]

Might not be the best way to go about this, but it seems to be working as
described. Hopefully at least enough to get started with.
-- 
Michael


Re: Alternating time signature with cue clef

2023-09-28 Thread Michael Werner
On Wed, Sep 27, 2023 at 12:59 PM Knute Snortum  wrote:

> On Tue, Sep 26, 2023 at 11:25 PM Michael Werner 
> wrote:
>
>> Hi Knute,
>>
>> On Tue, Sep 26, 2023 at 3:27 PM Knute Snortum  wrote:
>>
>>> TL;DR
>>> How do I engrave an alternating time signature and an initial cue clef?
>>>
>>> [snip]
>
>>
>> What about using a CueVoice, resetting sizes back to default? It seems to
>> work both visually and listening to the midi produced. I've attached some
>> code that engraves the first 7 measures of the Scriabin piece. Within the
>> CueVoice I did have to explicitly set the slur, stem and articulation
>> directions - apparently CueVoice either overrides or ignores voiceOne and
>> voiceTwo settings in those regards. Quite likely there are better ways to
>> go about this, but maybe this can at least get something going.
>> --
>> Michael
>>
>>
> Thanks Michael for your work on my problem.  I'm impressed that you
> figured out the prelude I was working on and wrote out two staves worth of
> music!
>

You're quite welcome. It was a welcome change from the old time folk /
Appalachian and Irish traditional I've been working with recently.


> I think I did myself a disservice by calling what I want a "cue clef".
>

Yeah, that kinda threw me. I have a bad tendency to get too focused on an
idea instead of stepping back to look at the wider view. Been trying to
break myself of that. Still needs work. Ah well.


>   I believe what I want is a "change clef" -- it's bigger than a cue clef
> but smaller than a regular clef.  It's what you get when you engrave this
> snippet:
>
> { c'4 4 4 4 | \clef bass 4 4 4 4 }
>
> ...or in markup:
>
> \markup \musicglyph "clefs.F_change"
>

Anyway, the good news here is I think I might have cracked it, with a bit
of help from the LSR. But a different entry than you found - the one that
seems to have gotten me there is https://lsr.di.unimi.it/LSR/Item?id=956
I've attached an updated version - the F clef at the beginning of the first
measure is noticeably bigger than the original I posted yesterday.
Yesterday's is on the left, the updated version on the right.
[image: image.png]

Short version - the magic ingredient seems to be a hidden grace note right
at the beginning.
-- 
Michael
\version "2.24.2"
\language "english"

%%% Alternating time 
#(define ((time-alternate-time upa downa upb downb) grob)
   (grob-interpret-markup grob
  (markup #:override '(baseline-skip . 0) #:number
  (#:line (
(#:center-column (upa downa))
(#:center-column (upb downb)))

\header {
  title = "Twenty-Four Préludes"
  composer = "Alexander Scriabin"
}

upperUpper = \relative {
  \key bf \minor
  \clef treble
  \partial 8
  %% This technique courtesy of https://lsr.di.unimi.it/LSR/Item?id=956
  %%  Use a hidden grace note:
  \once\hideNotes\grace c64
  %%  Adjust the clef spacing:
  %\once\override Staff.Clef.X-extent = #'(1 . 2)
  %%  Put in the clef:
  \clef F
  r8^\markup { \italic \small "sotto voce" } | bf'4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 |
  f4.( f8) r8 | e4.( e8)
  \clef treble
  r8 | f4. r4
}

upperLower = \relative {
  \key bf \minor
  \clef treble
  \partial 8
  %%  Use a hidden grace note:
  \once\hideNotes\grace c64
  %%  Adjust the clef spacing:
  %\once\override Staff.Clef.X-extent = #'(1 . 2)
  %%  Put in the clef:
  \clef F
  \tuplet 3/2 { bf16( c16 ef16 } | bf'8[ af ef gf df] | f[ c df]) \tuplet 3/2 {bf16( df16  gf16 } |
  df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } |
  f'8[ ef bf df]) \tuplet 3/2 { c,16( gf'16 bf16 } | e8[ df bf c])
  \clef treble
  \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf])
}

lowerUpper = \relative {
  \key bf \minor
  \clef F
  \voiceOne
  \partial 8
  \once\hideNotes\grace c64
  r8
  bf4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 |
  f4.( f8) r8 | e4.( e8) r8 | f4. r4
}

lowerLower = \relative {
  \key bf \minor
  \clef F
  \voiceTwo
  \partial 8
  \once\hideNotes\grace c64
  \tuplet 3/2 { bf,16(_\markup { \small "una corda" } c16 ef16 } | bf'8[ af ef gf df] | f[ c df)] \tuplet 3/2 { bf16( df16 gf16 } |
  df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df)] \tuplet 3/2 { c,16( gf'16 bf16 } |
  ef8[ df bf c]) \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf])
}

timeSignatures = {
  \override Score.TimeSignature.stencil = #(time-alternate-time "5" "8" "4" "8")
  \time 5/8
  \partial 8 \once\hideNotes\g

Re: Alternating time signature with cue clef

2023-09-26 Thread Michael Werner
Hi Knute,

On Tue, Sep 26, 2023 at 3:27 PM Knute Snortum  wrote:

> TL;DR
> How do I engrave an alternating time signature and an initial cue clef?
>
> Scriabin has a prelude where he has written a time signature as
> alternating 5/8 and 4/8 time.  After the initial one, no other time
> signatures are written. I have figured out a way to engrave this with help
> from a LSR entry.
>
> Also, the first notes in the right hand are in bass clef.  I want to
> engrave the initial clef in the right hand as treble, then after the time
> signature have a cue bass clef.  Lukas-Fabian Moser wrote a solution for
> that (thanks!)
>
> The problem is those two solutions don't work together. (Looking at them,
> I can see why they wouldn't.)  I am not clever enough to merge the two
> solutions or think of a third.  Can anyone help me?
>
> I've attached a screenshot of what I'm trying to engrave.  Also attached
> is my attempt to use the two solutions, but without success.
>

What about using a CueVoice, resetting sizes back to default? It seems to
work both visually and listening to the midi produced. I've attached some
code that engraves the first 7 measures of the Scriabin piece. Within the
CueVoice I did have to explicitly set the slur, stem and articulation
directions - apparently CueVoice either overrides or ignores voiceOne and
voiceTwo settings in those regards. Quite likely there are better ways to
go about this, but maybe this can at least get something going.
-- 
Michael
\version "2.24.2"
\language "english"

%%% Alternating time 
#(define ((time-alternate-time upa downa upb downb) grob)
   (grob-interpret-markup grob
  (markup #:override '(baseline-skip . 0) #:number
  (#:line (
(#:center-column (upa downa))
(#:center-column (upb downb)))

\header {
  title = "Twenty-Four Préludes"
  composer = "Alexander Scriabin"
}

upperUpper = \relative {
  \key bf \minor
  \new CueVoice {
\set fontSize = #0
\override Beam.length-fraction = #1
\override Stem.length-fraction = #1
\override Beam.beam-thickness = #0.48
\override Script.direction = #UP
\cueClef "bass"
\stemUp
\slurUp
\partial 8 r8^\markup { \italic \small "sotto voce" } | bf4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 |
f4.( f8) r8 | e4.( e8)
\cueClefUnset
  } % End CueVoice
  r8 | f4. r4
}

upperLower = \relative {
  \key bf \minor
  \new CueVoice {
\set fontSize = #0
\override Beam.length-fraction = #1
\override Stem.length-fraction = #1
\override Beam.beam-thickness = #0.48
\override Script.direction = #DOWN
\cueClef "bass"
\stemDown
\slurDown
\partial 8 \tuplet 3/2 { bf,16( c16 ef16 } | bf'8[ af ef gf df] | f[ c df]) \tuplet 3/2 {bf16( df16  gf16 } |
df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } |
f'8[ ef bf df]) \tuplet 3/2 { c,16( gf'16 bf16 } | e8[ df bf c])
\cueClefUnset
  } % End CueVoice
  \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf])
}

lowerUpper = \relative {
  \key bf \minor
  \clef bass
  \voiceOne
  \partial 8 r8
  bf,4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 |
  f4.( f8) r8 | e4.( e8) r8 | f4. r4
}

lowerLower = \relative {
  \key bf \minor
  \clef bass
  \voiceTwo
  \partial 8 \tuplet 3/2 { bf,,16(_\markup { \small "una corda" } c16 ef16 } | bf'8[ af ef gf df] | f[ c df)] \tuplet 3/2 { bf16( df16 gf16 } |
  df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df)] \tuplet 3/2 { c,16( gf'16 bf16 } |
  ef8[ df bf c]) \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf])
}

timeSignatures = {
  \override Score.TimeSignature.stencil = #(time-alternate-time "5" "8" "4" "8")
  \time 5/8
  \partial 8 s8
  \override Score.TimeSignature.stencil = ##f
  \time 5/8 s4. s4 | \time 4/8 s2 | \time 5/8 s4. s4 | \time 4/8 s2 | \time 5/8 s4. s4 | \time 5/8 s4. s4 |
  \time 5/8 s4. s4
}

dynamicMarks = {
  \override DynamicTextSpanner.style = #'none
  \partial 8 s8\p s4. s4 s2  s4. s4 s2 s8-\cresc s2 s4. s4 s8-\dim s2\!
}

\score {
  \new PianoStaff <<
\new Staff
<<
\tempo  \markup { Misterioso \rhythm { { 8 } }  = 160-168 }
  \mergeDifferentlyHeadedOn
  \mergeDifferentlyDottedOn
  \new Voice = "upperUpper" {
\relative {
  \voiceOne
  \upperUpper
}
  }
  \new Voice = "upperLower" {
\relative {
  \voiceTwo
  \upperLower
}
  }
>>
\new Dynamics {
  \dynamicMarks
}
\new Staff
<<
  \mergeDifferentlyHeadedOn
  \mergeDifferentlyDottedOn
  \new Voice {
\lowerUpper
  }
  \new Voice {
\lowerLower
  }
>>
\new Devnull \timeSignatures
  >>
  \layout {
  }
  \midi {
  }
}


Re: Automatic annotation of slide positions/fingerings for brass instruments.

2023-08-29 Thread Michael Werner
On Sat, Aug 26, 2023 at 8:45 AM samarutuk  wrote:

> Hello,
>
> I have been looking for a long time for a way to automatically annotate
> slide positions or fingerings for brass instruments below or above the
> notes. There have been one or two requests for this, but never a complete
> solution, at least the oracle of Google has not been able to tell me
> anything wise.
>

Hi Andreas,

I'm not all that great at all this, but I managed to put something together
that seems to do what you're asking for. It's based on some code I wrote
for myself a little while back to automatically do tin whistle fingering
diagrams. It runs in a NoteNames context, and can be placed either above or
below the staff - whichever you want. It ain't pretty, and it sure ain't
elegant. But it does the job. I've attached the two include files - one for
trumpet, one for trombone. Place them wherever works for you, then include
them into your score with the usual \include command.

One caveat for you to bear in mind - the trumpet fingerings and the
trombone slide positions are based on charts I found via Google searches. I
don't play either of them. My knowledge of brass instruments is pretty much
that you blow in one end, sound comes out the other end, and there's fiddly
bits in the middle you mess around with to change the sound.

If nothing else, perhaps these can serve as a starting point for someone
that knows more about these instruments.

Some example code showing the use of these files:

\version "2.25.7"
\language "english"

\include "trombone_slide_positions.ily"
\include "trumpet_fingerings.ily"

trombone_music = \relative c, {
  c4 cs df d ds ef e f fs gf g gs af a as bf b c cs df d ds ef e f fs gf g
  gs af a as bf b c cs df d ds ef e f fs gf g gs af a as bf b cf c cs df d
}

trumpet_music = \relative c' {
  d,4 ef e f fs4 gf g gs af a4 as bf b c4 cs df d ef e f fs gf g
  gs af a as bf b c cs df d ds ef e f fs gf g gs af a as bf b
  c cs df d ds ef e f fs g gs af a as
}

\score {
  \new StaffGroup <<

\new NoteNames {
  %#(define myFontSize -5)  % this line would override the size of the
slide positions produced
  \set noteNameFunction = #myTrombonePositions
  \trombone_music
}

\new Staff {
  \clef "bass"
  \trombone_music
}

  >>
}

\score {
  \new StaffGroup <<
<<

  \new NoteNames {
%#(define myFontSize -5)  % this line would override the size of
the fingerings produced
\set noteNameFunction = #myTrumpetFingerings
\trumpet_music
  }

  \new Staff {
\trumpet_music
  }

>>
  >>

}

Hopefully this will at least give you a starting point to work with.
-- 
Michael


trumpet_fingerings.ily
Description: Binary data


trombone_slide_positions.ily
Description: Binary data


Re: Help Needed to make chord chart over two pages

2023-08-27 Thread Michael Werner
On Sat, Aug 26, 2023 at 8:45 AM JacquelineUkulele-Guitar Grant <
jackiemusicgr...@hotmail.com> wrote:

> Hi All
>

Hi Jacqueline,


> I am new to this Lilipond user help group, I aplopgize if I am breaking
> any rules are guideline.
>
> I have been use Lilypond for a few year, even though I do not fully
> understand it.
>
> I am trying to make a Chord Chart that goes over two pages, in what I call
> a "ukulele layout".  A "ukulele layout" being where the chords are in
> line with the lyrics.
> I also, in the long run, I am looking to do a other layout of the same
> song but in what I call  a "guitar layout". A "guitar layout" being where
> the chords are above the lyrics.
> For both of the layouts I want the option of going over two page, should I
> need to.
>
> Here is the code for the "ukulele layout", which fills up one page., but
> if I try and add another verse (just as a test) it goes funny!
> Thanks
>

First of all, I'm certainly no expert. So there may well be better ways to
do these things. But, here goes.  First off:

 \version "2.18.2"  % necessary for upgrading to future LilyPond versions.
>

This version is *really* old. I would strongly recommend upgrading to the
latest version, which at this moment is 2.24.2 for the stable branch.


>  \header{
>
>   title = "ODE TO BILLIE JOE - KEY // - VERSION 2"
>
>   subtitle = "For melody"
>
> arranger = "HELP NEEDED TO DO A TWO PAGE CHORD CHART"
>
> copyright = "HELP NEEDED TO DO A TWO PAGE CHORD CHART"
>
> tagline = "HELP NEEDED TO DO A TWO PAGE CHORD CHART"
>
>
>
> }
>
>
>
> \layout {
>
>  indent = 0.0
>
>  }
>
>
>
> melody = \relative c' { \key a \major
>
> |  \partial 4.  e'8  e8[  e8]  | e4  e8 e8  r8 e8  e8[ e8]  | e8[ e8]  a8
> a8  e8 e4 e8 ~ | e1  |
>
> }
>
> text = \lyricmode {
>
> \set stanza = #" " It was the third of June a -- no -- ther sleep -- y,
> dust -- y, Del -- ta Day.
>
> }
>

If you aren't going to be using stanza numbers you actually don't need to
use \set stanza - it defaults to not putting a stanza number. So the above
line can become:

text = \lyricmode {
  It was the third of June a -- no -- ther sleep -- y, dust -- y, Del -- ta
Day.
}


>  \score{ <<
>
> \new Voice = "one" { \melody }
>
> \new Lyrics \lyricsto "one" \text
>
> >>
>
> \layout { }
>
> }
>
>
>
> \markup { \column {
>

And the line right above here is the problem. The \markup command creates a
single markup block, which isn't readily breakable by Lilypond's page
breaking system. What's needed here is instead the \markuplist command.
This creates a series of single lines that are easily and smoothly
breakable as needed. One possible caveat is that a verse could wind up
split by a page break. If you want to keep each verse as an intact block
then each verse can be wrapped in a \column block.


>  % Verse One
>
> \line   \fontsize #-0.8 { Verse 1}
>
>
>
> \line   \fontsize #-0.8 { It was the \bold [D7]  third of \bold [D7/A]
> June another \bold [Am7] sleepy, dusty, Delta \bold [D7] day. \bold [D7/A]
> \bold [D7]  \bold [D7/A]}
>
>
>
> \line   \fontsize #-0.8 { I was  \bold [D7] out chopping cotton, and my
> \bold [Am7] brot-her was bailing \bold [D7] hay. \bold [D7/A] \bold [D7]
> \bold [D7/A]  }
>
>
>
> \line   \fontsize #-0.8 { And at  \bold [G7] din-ner time we stopped and
> walked \bold [G7] back to the house to \bold [G7] eat. }
>
>
>
> \line  \fontsize #-0.5 {And momma  \bold [D7] holler-ed out the back door
> 'y'all re- \bold [D7] -mem-ber to wipe your \bold [D7] feet'. }
>
>
>
> \line  { And then she  \bold [G7] said I got some news this \bold [G7]
> morn-in' from Choctaw \bold [G7] Ridge.  }
>
> \line  \fontsize #-0.5 { Today  \bold [D7] Bill-ie Joe McAllister jumped
> \bold [C7] off the Tallahatchie \bold [D7] Bridge.  \bold [D7/A] \bold
> [D7] \bold [D7/A]  }
>

With all the \fontsize commands here, I would suggest just putting a single
one at the top so as to affect all the text at once. That would help keep
things more uniform in appearance.


>  %to make a line look blank, for vertical space between lines
>
> \line   \fontsize #-40 {. }
>

A better way to do this is use the \vspace command. It's specifically made
to handle this. I tend to use a single variable with this - that way I can
adjust all the spacing at once and keep it uniform.

I've snipped the rest as it's basically just repeating all this so far. The
code for the verses would then be:

\score {
  <<
\new Voice = "one" { \melody }
\new Lyrics \lyricsto "one" \text
  >>
  \layout { }
}

section_spacing = 1 % This is the variable for the spacing between verses

\markuplist {
  \fontsize #-1 {

\vspace #1.5

\column {
  % Verse One
  \line { Verse 1 }
  \line { It was the \bold [D7]  third of \bold [D7/A] June another
\bold [Am7] sleepy, dusty, Delta \bold [D7] day. \bold [D7/A]  \bold [D7]
 \bold [D7/A] }
  \line { I was  \bold [D7] out chopping cotton, and my \bold [Am7]
brot-her was bailing \bold [D7] hay. \bold [D7/A] \bold [D7] \bold [D7/A] }
  \li

Re: Markup block that "interrupts" the header?

2023-08-23 Thread Michael Werner
Hi Joseph,

On Mon, Aug 21, 2023 at 8:08 PM Joseph Srednicki 
wrote:

> Hello:
>
> When coding organ pieces, I want the registration to appear following the
> header.
>
> In the following example, I inserted the registration in a markup block
> before the score block. When Lilypond renders the music, there is a large
> gap between the lines containing the composer's name and the opus number.
> The markup block containing the registration seems to "interrupt" the
> header.
>
> What is the recommended best way to code what I am trying to accomplish so
> that the markup block does not interrupt the header?
>
> I searched for an example but did not find appropriate results. If I
> missed something in the documentation or Lilypond snippets that will
> address this situation, please feel free to send me the link.
>

Short version: check
http://lilypond.org/doc/v2.24/Documentation/notation/custom-titles-headers-and-footers

Longer version:

One option that you might consider would be to define your own custom
header field for the registration. This can then be placed as desired in
the order of the various header fields. The page I linked above gives more
details on how to do that - it can be done at either the book level or for
each individual score. I modified your example to do this at the score
level, as such:

\version "2.24.0"
\language "english"

\paper {
  scoreTitleMarkup = \markup {
\column {
  \if \should-print-all-headers { \bookTitleMarkup \hspace #1 }
  \fill-line {
\fromproperty #'header:piece
\fromproperty #'header:opus
  }
  \fromproperty #'header:myRegistration  % By placing the definition
here it follows along below the Opus entry, so as to not displace it
}
  }
}

\header {
  title = \markup {\fontsize # -3 "Organ Piece"}
  subtitle = \markup {II.}
  composer = \markup {\fontsize # -3 "Composer Name (1685-1759)"}
  opus = \markup {\fontsize # -3 "Opus 3, No. 2"}
  tagline = ##f
  myRegistration = \markup {  % And here we give the info for the new
myRegistration header field, in the same way as any other header
\tiny {
  \left-column {
\line { "Registration:" }
\line { "I-II-III: Fonds 8, 4, Mixtures" }
\line { "Pd.: Fonds 16, 8, I-II-III" }
  } % end left-column
} % end tin
  } % end markup
}

global = {
  \key f \major
  \numericTimeSignature
  \time 4/4
}

tu = \markup {"Tutti"}

rightOne = \relative c'' {
  \global
  \once \override Score.MetronomeMark.Y-offset = #+10
  \tempo \markup {"Allegro"} 4=100
  \partial 8 c8^\markup \raise #2.5 {"Tutti"} | % pickup
}

rightTwo = \relative c' {
  \global
  \partial 8 s8 | % pickup
}

leftOne = \relative c'' {
  \global
  \clef treble
  \partial 8 r8 | % pickup
}

leftTwo = \relative c'' {
  \global
  \partial 8 s8 | % pickup
}

pedal = \relative c {
  \global
  \partial 8 r8 | % pickup
}


\score {
  <<
\new PianoStaff <<
  \new Staff = "right" << \rightOne \\ \rightTwo >>
  \new Staff = "left" { \clef bass << \leftOne \\ \leftTwo >> }
>>
\new Staff = "pedal" { \clef bass \pedal }
  >>
}

The custom headers can also be done at the book level, but all the gory
details can be found in the docs, starting with the page I linked above.
Hope that's enough to at least get you started. There's likely better
and/or more elegant ways to do this - I'm certainly no expert. But this
does at least seem to work, so may at least serve as a starting point.

One other point - if this solution works well enough for you, might
consider splitting the \paper block with the custom headers definitions out
into an include file of some kind. That may help keep things consistent.

-- 
Michael


Re: Is there a better way to have a boxed part letter at the beginning of an arbitrary line?

2023-08-16 Thread Michael Werner
Hi Kevin.

It sounds like you might be able to do want you want with rehearsal marks.
They're built into Lilypond and do pretty much what you seem to be
describing. Details at
http://lilypond.org/doc/v2.24/Documentation/notation/bars#index-rehearsal-mark
A modification of your MWE using them:

\version "2.24.2"
\language "english"

melody = \relative c' {
  \set Score.rehearsalMarkFormatter = #format-mark-box-letters
  \time 6/8
  \key d \major
  \clef treble

  \mark \default
  d8[ e8 e8] g8[ a8 b8] |
  \break
  \mark \default
  d8[ e8 e8] g8[ a8 b8] |
  \fine
}

\score {
  \new Voice = "mel" { \melody }

  \layout {
\autoBeamOff
indent = 0\mm
  }
}

The \set Score.rehearsalMarkFormatter = #format-mark-box-letters part
reformats the marks to display as letters inside a box - the default is
just a letter. By doing \default after the \mark Lilypond simply uses the
letters sequentially. If needed, the position of the marks can be adjusted.
Again, details on that are in the page linked above.

-- 
Michael


Re: Need help displaying note names in 2.22

2023-08-06 Thread Michael Werner
Hi Victor,

On Sat, Aug 5, 2023 at 7:12 PM Viktor Mastoridis <
viktor.mastori...@gmail.com> wrote:

> Hello,
>
> I have been using the syntax below for several years; the last code update
> I did was in December 2022, and it worked well since.
> Today I noticed that I can't get the sharp/flat note names properly.
> C# & Eb are not displayed.
> Can you please help?
> ---
>
>
> \version "2.22.1"
> chimenames =
> #`(
> ("c" . "C")
> ("cis" . "C♯")
>("d" . "D")
>   ("es" . "E♭")
>)
>
> ChimeNoteNames =
> #(lambda (grob)
> (let* ((default-name (markup->string (ly:grob-property grob 'text)))
>(new-name (assoc-get default-name chimenames)))
>   (ly:grob-set-property! grob 'text new-name)
> (ly:text-interface::print grob)))
>

Is the main idea here to just get the note names displayed in uppercase? If
so, I've been doing basically the same thing with this:

\version "2.25.6"

music = \relative c { c, cis d es }

\score
{
  <<
\new TabStaff
\with {
  stringTunings = #bass-tuning
}
{ \music  }

\new NoteNames {
  \set noteNameFunction = #(lambda (pitch ctx)
 (markup #:sans (note-name->markup pitch #f))
 )

  \music
}
  >>
  \layout { }  \midi { }
}

It might not be perfect but it gets the job done. For reference, the
note-name->markup function reference is:

*Function:* *note-name->markup** pitch lowercase?*

Return pitch markup for pitch, including accidentals printed as glyphs. If
lowercase? is set to false, the note names are capitalized.
-- 
Michael


Re: Liszt's accents

2023-06-01 Thread Michael Werner
Hi Knute,

On Thu, Jun 1, 2023 at 11:37 AM Knute Snortum  wrote:

> I'm interested in how you apply a marcato articulation to a group of
> notes.  For example, this doesn't work:
>
> \version "2.24.1"
>
> { c''8 8 {8 8  8}-^ 8 8 8 }
>

I found
https://lsr.di.unimi.it/LSR/Snippet?id=82
which seems to do what you're asking about. Well, after a small tweak. The
example is set up for staccato, but is easily changed for whatever
articulation you want.

-- 
Michael


Re: Colored circle around note

2023-05-13 Thread Michael Werner
Hi Luca,

I'm still trying to learn more about Scheme myself, but I managed to come
up with an adaptation of that snippet that seems to work. There's probably
a better way to do this, but here goes:

circleB =
\once \override NoteHead.stencil =
#(lambda (grob)
   (let* ((note (ly:note-head::print grob))
  (combo-stencil (ly:stencil-add
  note
  (ly:stencil-translate-axis
   (stencil-with-color (make-circle-stencil 1.5 0.1
#f) red)
   (interval-center (ly:stencil-extent note X))
   X
 (ly:make-stencil (ly:stencil-expr combo-stencil)
  (ly:stencil-extent note X)
  (ly:stencil-extent note Y

{
  \circleB c'' \circleB c'' \circleB c''2
  \circleB c''1 \circleB c''8 \circleB a'8
  \circleB b'16 \circleB c''16 \circleB b'16 \circleB a'16
  \circleB f'2
}

produces:

[image: image.png]

The 1.5 after the make-circle-stencil is the diameter of the circle, and
the 0.1 is how thick the line is. You may well need to fiddle with those
two numbers to get the size and thickness of the circle to your desire. The
#f is for fill - if set to true the circle gets filled in.

Michael


Re: help with Wrong type of argument

2023-04-30 Thread Michael Werner
Hi Jeff,

To say I'm no expert in Scheme is a vast understatement. However, I think I
found the answer to this one. Or, at least, something that seems to make
this code work for me here.

On Mon, May 1, 2023 at 1:00 AM Jeff Olson  wrote:
%< snip >%

> Here's my code (small if not minimal):
>
> \version "2.24.0"
>
> #(define-markup-command (dopath layout props xtip ytip hgt wid txt rot)
>(number? number? number? number? string? number?)
>(let (
>   (a (* wid 0.4))
>   )
>(interpret-markup layout props
>  #{\markup \translate #(cons xtip ytip) \rotate #rot \path #0.25
>

 Basically, as I understand things, this bit:


>#'((lineto 0 hgt)
>

Accosrding to my rather vague understanding of Scheme syntax the ' between
the # and the 1st ( is saying don't interpret anything in that expression,
just pass it as is. Which means that your variable hgt isn't getting passed
as a variable but is getting passed as simply a series of three characters.
What seems to be needed (and what made this appear to work here) is to use
what's called quasiquoting. Basically, it lets you designate certain bits
within an expression as "this part should be interpreted before getting
passed on". This entails changing the above line to:

#`((lineto 0 ,hgt)

By changing the ' into a ` (BTW, that's the one that on my keyboard is up
near the top left, just under the Escape key) you say that there's
something in the following expression that will need interpreted. Then the
comma before the variable name points out which item to interpret. There's
a great deal more to all this, but this is the bare basics as I sorta kinda
vaguely understand them. All the gory details can be found at:

https://extending-lilypond.gitlab.io/en/scheme/quoting.html


>   (closepath))
>#})))
>
> \markup \dopath #10 #0 #2 #1 "D" #-5
>

Hope this helped at least a little. Or at least didn't confuse things worse.

Michael


Re: Default beam exceptions for 4/4

2023-04-26 Thread Michael Werner
Hi David,

Looks like what you want is \overrideTimeSignatureSettings
Details on how it works can be found at
http://lilypond.org/doc/v2.25/Documentation/notation/time-signature#index-_005coverrideTimeSignatureSettings

But a basic example is as follows:

\version "2.25.4"

\new Staff = "main" {

  \overrideTimeSignatureSettings
  4/4% timeSignatureFraction - i.e. the time signature
  1/4% baseMomentFraction - what note duration to base this on
  1,1,1,1% beatStructure - this is the beat pattern
  #'()   % beamExceptions - needed to disable the defaults, or some
such thing

  \new Voice {
\time 4/4

\relative c' {
  d4 d4. e8 e e
}
  }
}

which produces:

[image: image.png]
I haven't tested this extensively on various 8th note patterns to make
sure, but so far it seems to do the trick.
Hopefully that'll be enough to get you started in the right direction ... I
think.

Michael


Re: System-system spacing and ragged-last-bottom with multiple scores

2023-04-16 Thread Michael Werner
Hi Ralph,

On Sun, Apr 16, 2023 at 11:27 AM Ralph Palmer 
wrote:

>
> I'm having a problem with system-system spacing and ragged-last-bottom in
> a \Book with multiple scores. I was able, at some point, to do a ragged
> last bottom on the first score, but the systems were too close for my
> comfort. I've looked a lot at what seem to be the appropriate places in the
> Notation Reference, but I cannot figure out how to configure the context
> within the first score to control either the ragged bottom or the
> system-system distance, much less both.
>

Both system-system-spacing and ragged-bottom  need to be placed in a \paper
block, not a \layout block. There are limits on where a \paper block can be
put. In this case what I would do (and there could very well, and probably
are, better ways but this is what I came up with) is to put each of the
scores into its own \bookpart section, as a \bookpart is one of the places
a \paper block is allowed. This also obviates the need for the \pagebreak,
as that is automagically put in by using a \bookpart. Also,
system-system-spacing is comprised of 4 elements, each of which gets set
seperately. Have a look at
http://lilypond.org/doc/v2.24/Documentation/notation/the-paper-block
and
http://lilypond.org/doc/v2.24/Documentation/notation/flexible-vertical-spacing-paper-variables
for some details on how it works. But a short version is try something like:

\book {
  \header {
title = "Test"
subtitle = "system spacing"
  }

  \bookpart {
  \paper {
system-system-spacing.padding = #8
ragged-last-bottom = ##t
  }
\score {
  \header {
piece = \markup \fill-line \huge \bold { "First" }
  }
  \new ChoirStaff
  <<
\new Staff
<< \IVlaI >>
\new Staff
<< \IVlaII >>
  >>
}
  }

  %  \pageBreak

  \bookpart {
\score {
  \header {
piece = \markup \fill-line \huge \bold { "Second" }
  }
  \new ChoirStaff <<
\new Staff
<< \IIVlaI >>
\new Staff
<< \IIVlaII >>
  >>
  \layout {}
}
  }
}

This should get you started along towards what it sounds like you're trying
to do.

Michael


Re: Recursive includes

2023-04-16 Thread Michael Werner
Hi Michael,

On Sun, Apr 16, 2023 at 5:00 AM Michael Dietz 
wrote:

> Hi Lilypond users,
>
> I had an issue with a file which repeatedly crashed my computer. It took
> all memory. The error is clearly on the user’s side: I had this line in
> a file (let’s say) choir.ly:
>
> \include choir.ly
>
> So LilyPond recursively included this file over and over again until the
> RAM was full.
>
> That leads me to my question: Could lilypond catch this user error and
> (a) know that it included it already and skip over the \include command
> the second time or (b) warn the user and stop compiling the file (or any
> other reasonable approach) to help the user?


Found a bit in the LSR a while back that addresses this. In a brief test it
seems to do the trick.

>From http://lsr.di.unimi.it/LSR/Item?id=894

% includeOnce: include a file only if it hasn't already been included.
% Usage: \includeOnce "my_file.ily"
% By Marnen Laibow-Koser 
% Based on http://lsr.di.unimi.it/LSR/Snippet?id=657
% and
% http://lilypond.1069038.n5.nabble.com/conditional-include-td140471.html


includeOnce =
#(define-void-function (filename) (string?)
   (if
(not (defined? (string->symbol filename)))
(begin
 (ly:parser-include-string
  (string-concatenate
   (list "\\include \"" filename "\"")))
 (primitive-eval (list 'define (string->symbol filename) #t)

Hopefully that'll help out.

Michael


Re: Coda without line break

2023-04-15 Thread Michael Werner
Hi John,

On Sat, Apr 15, 2023 at 7:03 AM John McWilliam 
wrote:

> Hi,
>
> The enclosed attachment illustrates a Coda including a
> line break, however:
>
>
Well, actually it's illustrating two entirely separate scores that happen
to be on the same page. The two \score blocks make that happen. If it was
just a line break that section would have been something like

\score {
   \musicMain
   \break
   \musicCoda
}


>1. I want to remove the line break and have the Coda on line 1 keeping
>the jump text between the Main  and the Coda.
>2. Also, there should some space between the jump text and the start
>of the coda.
>3. I would also like to move the jump text to the left a little to
>reduce the empty space there but reducing the ”repeat unfold” on line 20
>from 4 – 2 did not have the desired effect.
>
>
If I'm understanding what you want, try something like this:

 \version "2.24.1"

musicMain = \relative c'' {
  %  \set Score.dalSegnoTextFormatter = #format-dal-segno-text-brief
  \set Score.dalSegnoTextFormatter = ##f
  \key g \major \time 2/2
  a b c d
  \repeat segno 2 {
c d e fis
\alternative {
  \volta 1 { c d e fis }
  \volta 2 \volta #'() {
\section
  }
}
  }
  \cadenzaOn
  \stopStaff
  \once \override TextScript.word-space = #1.5
  \once \override TextScript.X-offset = #1
  \once \override TextScript.Y-offset = #1.5
  s1*0^\markup { \center-column { "D.S. al Coda"
\line { \musicglyph "scripts.coda" }}}

  \repeat unfold 3 {
s4 s4 s4 s4
\bar ""
  }

  \startStaff
  \cadenzaOff
}

musicCoda = \relative c'' {
  \key ees \major \time 4/4
  e f g a b c d e
  \fine
}

\score {
  \new Staff {
\new Voice {
  \musicMain
  \musicCoda
}
  }
}
 That produces:
[image: Coda2.png]
which I think is more along what you were looking for if I understood
correctly?

Michael


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-24 Thread Michael Werner
Hi Leo,

On Fri, Mar 24, 2023 at 7:59 PM Leo Correia de Verdier <
leo.correia.de.verd...@gmail.com> wrote:

> The problem with that solution is that it changes all Scripts, including
> all articulations.


A very good point. That's what I get for trying to do too many things at
the same time. :)


> I would suggest the somewhat hacky solution of redefining just the
> commands in case, like
>
> segno = \tweak color #red \segno
> coda = \tweak color #red \coda
>

Somewhat hacky perhaps, but effective and simple.


> But if something more elegant is required (for instance if there could be
> conflicting tweaks) there is a solution in this thread:
> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html


Now this is something I just might have to steal to put into the library of
code snippets I'm accumulating. Looks to be all kinds of useful. Thanks for
the pointer to that.

Michael


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-24 Thread Michael Werner
Hi Laurie,

On Fri, Mar 24, 2023 at 7:19 PM savage.laurie 
wrote:

> I think the issue might be that I am using explicit \coda and \segno
> commands and your example uses the new \repeat segno form which will be too
> complex in the specific big band chart I'm editing. It's about 160 bars
> long with the segno in bar 24 and the "to coda" symbol in bar 48 and three
> repeated sections, I got lost in the nested braces when I tried the new
> structure. If I was writing it from scratch rather than re-editing it would
> be simpler.
>

That is indeed the issue, as those marks are a different type. Just needs a
different override in a different context. Turns out that using the \coda
and \segno commands the symbols created are handled the same as
articulations. That means they fall into the somewhat more generic Script
type, which is handled in the Voice context. Therefor:

\layout {
  \context {
\Score
\override CodaMark.color = #red
\override SegnoMark.color = #red
\override SectionLabel.color = #red
\override SectionLabel.font-size = #3
\override RehearsalMark.font-size = #3
\override RehearsalMark.color = #red
\override TextMark.color = #red
  }
  \context {
\Voice
\override Script.color = #red
  }
}

should get you sorted.

Michael


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-24 Thread Michael Werner
Hi Laurie,

On Fri, Mar 24, 2023 at 10:56 AM Laurie Savage 
wrote:

> Hi,
>
> I put this in my layout block
>
> \context {
>   \Score
>   \override CodaMark.color = #red
>   \override SegnoMark.color = #red
>   \override SectionLabel.color = #red
>   \override SectionLabel.font-size = #3
>   \override RehearsalMark.font-size = #3
>   \override RehearsalMark.color = #red
> }
>
> The result is large red rehearsal marks and large red section labels but
> black segno and coda signs.
>

All I can figure is that something somewhere is a bit out of place. I
double checked here, making sure to use the same version you mention
(2.24.0) and it's working as expected. Specifically:

\version "2.24.0"
\language "english"

\layout {
  \context {
\Score
\override CodaMark.color = #red
\override SegnoMark.color = #red
\override SectionLabel.color = #red
\override SectionLabel.font-size = #3
\override RehearsalMark.font-size = #3
\override RehearsalMark.color = #red
  }
}

\new Score {
  \new Staff {
\new Voice {
  \fixed c' {
\mark \default
f1 f1
\sectionLabel "A1"
f1 f1
\repeat segno 2 {
  g1 g1
  \alternative {
\volta 1 { \repeat unfold 4 { a2 } }
\volta 2 \volta #'() {
  \section
  \sectionLabel "Coda"
}
  }
}
b1
\fine
  }
}
  }
}

is producing:

[image: image.png]

Could you post a small section of code showing how you're using everything?

Michael

>


Re: \rightHandFinger in banjo tablature

2023-03-21 Thread Michael Werner
Hi Thomas -

On Tue, Mar 21, 2023 at 3:28 PM Thomas Widmann  wrote:

> Hello,
>
> I'm trying to produce banjo tablatures similar to the ones seen here: <
> https://eligilbertbanjo.com/wp-content/uploads/2021/01/30-Days-of-Banjo.pdf
> >
>
> In general it's working well, but I seem unable to get the right hand
> fingerings to show in the tablature. A simple example:
>
> fT = \rightHandFinger #1
> fI = \rightHandFinger #2
> fM= \rightHandFinger #3
>
> music = {
>  \set strokeFingerOrientations = #'(down)
>   g8\fT
>   b \fI
>   g'\5\fT
>   d' \fM
>   g \fT
>   b \fI
>   g'\5 \fT
>   d' \fM
> }
>
>  \new TabStaff \with { \tabFullNotation
> tablatureFormat = #fret-number-tablature-format-banjo
> stringTunings = #banjo-open-g-tuning
>  }{ \music }
>
> If I add a normal Staff, the right hand fingerings will show up there, but
> I only want the tablature.
>

Turns out that the right hand fingerings are produced by an engraver that
isn't normally a part of the TabStaff context. But it's easily enough added
in, like this:

\new TabStaff \with {
  \tabFullNotation
  \consists New_fingering_engraver
  tablatureFormat = #fret-number-tablature-format-banjo
  stringTunings = #banjo-open-g-tuning
}

The \consists command is what's used to add an engraver to a context.
Conversly, the \remove command will remove an engraver and all of what that
engraver produces.


> Furthermore, I'd prefer the fingers to be called T, I and M rather than p,
> i and m. How would I do that?
>

One more line added into the \with block takes care of that, resulting in:

\new TabStaff \with {
  \tabFullNotation
  \consists New_fingering_engraver
  tablatureFormat = #fret-number-tablature-format-banjo
  stringTunings = #banjo-open-g-tuning
  \override StrokeFinger.digit-names = ##("T" "I" "M" "a" "x")
  strokeFingerOrientations = #'(down)
}

The first three right-hand fingerings are changed to what you listed, while
the other two are the defaults. Also the strokeFingerOrientations seemed to
need moved into the \with block to take effect.

michael


Re: LP 2.24.0 How to Set default colours for sectionLabel, Coda, Segno symbols

2023-03-20 Thread Michael Werner
Hi Laurie -

On Mon, Mar 20, 2023 at 6:11 PM Laurie Savage 
wrote:

> Good morning,
>
> I am preparing charts and want my Coda/Segno symbols and section labels to
> all be red. I can do this via the \markup \with-color #red in each case but
> is there a global default I can set in my JazzStyle.ily file? I have been
> reading the documentation but have obviously missed something.
>

For this you want the Internals Reference. It's a bit indirect to get what
you want, but it goes something like this. Being first alphabetically we'll
start with the Coda symbol, but the process is the same for all of them.

In the Internals Reference there's a section labelled All layout objects -
this is where we're going to start as the coda mark is indeed a
layout object. A look down the list of the CodaMark's properties
shows there's no color property directly associated. But at the bottom of
the listing there's a number of other items listed. These are the various
interfaces that can be used. Basically each interface is a group of common
properties that are shared among various objects. And instead of constantly
recreating these properties the interface is used instead - sorta kinda in
a way a bit similar to setting up an include file with common settings.

Looking through the various interfaces we find that the grob-interface has
listed a color property. As this interface is listed as being associated
with the CodaMark layout object we should be able to make use of this
property. To put them together is simply the name of the layout object
followed by the property separated by a period. In this example we would
have CodaMark.color

Another thing to consider is what scope this applies to. For that we return
to the CodaMark page, where we see that it is created by the mark_engraver.
Different engravers live in varying contexts, and if the property doesn't
get addressed in the correct context it simply gets silently ignored. Going
to the mark_engraver page and scrolling to the bottom we see the list of
contexts where it lives by default. One of these is the Score context. This
gives us the last piece we need.

Putting all of that together we get the entry you would need to put into
your include file as (we'll go ahead and show 'em all here):

\layout {
   \context {
  \Score
  \override CodaMark.color = #red
  \override SegnoMark.color = #red
  \override SectionLabel.color = #red
   }
}

The Internals Reference can be a bit confusing at first, but once you get
the hang of it there's a ton of info in there.  This should at least be
enough to get you started. I hope, anyway. If my explanation was muddled
somewhere just let me know - the whole using words thing to explain stuff
is a skill I'm not all that great at - and I'll try to unmuddle things as
best I can.

Michael


Re: DynamicsStaff spacing itself too far from the music

2023-02-28 Thread Michael Werner
Hi Richard:

On Tue, Feb 28, 2023 at 12:53 PM Richard Shann 
wrote:

> In a complex score with a DynamicsStaff placed above the music for
> markups and another below for the dynamics an unusually large space
> opened up below the music and above the dynamics.
> I pared the complex score down to this MWE:
>
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>
> \version "2.24"
> marks = {
> %This line is needed.
> \repeat unfold 40 {s1 }
> }
> music = {
>  \repeat unfold 80 {c''1 }
>   }
> dyns = {
>  \repeat unfold 80 { <>  \f c''1 }
>   }
> \paper {
> %this line is needed.
> system-system-spacing.minimum-distance = 15
>}
>
> \score {
>   <<   \new Dynamics <<\marks >>
>\new Staff <<   \music  >>
>\new Dynamics << \dyns >>
>>>
>}
>
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>
> In this example the extra spacing disappears after the third system.
>

Changing the \repeat unfold 40 to 80 in the marks section ran the extra
spacing out to the end. Also I found that changing that block to

 marks = {
%This line is needed.
\repeat unfold 80 {s4-\markup "A" s2. }
}

with some actual markup in there made the extra spacing go away. I'm
guessing that the spacing system couldn't quite figure things out with just
spacer rests to work with. But that's just a guess.

Michael


Re: Frescobaldi default directory

2023-02-26 Thread Michael Werner
On Sun, Feb 26, 2023 at 4:15 AM bobr...@centrum.is 
wrote:

>
> How does one set the default to a specific directory?
>

Hi David.

If you go into Edit -> Preferences -> General Preferences in the right hand
pane is the Sessions and Files section containing 3 tabs: New Documents,
Saving, and Sessions. Select the Saving tab and you'll find the spot to set
your default save directory.

Michael


Re: Moving breath mark horizontally

2023-02-17 Thread Michael Werner
On Fri, Feb 17, 2023 at 5:07 AM David Kastrup  wrote:

> Michael Werner  writes:
>
> >
> > For some reason Lilypond complained if I left out the right-edge
> > entry.
>
> It is not that you left out the right-edge entry, it is that you removed
> it.  The way you have written your override, it removes all of
> space-alist and only leaves the entries you state explicitly.
>
> Instead, try overriding just the entry
> BreathingSign.space-alist.next-note (and I prefer using a \tweak here)
> such as
>

Ah! I wasn't aware that could be done. Also misunderstood the override - I
thought it would just reset the values I specified and leave the rest as
already set. I'll have to keep that in mind for future use. Greatly
appreciate the clarification and correction.

Michael


Re: Moving breath mark horizontally

2023-02-17 Thread Michael Werner
Hi Joei.

On Fri, Feb 17, 2023 at 5:03 AM Johannes Roeßler  wrote:

> Hi Michael,
>
> I tried to tweak what you sent - I need it in the opposite way, moving the
> sign to the left - in the internal reference it might be "direction"?
>

Nope. Just remove the negative from the number. Negative moves it to the
right, positive to the left. Something like
 \tweak space-alist.next-note #'(fixed-space . 3) \breathe
 (thank you so much David for the explanation!).  Most of the direction
tweaks and overrides work that way - a negative number moves it one way and
positive the other way.  Generally works that way both horizontally and
vertically.

Michael

>


Re: Moving breath mark horizontally

2023-02-17 Thread Michael Werner
Hi Joei.

Checking the Internals Reference (
http://lilypond.org/doc/v2.25/Documentation/internals/breathingsign )
there's an alist for the BreathingSign that contains spacing. Looks like
the next-note one is what you might be looking for. I gave it a whirl here
with these results:

music = \relative c'' {
  c c \breathe c c \break
  c c \once \override BreathingSign.space-alist = #'((next-note fixed-space
. -3)
 (right-edge
extra-space . 0.1)) \breathe c c
}

producing:

[image: image.png]

Is that kinda what you were looking to do?

For some reason Lilypond complained if I left out the right-edge entry.
Quite honestly I don't understand this well enough to know why, but it
does work. Or, at least, it seems to. I fiddled a bit with various values
for the right-edge with no apparent effect. But from what I can tell that
one only applies when the breathe mark is at the very end of a line. Since
that isn't the case here I didn't really think it would do anything, but I
tried it anyway. Just don't quite get why Lilypond throws a programming
error if it gets left out. So hopefully this might at least point you in a
direction that might help.

Michael

On Fri, Feb 17, 2023 at 3:53 AM Johannes Roeßler  wrote:

> Hi Group,
>
> how do I move a breath mark horizontally?
> I've tried
>
> "\override Voice.BreathingSign.x-offset = #-3 \breathe"
>
> But it didn't work...
>
> Best regards
> Joei
>


Re: Custom dynamic text with spanner

2023-02-16 Thread Michael Werner
Hi Evan -

Just above the section you linked to is a bit titled "Changing text and
spanner styles for text dynamics" that seems to be what you're asking about.

Short version:
\set crescendoText = \markup { \italic { molto cresc } }
\set crescendoSpanner = #'text
should be either what you're wanting or pretty close to it.

Michael

On Fri, Feb 17, 2023 at 1:06 AM Evan Driscoll  wrote:

> The manual describes (
> http://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-attached-to-notes#new-dynamic-marks)
> how to create new dynamics with custom markup...
>
> ...but it doesn't say how to combine that with an indication like "cresc."
> that gets a spanner attached to it, and my searches and playing around
> aren't turning up anything.
>
> How would I do something like \cresc (with its default behavior of
> emitting a spanner) but with custom text, e.g. "molto cresc"?
>
> Evan
>


Re: Align markup above staff

2023-02-10 Thread Michael Werner
On Fri, Feb 10, 2023 at 9:49 AM Johannes Roeßler  wrote:

> thx to both Michaels :)
>
> looks like an idea, but when I compile your source, I get a little drift
> between
> "diminuendo" and "poco"
>
> Best regards
> Johannes
>

Huh. I hadn't noticed that when I was testing it here. But  now I go look
more closely I'm seeing it too. Looks like it's aligning poco by way of the
bottom of the downward stem of the p, which then shifts everything after
upwards by the same amount. But if I go through and change both instances
of poco to Poco the a between is still shifted upwards. Puzzling.


Re: Align markup above staff

2023-02-10 Thread Michael Werner
On Fri, Feb 10, 2023 at 9:21 AM Johannes Roeßler  wrote:

> Hi Group,
>
> I would like to align markups above my staff - I checked the page
> regarding vertical spacing and found
>
> "\override TextScript.outside-staff-padding = #3" but this just raised all
> markups but still unaligned
>
> \override TextScript.outside-staff-priority = ##f  didn't help either...
>
> Any hints?
>
> Best regards
> Joei
>

Hi Joei.

Well, I don't know if this is the best way to do things, but the way I've
been dealing with this kind of thing is by abusing the Dynamics context,
using it to hold and align all kinds of non-dynamic kinds of things. So, if
I were doing it your example would be something like:

\version "2.25.1"
\language "english"

music = \relative c'' {
  \partial 2 f4\rest c4
  a2 c4( f)
  d4 d8 c b4 b
  g2 b4( d)
  c4 c8 b a4 c
  c4 b8 a b4( c)
}

textMarkups = {
  \partial 2  s4 s4-\markup entfernend
  s1
  s2 s4-\markup diminuendo s4
  s2. s4-\markup poco
  s2 s4-\markup a s4
  s4 s4-\markup poco s2
}

\score {
  <<
\new Dynamics \with {
  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #4
  }
  {
  \textMarkups
}
\new Staff {
  \music
}
  >>
}

The \override in the Dynamics context puts some extra space between the
Dynamics line (here, the text) and the staff below it. Details in the docs
at:
http://lilypond.org/doc/v2.25/Documentation/notation/flexible-vertical-spacing-within-systems

There's most likely any number of other ways to go about this, with many of
them probably better than this. One drawback to this method being that you
basically have to enter the music twice - once as the notes for the staff
and once as the rhythm for the dynamics. But if it's a relatively short
piece that might not be too bad - most of what I work with is pretty short
so I don't mind doing it this way.

But maybe this'll at least get you started.

Michael


Re: How change the default spacing between staff blocks

2023-02-09 Thread Michael Werner
The docs you want to refer to this for would be:
http://lilypond.org/doc/v2.24/Documentation/notation/flexible-vertical-spacing-paper-variables#list-of-flexible-vertical-spacing-paper-variables

Specifically, you want the system-system-spacing The docs explain in fair
detail how those settings get used, but basically you'll set this in the
\paper block. Something like:

\paper {
  system-system-spacing.basic-distance = #8
}



On Thu, Feb 9, 2023 at 2:18 PM  wrote:
>
> Hi everyone,
>
> Just a easy question:
>
> How can we further separate the different lines that make up a score?
>
> I mean a score for a single melodic instrument. Sometimes I find the
> music too close together, and I wish I could change the default spacing.
>
> \version "2.24.0"
> violin = \relative {
>a b c d a b c d a b c d a b c d | \break
>% This space is I want to change
>a b c d a b c d a b c d a b c d | \break
>% This space is I want to change
>a b c d a b c d a b c d a b c d | \break
>...
> }
>
> \score {
>\new Staff {
>  \new Voice {
>\violin
>  }
>}
>\layout {
>}
> }
>
>
> I haven't found anything in the documentation about it, it only refers
> to staff groups.
>
> Thanks in avance!
>
>
>


Re: chord placement in Scores

2023-02-07 Thread Michael Werner
On Mon, Feb 6, 2023 at 11:44 PM Jeff Kopmanis  wrote:

> I've found that when I put chords in my score, it's printing them *below* the
> staff rather than above, as usual.  Things are normal if I'm not building a
> score, but I'm wondering why this is happening.  I've included my (big) .ly
> document and just the score PDF.  It was just very weird and I'd thought
> I'd coded things *just like in the examples*.
>
> Thanks for any help,
>
> -Jeff. :)
>


Is this more what you were expecting?

[image: image.png]
If so, all that was needed was to move where each of the ChordNames
contexts get called, like so:

  \score {
<<
  \new StaffGroup = "horns" <<
\new ChordNames { \transpose c a { \soloChords } }
\new Staff \with {
  instrumentName = "Alto 1"
  shortInstrumentName = "Alto 1"
}<<
  %\new ChordNames { \transpose c a { \soloChords } }
  \altoIMusic
>>
\new ChordNames { \transpose c d { \soloChords }}
\new Staff \with {
  instrumentName = "Tenor 2"
  shortInstrumentName = "Tenor 2"
} <<
  %\new ChordNames { \transpose c d { \soloChords }}
  \tenorIIMusic
>>
\new Staff \with {
  instrumentName = "Trombone  3"
  shortInstrumentName = "Tbone 3"
} \tromboneIIIMusic
  >>
  \new ChordNames { \soloChords }
  \new Staff \with {
instrumentName = "Guitar"
shortInstrumentName = "Guitar"
  }<<
%\new ChordNames { \soloChords }
\guitarMusic
  >>
  \new ChordNames { \songChords }
  \new PianoStaff \with {
instrumentName = "Piano"
shortInstrumentName = "Piano"
  }<<
\new Staff = "rh" \pianoRHMusic
\new Dynamics \pianoDynamics
<<
  %\new ChordNames { \songChords }
  \new Staff = "lh" \pianoLHMusic
>>
  >>
  \new ChordNames \soloChords
  \new Staff \with {
instrumentName = "Bass"
shortInstrumentName = "Bass"
  }<<
%\new ChordNames \soloChords
\bassGuitarMusic
  >>
  \new DrumStaff \with {
instrumentName = "Drum Set"
shortInstrumentName = "Drums"
  }\drumSetMusic
>>

I've left the originals in place, just commented out. Basically, lilypond
will place each context where you call them. In this case, to put the
chords above the staff, just call the ChordNames and *then* call the
related Staff. This mechanism lets you mix and match each of the various
contexts as you wish. And if that image wasn't what you were wanting,
hopefully this'll at least help point you in the right direction.


Re: Multiple instances of same articulation/bowing on one note

2023-01-31 Thread Michael Werner
On Tue, Jan 31, 2023 at 9:49 PM Ahanu Banerjee 
wrote:

> That's certainly an interesting approach. Reminds me of the old SCORE
> system. But unless I misunderstood your suggestion, it becomes rather
> inconvenient and inefficient for larger scores, particularly if changes
> have to be made to the notes later down the line, i.e., having to modify
> multiple sets of music just to change a few notes..
>

A fair point. I'm basically just a copyist, I guess would be the term. I'm
not a musician - I just produce cleaned up and sometimes somewhat altered
sheet music for others based on already existing sources.. So generally the
changes have already been sorted out by the time I get my hands on it. Also
the pieces I'm working with tend to be relatively short (more than 3 or 4
pages is uncommon), so if more changes are needed it's generally not too
much of a hassle.


Re: Multiple instances of same articulation/bowing on one note

2023-01-31 Thread Michael Werner
On Tue, Jan 31, 2023 at 9:41 PM Michael Werner  wrote:

> ...
> \version "2.24.0"
> \language "english"
>
> music = { g8 g g g }
> upArticulation = { g8 g-\upbow g g }
> downArticulation = { g8 g-\upbow g g }
>
> <<
> \new Dynamics
> \upArticulation
> \new Staff
> \music
> \new Dynamics
> \downArticulation
> >>
>

I goofed in my code. It doesn't make any allowance for articulations that
change direction depending on whether they're above or below the staff
(fermata, for example). So a bit of a change is in order:

 \version "2.24.0"
\language "english"

music = { g8 g g g }
upArticulation = { g8 g-\upbow g-\fermata g }
downArticulation = { g8 g-\upbow g-\fermata g }

<<
\new Dynamics \with {
  \override Script.direction = #UP }
{ \upArticulation }
\new Staff
\music
\new Dynamics \with {
  \override Script.direction = #DOWN }
{ \downArticulation }
>>

An alternative would be to explicitly declare the direction by changing:

upArticulation = { g8 g-\upbow g-\fermata g }
downArticulation = { g8 g-\upbow g-\fermata g }

to:

upArticulation = { g8 g^\upbow g^\fermata g }
downArticulation = { g8 g_\upbow g_\fermata g }


Re: Multiple instances of same articulation/bowing on one note

2023-01-31 Thread Michael Werner
Hi Ahanu,

I would split things out into some variables, and put the articulations
into separate contexts. I find it makes things much easier to keep track
of. For example:

\version "2.24.0"
\language "english"

music = { g8 g g g }
upArticulation = { g8 g-\upbow g g }
downArticulation = { g8 g-\upbow g g }

<<
\new Dynamics
\upArticulation
\new Staff
\music
\new Dynamics
\downArticulation
>>

In a Dynamics context the entered music gives the durations, but the note
heads aren't printed. So once the music is entered and checked, it can just
be pasted into a new variable and the articulations added as needed.

On Tue, Jan 31, 2023 at 9:22 PM Ahanu Banerjee 
wrote:

> I'm trying to put the same articulation both above and below one note. (My
> document has one set of bowings above the staff and an alternate set below
> the staff, and occasionally they both need the same marking.)
>
> The workaround I currently have is creating a second voice, which is a bit
> of a pain. Are there better solutions? Code below.
>
> \version "2.24.0"
> \language "english"
> { g8 g_\upbow ^\upbow g g % fails
>   g8 g_\upbow ^\downbow g g % works
>   % desired output:
>   << { g8 g_\upbow g g } \\ { s s ^\upbow } >> }
>
> Thanks,
> -Ahanu
>


Re: Question about text formatting: hard line breaks?

2023-01-24 Thread Michael Werner
I've done a number of scores where I'm having extra stanzas of lyrics added
either directly after the last staff of music, or, more frequently, on a
separate page. Either way, I use the \string-lines command. It has the
advantage of accepting an entire paragraph, and going along with the
existing line breaks. Makes things easy when doing a copy and paste. The
full description from the official docs:

\string-lines strg (string)

Takes the string strg and splits it at the character provided by the
property split-char, defaulting to #\newline. Surrounding whitespace is
removed from every resulting string. The returned list of markups is ready
to be formatted by other markup or markup list commands like \column, \line,
etc.

\markup {  \column\string-lines "foo, foo, bar, bar,
buzz, buzz!"}

[image: [image of music]]


Used properties:

   - split-char (#\newline)



And for reference, the part of the official docs you'll want to have a look
at are A.12 (
http://lilypond.org/doc/v2.24/Documentation/notation/text-markup-commands )
and A.13 (
http://lilypond.org/doc/v2.24/Documentation/notation/text-markup-list-commands
) of the Notation Reference. The \string-lines command comes from A.13

One caveat about the \string-lines command I discovered by trying to get it
to do something - if you want blank lines between sections of text, just
entering extra new lines in the text won't work. Which I would have
realized if I'd read the description a bit more carefully. Instead, you'll
need something like:

\column { \small
  \string-lines
  "1. I wonder as I wander out under the sky how Jesus my
saviour did come for to die; for
poor orn'ry people like you and like I, I wonder as I wander ... out under
the sky." }
\vspace #1
\column {  \small
   \string-lines
   "2. When Mary birthed Jesus, 'twas is a cow's stall, with
wisemen and farmers and shepherds and all
But high from God's heaven a star's light did fall, and the promise of ages
... it then did recall." }

The \vspace gives the vertical space between stanzas.

Well, hopefully this might help. Or at least give you some ideas that might
get you where you want to be.

Michael

On Mon, Jan 23, 2023 at 7:15 PM Alasdair McAndrew  wrote:

> Hello,
>
> I have a paragraph of descriptive text that I'd like to display in a box.
> Currently I have:
>
> \markup \small \box \wordwrap {
> several lines of text here ...
> }
>
> This works quite well, except that I'd like to modify some of the line
> breaks.  I could probably do this by either specifying the text as a list
> of lines (which I'm not sure how to do: that is, a list of lines all
> surrounded by a single box).
>
> But in fact it would be easier to simply insert a "hard break" in the text
> where I want it.  Is this possible?  I know how to add a break to a score,
> but I can't find if there's an equivalent for text.
>
> And where would I go looking for this - where can I find a comprehensive
> list of all text commands accepted by lilypond?
>
> Many thanks,
> Alasdair
>
> --
> Alasdair McAndrew (he/him)
> mob: 0432 854 858
>
> https://numbersandshapes.net
>


Re: Conflict between articulate.ly and \accacciatura in 2.24.0

2023-01-07 Thread Michael Werner
Once I added an include for articulate.ly it compiles just fine here.

\version "2.24.0"
\language "deutsch"
\include "articulate.ly"

acctest = {\time 6/8
   \relative c' {
d8 e f g a \acciaccatura c h}}

\score {
 \articulate
 \acctest
\layout{}
\midi{}
}

results in:

Starting lilypond 2.24.0 [Untitled]...

Processing `/tmp/frescobaldi-u5zhijhv/tmp6z2p1xeo/document.ly'

Parsing...

Interpreting music...

Preprocessing graphical objects...

Interpreting music...

MIDI output to `document.midi'...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Converting to `document.pdf'...

;;; note: source file
/home/michael/lilypond/lilypond-2.24.0/share/lilypond/2.24.0/scm/lily/font.scm

;;; newer than compiled
/home/michael/lilypond/lilypond-2.24.0/lib/lilypond/2.24.0/ccache/lily/font.go

Success: compilation successfully completed

Completed successfully in 0.6".


[image: image.png]


And with the \articulate commented out:


[image: image.png]

For what it's worth I'm running KUbuntu, up to date as of about 12 hours
ago, with Lilypond 2.24.0 from the Lilypond website. Don't know if this
helps, but hopefully maybe it might.


Michael

On Sat, Jan 7, 2023 at 4:01 AM Gordon Bower  wrote:

>
> When I tried to recompile a piece I had written in 2.22.1 with 2.24.0, I
> got a mysterious error message:
> "Exited with return code -1073741784."
>
> Commenting out things until it would compile, I found the problem was
> specifically when articulate was applied to a music group with an
> accacciatura:
>
> \version "2.24.0"
> \language "deutsch"
>
> acctest = {\time 6/8
>\relative c' {
> d8 e f g a \acciaccatura c h}}
>
> \score {
>  \articulate
>  \acctest
> \layout{}
> \midi{}
> }
>
> The above exits with an error.
> With \articulate commented out, it compiles and displays the result, 6
> quavers with a grace note on the last, as expected.
> With the accacciatura commented out, it compiles and plays back correctly
> (and displays something a little odd, one bar of 6/8 with 6 eighth notes
> and 6 eights rests - but that is just it trying to display something
> intended only for MIDI export on the screen.)
>
> Please let me know if you get the same error, and if this is a matter for
> the programmers rather than for me to worry about.
>
> Thank you!
>
> GRB
>


Re: Sizing Dynamics

2023-01-03 Thread Michael Werner
Oh yeah, one more thing.  When you're doing the Dynamics context you don't
need to replace the notes with spacer rests. You can just do a direct copy
of the music and add the dynamics to it - the notes don't get printed. So
you can just do this:

\new Dynamics \with {
  fontSize = #-5
  \override Hairpin.height = #0.4
} { c4\p c-\markup sostenuto c c c\< c c c\! }

and get just the dynamics.

On Tue, Jan 3, 2023 at 9:48 AM Michael Werner  wrote:

> Hi Mark,
>
> Looks like Hairpins have their own sizing properties. A full list is at
> http://lilypond.org/doc/v2.24/Documentation/internals/hairpin but in this
> case looks like height is probably the one you want used  something like
> this:
>
> \version "2.24.0"
> \relative c'' {
>   <<
> \new Staff \with {
>   \magnifyStaff #2/3
> } { c4 c c c c c c c }
> \new Dynamics \with {
>   fontSize = #-5
>   \override Hairpin.height = #0.4
> } { s\p s-\markup sostenuto s s s\< s s s\! }
>   >>
> }
>
> The default height value is 0. so 0.4 is a rough approximation of 2/3
> the default. Adjust to taste.
>
> On Tue, Jan 3, 2023 at 9:19 AM Mark Mathias  wrote:
>
>> Yes, thank you. I overlooked retrying \magnifyStaff having just updated
>> to 2.24.0 after failing in 2.22.2. I just now tried it, but I get the same
>> result as with fontsize, viz., the text changes size, but the hairpins do
>> not.
>>
>> On Tue, Jan 3, 2023 at 8:49 AM Xavier Scheuer 
>> wrote:
>>
>>> On Tue, 3 Jan 2023 at 14:30, Mark Mathias  wrote:
>>> >
>>> > Using dynamics separately from a staff is useful, but for some reason
>>> changing the size affects the DynamicText but not the hairpins. I'd like
>>> the hairpins to match the staff size if possible.
>>>
>>> Hello,
>>>
>>> If you use Lilypond version > 2.23.6 (which seems to be the case
>>> according to your version statement), you should be able to use
>>> \magnifyStaff in Dynamics context.
>>> https://gitlab.com/lilypond/lilypond/-/issues/6188
>>>
>>> Cheers,
>>> Xavier
>>>
>>> --
>>> Xavier Scheuer 
>>>
>>>


Re: Sizing Dynamics

2023-01-03 Thread Michael Werner
Hi Mark,

Looks like Hairpins have their own sizing properties. A full list is at
http://lilypond.org/doc/v2.24/Documentation/internals/hairpin but in this
case looks like height is probably the one you want used  something like
this:

\version "2.24.0"
\relative c'' {
  <<
\new Staff \with {
  \magnifyStaff #2/3
} { c4 c c c c c c c }
\new Dynamics \with {
  fontSize = #-5
  \override Hairpin.height = #0.4
} { s\p s-\markup sostenuto s s s\< s s s\! }
  >>
}

The default height value is 0. so 0.4 is a rough approximation of 2/3
the default. Adjust to taste.

On Tue, Jan 3, 2023 at 9:19 AM Mark Mathias  wrote:

> Yes, thank you. I overlooked retrying \magnifyStaff having just updated to
> 2.24.0 after failing in 2.22.2. I just now tried it, but I get the same
> result as with fontsize, viz., the text changes size, but the hairpins do
> not.
>
> On Tue, Jan 3, 2023 at 8:49 AM Xavier Scheuer  wrote:
>
>> On Tue, 3 Jan 2023 at 14:30, Mark Mathias  wrote:
>> >
>> > Using dynamics separately from a staff is useful, but for some reason
>> changing the size affects the DynamicText but not the hairpins. I'd like
>> the hairpins to match the staff size if possible.
>>
>> Hello,
>>
>> If you use Lilypond version > 2.23.6 (which seems to be the case
>> according to your version statement), you should be able to use
>> \magnifyStaff in Dynamics context.
>> https://gitlab.com/lilypond/lilypond/-/issues/6188
>>
>> Cheers,
>> Xavier
>>
>> --
>> Xavier Scheuer 
>>
>>


Re: Nested PianoStaffs - show inner brace only

2023-01-01 Thread Michael Werner
Hi WIlliam.  Maybe give this a shot:

\version "2.24.0"

\score {
  \new PianoStaff
  <<
\set PianoStaff.systemStartDelimiterHierarchy
= #'(SystemStartBar (SystemStartBrace a (b)))
\new Staff \relative c' {c8 des ees f g a b c } % right hand
\new Staff \relative c' {bes8 aes fis c d e f g} % left hand
\new Staff \relative c { \clef bass cis8 d e d c b a g } % pedal
  >>
  \layout {
\context { \Staff \accidentalStyle piano }
  }
}

For an explanation, see the Nesting Staves snippet at
http://lilypond.org/doc/v2.24/Documentation/notation/displaying-staves

Happy New Year!

Michael

On Sun, Jan 1, 2023 at 7:13 AM William Rehwinkel <
will...@williamrehwinkel.net> wrote:

> Dear list,
>
> Organ music is typically engraved on three staves with the top two
> connected by a piano brace.
>
> I would like combine all three staves in a PianoStaff (so that all three
> are modified by the piano accidental style) and omit the outer
> pianostaff bracket. However, I was wondering how to show the inner piano
> brace, as shown in the minimal example below.
>
> Thank you in advance,
>
> % 
> \version "2.24"
>
> \score {
>  \new PianoStaff \with {
>  \omit PianoStaff.SystemStartBrace
>  }<<
>  \new PianoStaff \with {
>  \undo \omit PianoStaff.SystemStartBrace % ??
>  } <<
>  \new Staff \relative c' {c8 des ees f g a b c } % right hand
>  \new Staff \relative c' {bes8 aes fis c d e f g} % left hand
>  >>
>  \new Staff \relative c { \clef bass cis8 d e d c b a g } % pedal
>  >> % full PianoStaff
>  \layout {
>  \context { \Staff \accidentalStyle piano }
>  }
> }
> % 
>
> Happy new year
> -Will
> --
> + -- +
> |William Rehwinkel - Oberlin College and |
> |   Conservatory '24 |
> |  will...@williamrehwinkel.net  |
> | PGP key:   |
> | https://williamrehwinkel.net/static/pubkey.txt |
> + -- +
>


Re: Difficulty running convert-ly under Linux/Ubuntu

2022-12-19 Thread Michael Werner
I'm also on Ubuntu here (well, to be a bit more precise I'm using the
KUbuntu distro, but should be close enough). I tried your command and had
it fail. But, when I altered it just a bit it worked. All I had to do was
specify the full path to the convert.ly file, like this:
find . -name '*.ly' -exec
/home/michael/lilypond/lilypond-2.24.0/bin/convert-ly -e '{}' \;
Maybe give that a shot and see what happens.

Michael

On Mon, Dec 19, 2022 at 9:53 PM Ralph Palmer 
wrote:

> Greetings -
>
> Jean Abou Samra kindly pointed me in the right direction for the
> installation of 2.24.0 in Linux with Frescobaldi.
>
> I was successful. Then I tried running convert-ly for all my .ly files,
> using
>
> find . -name '*.ly' -exec convert-ly -e '{}' \;
>
> on the command line. That was unsuccessful.
>
> I also tried
>
> convert-ly -e $(find . -name '*.ly' -print)
>
> but both of those commands were unsuccessful. In both cases, I got the
> message
>
> 6: exec: /home/rpalmer/lilypond/usr/bin/python3: not found
>
> even though Python 3.10 is in the LilyPond directory. Ah, but I don't see
> my usr/bin directory. I'm still confused.
>
> Any suggestions?
>
> All the best,
>
> Ralph
> __
> Ralph Palmer
> Seattle
> USA
> (he, him, his)
> palmer.r.vio...@gmail.com
>


Re: Separate a tuplet from the rest under a common beam

2022-12-14 Thread Michael Werner
Resending to include the list ... oops.

Something like this, perhaps?

\version "2.23.82"

\relative  {
  \clef treble
  \key c \minor
  \time 2/4
  \tuplet 3/2 { g'16[( aes \set stemRightBeamCount = #1 g) } \set
stemLeftBeamCount = #1 fis g] a8 b |
}


On Wed, Dec 14, 2022 at 10:42 AM Volodymyr Prokopyuk <
volodymyrprokop...@gmail.com> wrote:

> Hello,
>
> *Problem*
>
> How can I separate a \tuplet from two sixteenths using a common
> eightingth beam?
>
> *Example code*
>
> \version "2.23.81"
>
> \relative {
>   \clef treble
>   \key c \minor
>   \time 2/4
>   \tuplet 3/2 { g'='16[( aes g) } fis g] a8 b |
> }
>
> [image: image.png]
>
>
> *Desired result*
> [image: image.png]
>
> I've tried to adjust the baseMoment, beatStructure, subdivideBeats and
> strictBeatBeaming but without success.
>
> Thank you very much,
> Vlad
>
>


Re: Handbell notation

2022-12-05 Thread Michael Werner
Yup. And now that you've got the basics from the Learning Manual it's time
to go have a look at the Notation Reference for the more detailed look.
Specifically
http://lilypond.org/doc/v2.23/Documentation/notation/multiple-voices
There's a whole lot of documentation - like, lots and lots and even more
lots. A whole lot of back and forth from the basics (Learning Manual) to
the more advanced (Notation Reference) to the hardcore guts of the system
(Internals Reference). I'm at the point I keep a browser window open with
something like 15 tabs open all the time, so as to keep all the different
docs readily available. I keep trying to just do a full read-through of all
the docs, but I keep getting sidetracked before I can make it all the way
through. (I tend to get sidetracked pretty easily. I am, after all, a
blond.)

Few more comments scattered below ...

On Mon, Dec 5, 2022 at 3:33 AM J Martin Rushton <
martinrushto...@btinternet.com> wrote:

> Thanks Pierre
>
> That section seems to point me back to my original attempt:
> << \relative c' {\stemDown g'4 4 g4 4 } \\ \relative c' { s8 b'8
> s8 d8 e4 d4 } >> |  << \relative c' { 4 4 } \\ \relative c'
> \autoBeamOff { c'8 8 e,8 8 } >> 4 4 |
> which was adapted from the manuals.
>

Addressed above - I still think cutting this apart into a series of
variables as shown by Pierre would help clarify what's going on.


> Best,
> Martin
>
> On Sun, 2022-12-04 at 23:38 +0100, Pierre Perol-Schneider wrote:
>
> See.
> https://lilypond.org/doc/v2.23/Documentation/learning/i_0027m-hearing-voices.html
> Cheers,
> Pierre
>
> Le dim. 4 déc. 2022 à 23:09, J Martin Rushton <
> martinrushto...@btinternet.com> a écrit :
>
> Hi Pierre
>
> Yes, I like that. I hadn't come across \tiny before, it does help make
> things nicer.
>
>
One of a handful of predefined font size adjustments that are available.
Yeah, that says font. Notes are considered fonts ... kind of. Enough that
many font adjustments work just fine on them.


> I assume that the "tenor bells" is simply an artefact from a template - I
> can't see that it does anything. In the alto bells would you advise the
> rest? Remember that ringers are following a line and a space of the staff,
> not a line of music, and I would think that s2 would be better.
>
> I assume the \voiceXXX clauses are to set the stem directions?
>
>
Among other things. Full explanation is in the Notation Reference I linked
to above.

% SNIP

altoBells = \fixed c' {
>   \voiceTwo \tiny
>   | %mes. 13
> s8 b s d' d'2\rest
>
>
That's a neat trick with the \rest. Is that relatively new in the 2.23
series? I don't remember seeing that in the docs before, though I could
have easily simply missed it.


>   | %mes. 14
> s8  s  s4 s
>   | %mes. 15
> s
> }
>
> \new Staff <<
>   \new Voice \sopranBells
>   \new Voice \bassBells
>   \new Voice \tenorBells
>   \new Voice \altoBells
> >>
>
> HTH, cheers,
> Pierre
>
> Le dim. 4 déc. 2022 à 22:06, J Martin Rushton <
> martinrushto...@btinternet.com> a écrit :
>
> Hi Michael
>
> It just takes having to explain something to sort it. Those two
> problematic bars are now:
>
> which is much better. I still don't really like the tied quavers where a
> crotchet is rung, but then you can't have everything! The relevant code is:
>
> g8 ~ 8 8 ~ 8 4 4 | 8 ~ 8  c>8 ~ 8 4 4 |
>
>
Personally I think the first version looked better. But that's just me and
my personal opinion. Though I had to go look up what quaver and crotchet
meant - this debased and corrupted version of English we speak over here
led me astray for a bit.


>
> for the accompaniment.
>
> Thanks for making me think!
> Martin
>
> On Sun, 2022-12-04 at 20:39 +, J Martin Rushton wrote:
>
> Hi Michael
>
> I've mocked up the same two bars in LibreOffice as tablature:
>
>
>
> Where you see a dot and a number, the dot indicates half a beat's rest, so
> that row three of the first beat is interpreted as r8 b8 In the second
> bar, first beat, the "5 6" is c8 b8 The bolded top row indicates the
> tune, which typically needs to be run a little harder whilst the lower
> bells ring softer.
>
>
Huh. Interesting. I've never seen that before. But then, as I mentioned
earlier (somewhere or another ... I think, anyway) I'm not the musician
around here. Though at a guess someone good enough at creating the Scheme
trickery thing might be able to convince Lilypond to create something along
those lines. But that's just a guess. And could very easily be wrong.

Well, I hope some of this might have helped a bit. Or at least, if it
didn't help, it didn't go and increase the confusion levels. That sometimes
happens when I get let loose on a keyboard. So I think I'm going to go run
away now and go play with some more scores - trying to put together a 20
score book. 5 down so far.

Michael


Re: Handbell notation

2022-12-04 Thread Michael Werner
Hi Martin.

Well, I'm still pretty new to Lilypond but I have done some handbell
music.  I don't play them myself - my mother is the musician while I'm her
tech support, I guess would be the way to phrase it. My approach with
the more complex pieces her group was doing was to generate a somewhat
simplified version just for her. I would make sure to retain enough of the
main melody line that she could follow it, while cutting out anything else
I could. Of course I had to make sure to leave in the notes that she was
responsible for. Wouldn't work too well without them. Also I would put a
larger callout symbol above each note she rings to help her see them -
she's pushing 80 years old and her eyesight is going. While I was at it, I
would also produce a complete version. But that was mainly just me playing
around and gaining some experience.

A lot of that was made a bit easier by just carving up the piece in
multiple voices, with each voice going into a variable. Then I could
assemble the appropriate piece of music by just calling the variables I
needed for that particular version. Lots of possibilities to redo entire
scores without having to retype a whole bunch of music.

As for handbell tablature I've never seen it. None of the handbell music
she has brought home for me to play with has had any tablature, just the
"normal" music. Tablature for a few other instruments, yes, but not
handbells.

Well, this was kind of rambling - sorry about that. Like I said I'm still
kinda new to Lilypond. It's been an interesting journey so far, with still
quite a long ways to go. Still trying to get a decent grasp on the whole
Scheme thing. Oh well. Just gotta keep trying, I guess. Hope maybe
something in all this might have helped maybe a bit.

Michael

On Sun, Dec 4, 2022 at 12:46 PM J Martin Rushton <
martinrushto...@btinternet.com> wrote:

> Hi all,
>
> Our handbell team rings some pieces from normal scores, and some from a
> tablature notation. I had a go at converting one of our favourite pieces
> from tablature to scores, but some of the bars become so complex that I'm
> not sure this helps at all.
>
>
>
>
> Has anyone else done handbells on Lilypond? As a supplementary question,
> does anyone know of any software that can generate handbell tablatures?
>
> Thanks,
> Martin
>
> --
>
> J Martin Rushton MBCS
>


2.23.80 so far

2022-10-23 Thread Michael Werner
So far I've only tried 2.23.80 on a few simple scores, but so far
everything is working as expected. These are simple lap dulcimer and
tin whistle scores that I initially made with 2.22.0, then 2.22.1,
thru 2.22.2, transitioned to 2.23.14, and then to 2.23.80.

The only (very slight) issue I've noticed is in the documentation. In
section 2.4.1 of the Notation reference it says that the moderntab
clef for a tab staff supports 4 to 7 strings. I've been using it for
the lap dulcimer tabs that only have 3 strings, and it seems to be
working just fine. Don't know if that's just me getting lucky with
that or what, but it does seem to work as expected.

So far it's been an excellent experience. A bit of a learning curve to
be sure, but well worth it. Much thanks and appreciation to all the
devs and their hard work.

Michael