Re: How to transpose?

2024-05-24 Thread Wols Lists

On 23/05/2024 12:26, Kenneth Flak wrote:

Great, thanks to both of you! Very clarifying. \transposition is, thus,
going in the direction of instrument -> playback, whereas \transpose
goes in the opposite direction, if I understand it correctly.


I do a lot of brass stuff. And as you've realised, it's \transpose not 
\transposition.


I just think "\transpose for printed music, \transposition for midi". 
How accurate that is I don't know.


The other trick I always use (given that a trombone plays both bass clef 
in C, and treble clef in Bb, and worse when you get an American bass 
part in Bb ?!?!?!), is I transpose on input as well as output.


When copying a part IN to lilypond, I'll wrap it in "\transpose c c" or 
"\transpose bf c'" depending on whether it's a bass or treble part. So I 
know all my music fragments in lilypond are in C.


Then I'll wrap them the other way on output to put them in the correct 
printed pitch. That way I never have to transpose in my head to make 
sure things are correct.


Cheers,
Wol



Re: running lilypond

2024-05-24 Thread ming tsang
Good morning Jean:
Thank you for the quick answer.
I have not used the terminal to run lilypond. I have been using frecobaldi
v3.1 and lilypond v16.  I was hoping to use the .ly file to run terminal
lilypond.
I will not learn using terminal lilypond. If a .ly file cannot run terminal
lilypond, it is fine with me.
BTW I am running window 10
Ming (Lyndon) Tsang

On Fri, May 24, 2024 at 7:36 AM Jean Abou Samra  wrote:

> Le vendredi 24 mai 2024 à 07:23 -0600, ming tsang a écrit :
> > I try to run the following code as lilypond .ly
> > \version "2.24.3"
> > lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts myfile.ly
>
> This looks like a command that you should run in a terminal, not LilyPond
> syntax.
>
> In Frescobaldi, you can add the "-dbackend=eps -dno-gs-load-fonts
> -dinclude-eps-fonts"
> arguments in the "Additional command line options" box inside "LilyPond >
> Engrave (custom)…".
>
>
>

-- 
ming (lyndon) tsang


Re: jump to coda inside repeat with alternative

2024-05-24 Thread Knute Snortum
On Thu, May 23, 2024 at 9:16 PM David Wright 
wrote:

>
> Sometimes the easiest way of using these repeat constructions is to
> copy and paste an example from Notation Reference §1.4 into your
> .ly file, and then insert your music in place of the example's.
>

If you use Frescobaldi as your editor, you can make it a snippet, or
several snippets.

--
Knute Snortum


Re: running lilypond

2024-05-24 Thread Jean Abou Samra
Le vendredi 24 mai 2024 à 07:23 -0600, ming tsang a écrit :
> I try to run the following code as lilypond .ly
> \version "2.24.3"
> lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts myfile.ly

This looks like a command that you should run in a terminal, not LilyPond 
syntax.

In Frescobaldi, you can add the "-dbackend=eps -dno-gs-load-fonts 
-dinclude-eps-fonts"
arguments in the "Additional command line options" box inside "LilyPond > 
Engrave (custom)…".




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


Re: Control beaming with tuplets

2024-05-24 Thread Kenneth Flak
Perfect, thanks a lot!

Best,
Kenneth

Xavier Scheuer, May 24, 2024 at 12:41:
> On Fri, 24 May 2024 at 10:57, Kenneth Flak
> <[1]kennethf...@protonmail.com>
> wrote:
> >
> > Thanks! That almost did the trick. The only thing that's not working is that
> connecting beam between the two quintuplets. See attached screenshot...
>
> Hello,
>
> \set subdivideBeams = ##t
>
> And then either, for 2.24:
> \set baseMoment = #(ly:make-moment 1/8)
> \set beatStructure = 2,2,2,2
>
> or for 2.25:
> \set minimumBeamSubdivisionInterval = \musicLength 8
> \set maximumBeamSubdivisionInterval = \musicLength 16
>
> See NR 1.2.4.
> [2]https://lilypond.org/doc/v2.24/Documentation/notation/beams#
> setting-automatic-beam-behavior
> [3]https://lilypond.org/doc/v2.25/Documentation/notation/
> setting-automatic-beam-behavior
>
> Kind regards,
> Xavier
>
>
> References:
>
> [1] mailto:kennethf...@protonmail.com
> [2]
> https://lilypond.org/doc/v2.24/Documentation/notation/beams#setting-automatic-beam-behavior
> [3]
> https://lilypond.org/doc/v2.25/Documentation/notation/setting-automatic-beam-behavior






Re: Control beaming with tuplets

2024-05-24 Thread Xavier Scheuer
On Fri, 24 May 2024 at 10:57, Kenneth Flak 
wrote:
>
> Thanks! That almost did the trick. The only thing that's not working is
that connecting beam between the two quintuplets. See attached screenshot...

Hello,

\set subdivideBeams = ##t

And then either, for 2.24:
  \set baseMoment = #(ly:make-moment 1/8)
  \set beatStructure = 2,2,2,2

or for 2.25:
  \set minimumBeamSubdivisionInterval = \musicLength 8
  \set maximumBeamSubdivisionInterval = \musicLength 16

See NR 1.2.4.
https://lilypond.org/doc/v2.24/Documentation/notation/beams#setting-automatic-beam-behavior
https://lilypond.org/doc/v2.25/Documentation/notation/setting-automatic-beam-behavior

Kind regards,
Xavier


Re: Control beaming with tuplets

2024-05-24 Thread Kenneth Flak
Thanks! That almost did the trick. The only thing that's not working is that 
connecting beam between the two quintuplets. See attached screenshot...

K


Damian leGassick, May 24, 2024 at 11:51:
> \tuplet 5/4 ?
>
> D
>
> > On 24 May 2024, at 09:44, Kenneth Flak  wrote:
> >
> > Hi,
> >
> > I'm trying to replicate the notation in originalHarp.png for harp with 
> > 5-tuplets, but the beaming I am getting is completely off... My attempt is 
> > in the file myAttempt.png, using this code:
> >
> > right = {
> >  \relative c'{
> >s4 \tuplet 5/2 {c32 e g bf df}
> >\tuplet 5/2 {c32 e g bf df}
> >c16 e fs g s4.
> >
> >  }
> > }
> >
> > left = {
> >  \textLengthOn
> >  \relative c {
> >\clef bass
> >  c8 e32 g bf df
> >  s4 s4  c,,
> >  }
> > }
> >
> > \score {
> >  \new PianoStaff
> >  <<
> >\new Staff = "right" \right
> >\new Staff = "left" \left
> >>>
> > }
> >
> > Any help much appreciated!
> >
> > Best,
> > Kenneth
> >
> > --
> > Roosna & Flak - Contemporary Dance & Music
> > Web: roosnaflak.com
> > Code: {github,gitlab}.com/kflak
> > Mastodon: @k...@sonomu.club
> > 
> > 




Re: Control beaming with tuplets

2024-05-24 Thread Damian leGassick
\tuplet 5/4 ?

D

> On 24 May 2024, at 09:44, Kenneth Flak  wrote:
> 
> Hi,
> 
> I'm trying to replicate the notation in originalHarp.png for harp with 
> 5-tuplets, but the beaming I am getting is completely off... My attempt is in 
> the file myAttempt.png, using this code:
> 
> right = {
>  \relative c'{
>s4 \tuplet 5/2 {c32 e g bf df}
>\tuplet 5/2 {c32 e g bf df}
>c16 e fs g s4.
> 
>  }
> }
> 
> left = {
>  \textLengthOn
>  \relative c {
>\clef bass
>  c8 e32 g bf df
>  s4 s4  c,,
>  }
> }
> 
> \score {
>  \new PianoStaff
>  <<
>\new Staff = "right" \right
>\new Staff = "left" \left
>>> 
> }
> 
> Any help much appreciated!
> 
> Best,
> Kenneth
> 
> -- 
> Roosna & Flak - Contemporary Dance & Music
> Web: roosnaflak.com
> Code: {github,gitlab}.com/kflak
> Mastodon: @k...@sonomu.club
> 
> 



Re: Scheme help

2024-05-24 Thread David Kastrup
Valentin Petzel  writes:

> Hello Kevin,
>
> When you call a music expression like \music Lilypond will allways pass a 
> copy 
> of that music object. Thus some music functions assume it is safe to modify 
> the original music object. So when you do
>
> \keepWithTag ... #music
>
> you will first remove everything tagged without v1, then everything tagged 
> without v2 and so on. So in the end only untagged and tagged with everything 
> will persist. Then you get multiple references to that music object.
>
> What you need to do is to copy the music object passed using ly:music-deep-
> copy:
>
> %%%
> repeat-verses =
> #(define-music-function ( count music  )
> ( index? ly:music? )
>(make-music 'SequentialMusic 'elements
>  (map-in-order
>   (lambda (verse)
>(begin
> (define versenum
>  (string->symbol (string-join (list "v" (number->string verse)) "" )))
>  #{ \keepWithTag #versenum #(ly:music-deep-copy music) #})) 
>   (iota count 1

Out of shere laziness, I'd be using
$music here instead of #(ly:music-deep-copy music).  $music is the
Scheme equivalent of \music (including making a copy and suffering from
an early evaluation effect).

It is also possible to replace

#{ \keepWithTag #versenum #(ly:music-deep-copy music) #}

with

(keepWithTag versenum (ly:music-deep-copy music))

but there is a slight difference regarding point-and-click behavior and
typesetting-time error messages.  A closer equivalent would be

(ly:set-origin! (keepWithTag versenum (ly:music-deep-copy music (*location*

So the #{ ... $xxx #} variant keeps track of a few details behind the
scene that are not relevant for the function itself but that might come
in handy eventually.

> %%%
> repeat-verses =
> #(define-music-function ( count music  )
> ( index? ly:music? )
>(make-music 'SequentialMusic 'elements
>  (map-in-order
>   (lambda (verse)
>(let ((versenum (string->symbol (format #f "v~a" verse
>  (keepWithTag versenum (ly:music-deep-copy music
>   (iota count 1
>
> \repeat-verses 3 { \tag #'v1 c' \tag #'v2 d' \tag #'v3 e' f' }
> %%%

There actually is no reason to use `map-in-order' over just `map' here
since the loop body has no side effects.

Your Scheme inner construct does not touch the
point-and-click/error-location data.  That may or may not be what is
desired.  The guesses that #{ $... #} takes in that regard have a
certain chance of being what the user would prefer.

-- 
David Kastrup



Re: Scheme help

2024-05-24 Thread Kevin Pye
Thanks Valentin,

I'll incorporate your suggestions. I doubt I'd have worked out the problems at 
my level of Scheme programming without your help.

I'll probably have more questions in the future.

Kevin.

On Fri, 24 May 2024, at 17:17, Valentin Petzel wrote:
> Hello Kevin,
>
> When you call a music expression like \music Lilypond will allways pass a 
> copy 
> of that music object. Thus some music functions assume it is safe to modify 
> the original music object. So when you do
>
> \keepWithTag ... #music
>
> you will first remove everything tagged without v1, then everything tagged 
> without v2 and so on. So in the end only untagged and tagged with everything 
> will persist. Then you get multiple references to that music object.
>
> What you need to do is to copy the music object passed using ly:music-deep-
> copy:
>
> %%%
> repeat-verses =
> #(define-music-function ( count music  )
> ( index? ly:music? )
>(make-music 'SequentialMusic 'elements
>  (map-in-order
>   (lambda (verse)
>(begin
> (define versenum
>  (string->symbol (string-join (list "v" (number->string verse)) "" )))
>  #{ \keepWithTag #versenum #(ly:music-deep-copy music) #})) 
>   (iota count 1
>
> repeat-verses 3 { \tag #'v1 c' \tag #'v2 d' \tag #'v3 e' f' }
> %%%
>
> There are some details with your code I’d do differently:
>
> 1. Instead of using string-joins use format:
> (format #f "v~a" verse)
>
> 2. Instead of using begin/define, use let and let* for local bindings:
> (let ((versenum ...)) #{ ... #})
>
> %%%
> repeat-verses =
> #(define-music-function ( count music  )
> ( index? ly:music? )
>(make-music 'SequentialMusic 'elements
>  (map-in-order
>   (lambda (verse)
>(let ((versenum (string->symbol (format #f "v~a" verse
>  (keepWithTag versenum (ly:music-deep-copy music
>   (iota count 1
>
> \repeat-verses 3 { \tag #'v1 c' \tag #'v2 d' \tag #'v3 e' f' }
> %%%
>
>
> Am Freitag, 24. Mai 2024, 07:41:07 MESZ schrieb Kevin Pye:
>> So after 56 years of programming I've at last got around to writing some
>> Lisp, and of course it doesn't work.
>> 
>> I'm trying to define a routine repeat-verses which would be used like
>> 
>> \repeat-verses 3 \music
>> 
>> which would have the effect of
>> 
>> \keepWithTag #'v1 \music
>> \keepWithTag #'v2 \music
>> \keepWithTag #'v3 \music
>> 
>> I came up with this code:
>> 
>> repeat-verses =
>> #(define-music-function ( count music  )
>> ( index? ly:music? )
>>(make-music 'SequentialMusic 'elements
>>  (map-in-order
>>   (lambda (verse)
>>(begin
>> (define versenum
>>  (string->symbol (string-join (list "v" (number->string verse)) ""
>> ))) #{ \keepWithTag #versenum #music #}))
>>   (iota count 1
>> 
>> which doesn't quite work. It's as though no tags are defined, so anything in
>> \music which is surrounded by a tag is omitted.
>> 
>> Replacing the definition of versenum with (define versenum 'v1) works fine,
>> although of course you get three copies of verse one, and replacing  the
>> definition of versenum with
>> 
>> (define versenum
>>  (string->symbol (string-join (list "v" (number->string 1)) "" )))
>> 
>> (i.e. not using the value of variable verse) also works with three copies of
>> verse one.
>> 
>> So two questions:
>>  1. Why doesn't this work; and
>>  2. How should I really go about solving this problem?
>> Kevin.
>
>
> Attachments:
> * signature.asc



Re: Scheme help

2024-05-24 Thread Valentin Petzel
Hello Kevin,

When you call a music expression like \music Lilypond will allways pass a copy 
of that music object. Thus some music functions assume it is safe to modify 
the original music object. So when you do

\keepWithTag ... #music

you will first remove everything tagged without v1, then everything tagged 
without v2 and so on. So in the end only untagged and tagged with everything 
will persist. Then you get multiple references to that music object.

What you need to do is to copy the music object passed using ly:music-deep-
copy:

%%%
repeat-verses =
#(define-music-function ( count music  )
( index? ly:music? )
   (make-music 'SequentialMusic 'elements
 (map-in-order
  (lambda (verse)
   (begin
(define versenum
 (string->symbol (string-join (list "v" (number->string verse)) "" )))
 #{ \keepWithTag #versenum #(ly:music-deep-copy music) #})) 
  (iota count 1

repeat-verses 3 { \tag #'v1 c' \tag #'v2 d' \tag #'v3 e' f' }
%%%

There are some details with your code I’d do differently:

1. Instead of using string-joins use format:
(format #f "v~a" verse)

2. Instead of using begin/define, use let and let* for local bindings:
(let ((versenum ...)) #{ ... #})

%%%
repeat-verses =
#(define-music-function ( count music  )
( index? ly:music? )
   (make-music 'SequentialMusic 'elements
 (map-in-order
  (lambda (verse)
   (let ((versenum (string->symbol (format #f "v~a" verse
 (keepWithTag versenum (ly:music-deep-copy music
  (iota count 1

\repeat-verses 3 { \tag #'v1 c' \tag #'v2 d' \tag #'v3 e' f' }
%%%


Am Freitag, 24. Mai 2024, 07:41:07 MESZ schrieb Kevin Pye:
> So after 56 years of programming I've at last got around to writing some
> Lisp, and of course it doesn't work.
> 
> I'm trying to define a routine repeat-verses which would be used like
> 
> \repeat-verses 3 \music
> 
> which would have the effect of
> 
> \keepWithTag #'v1 \music
> \keepWithTag #'v2 \music
> \keepWithTag #'v3 \music
> 
> I came up with this code:
> 
> repeat-verses =
> #(define-music-function ( count music  )
> ( index? ly:music? )
>(make-music 'SequentialMusic 'elements
>  (map-in-order
>   (lambda (verse)
>(begin
> (define versenum
>  (string->symbol (string-join (list "v" (number->string verse)) ""
> ))) #{ \keepWithTag #versenum #music #}))
>   (iota count 1
> 
> which doesn't quite work. It's as though no tags are defined, so anything in
> \music which is surrounded by a tag is omitted.
> 
> Replacing the definition of versenum with (define versenum 'v1) works fine,
> although of course you get three copies of verse one, and replacing  the
> definition of versenum with
> 
> (define versenum
>  (string->symbol (string-join (list "v" (number->string 1)) "" )))
> 
> (i.e. not using the value of variable verse) also works with three copies of
> verse one.
> 
> So two questions:
>  1. Why doesn't this work; and
>  2. How should I really go about solving this problem?
> Kevin.



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


Re: jump to coda inside repeat with alternative

2024-05-23 Thread David Wright
On Tue 21 May 2024 at 11:43:10 (+1000), Laurie Savage wrote:
> On Tue, 21 May 2024 at 10:35, Paul Scott wrote:
> 
> > Segno repeat structure is like a black box to me.  I have been
> > relatively successful with help and trial and error.
> >
> > I would really appreciate some help with this that I need soon:
> >
> >  From NR 2.25.16 1.4.1, Segno repeat structure/alla coda, how do I add a
> > repeat with alternative so the coda jump is just before the alternative?
> >
> > Here is the manually written MWE:
> >
> > \version "2.25.16"
> >
> > \fixed c' {
> >c1 \segnoMark \default
> >\repeat volta 2 { d \codaMark \default }
> >\alternative{ e f }
> >e_"D.C. al Coda" \bar "||"
> ><>^"Coda" e
> >\bar "|."
> > }
> >
> I have struggled with this one in the past and gave up in the end. There
> are some tweaks I found on the archived threads but I found it easier to
> enter the segnoMark and codaMark manually. Ditto for the"D.S. al Coda"
> (which is what I think you mean in your example. I often edit big band and
> small combo charts so any simple solution would be wonderful.

Sometimes the easiest way of using these repeat constructions is to
copy and paste an example from Notation Reference §1.4 into your
.ly file, and then insert your music in place of the example's.

If you have a repeat structure nested in another, you can cut and
paste a second example at the appropriate point, and then replace
the music (or placeholder text) in the example with your music again.

However, the example given above doesn't have nested repeats, but
overlapping ones. LP has a mechanism for distinguishing which repeat
an \alternative belongs to if two repeats are nested (it chooses
the innermost). But there's no LP mechanism AFAIK that can unpick
two overlapping repeat structures, so a manual solution is required,
as given.

Cheers,
David.



Re: How to transpose?

2024-05-23 Thread David Kastrup
Kenneth Flak  writes:

> Great, thanks to both of you! Very clarifying. \transposition is, thus,
> going in the direction of instrument -> playback,

More like display pitch -> concert pitch.

> whereas \transpose goes in the opposite direction, if I understand it
> correctly.

\transpose changes the display pitch.  It does not touch the relation
between display pitch and concert pitch.

So if you want to change the relation between display pitch and
instrument pitch after already having declared a \transposition, you get
into kind of a bind.

-- 
David Kastrup



Re: How to transpose?

2024-05-23 Thread Kenneth Flak
Timothy Lanfear, May 23, 2024 at 13:19:
> If you already have the music written in concert pitch, use the
> transpose
> function to change displayed pitch.
>
> \transpose bes, c { \clef treble \key c\major g' }
>
> If your brass players prefer not to have a key signature, omit the \key
> statement.
>
> On 23/05/2024 11:10, [1]bobr...@centrum.is wrote:
>
> Kenneth,
>
> If you look here:
> [2]https://lilypond.org/doc/v2.24/Documentation/notation/
> displaying-pitches#instrument-transpositions
>
> You will see that '\transposition' tells the MIDI and cue functions
> what's
> going on so that MIDI output and cues in other instruments are correct.
> It
> is still necessary to enter the notes at displayed pitch as shown in the
> example.
>
> -David
>

Great, thanks to both of you! Very clarifying. \transposition is, thus,
going in the direction of instrument -> playback, whereas \transpose
goes in the opposite direction, if I understand it correctly.

Best,
Kenneth




Re: How to transpose?

2024-05-23 Thread Timothy Lanfear
If you already have the music written in concert pitch, use the 
transpose function to change displayed pitch.


\transpose bes, c { \clef treble \key c\major g' }

If your brass players prefer not to have a key signature, omit the \key 
statement.


On 23/05/2024 11:10, bobr...@centrum.is wrote:

Kenneth,

If you look here: 
https://lilypond.org/doc/v2.24/Documentation/notation/displaying-pitches#instrument-transpositions


You will see that  '\transposition' tells the MIDI and cue functions 
what's going on so that MIDI output and cues in other instruments are 
correct.  It is still necessary to enter the notes at displayed pitch 
as shown in the example.


-David



*From: *"Kenneth Flak" 
*To: *"Lillypond Users Mailing List" 
*Sent: *Thursday, May 23, 2024 6:55:45 AM
*Subject: *How to transpose?

Hi,

Trying my hands on transposing from concert pitch to Trumpet in Bf
and french horn in F, but the displayed notes are still in concert
pitch... How do I make these display the notes I would like the
players to see?


    \new Staff = "trumpet" \with {
      instrumentName = "Trp"
    }
    {
      \clef treble
      \key c \major
      \transposition bf
      g'
    }
    \new Staff = "french horn" \with {
      instrumentName = "Horn"
    }{
      \clef treble
      \key c \major
      \transposition f
      cs'
    }

Best,
Kenneth

-- 
Roosna & Flak - Contemporary Dance & Music

Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @k...@sonomu.club


--
Timothy Lanfear, Bristol, UK.


Re: How to transpose?

2024-05-23 Thread bobr...@centrum.is
Kenneth, 

If you look here: [ 
https://lilypond.org/doc/v2.24/Documentation/notation/displaying-pitches#instrument-transpositions
 | 
https://lilypond.org/doc/v2.24/Documentation/notation/displaying-pitches#instrument-transpositions
 ] 

You will see that '\transposition' tells the MIDI and cue functions what's 
going on so that MIDI output and cues in other instruments are correct. It is 
still necessary to enter the notes at displayed pitch as shown in the example. 

-David 

> From: "Kenneth Flak" 
> To: "Lillypond Users Mailing List" 
> Sent: Thursday, May 23, 2024 6:55:45 AM
> Subject: How to transpose?

> Hi,

> Trying my hands on transposing from concert pitch to Trumpet in Bf and french
> horn in F, but the displayed notes are still in concert pitch... How do I make
> these display the notes I would like the players to see?

> \new Staff = "trumpet" \with {
> instrumentName = "Trp"
> }
> {
> \clef treble
> \key c \major
> \transposition bf
> g'
> }
> \new Staff = "french horn" \with {
> instrumentName = "Horn"
> }{
> \clef treble
> \key c \major
> \transposition f
> cs'
> }

> Best,
> Kenneth

> --
> Roosna & Flak - Contemporary Dance & Music
> Web: roosnaflak.com
> Code: {github,gitlab}.com/kflak
> Mastodon: @k...@sonomu.club


Re: jump to coda inside repeat with alternative

2024-05-22 Thread Paul Scott

Close enough for now. I get a bar line after the clef sign.

Thank you,

Paul


On 5/22/24 11:49, Knute Snortum wrote:


On Wed, May 22, 2024 at 10:50 AM Paul Scott  
wrote:


I sometimes use \stopStaff and \startStaff before the coda. Can
anyone tell me how to get a clef sign after a \startStaff?


Would Staff.forceClef = ##t work in your situation?  If not, can you 
give us a MWE?


%%%
\version "2.24.3"

{
  c''4 4 4 4 \stopStaff
  s1
  \once \set Staff.forceClef = ##t
  \startStaff c''4 4 4 4
}
%%%


--
Knute Snortum



Re: Centered number of bars of multi-measure rest in piano staff?

2024-05-22 Thread Ole V. Villumsen
Nice, Knute, thanks, that gives me what I wanted.
I had had something similar in mind, but wasn’t able to carry it out.

Sent with [Proton Mail](https://proton.me/) secure email.

On Wednesday, May 22nd, 2024 at 20:36, Knute Snortum  wrote:

> On Wed, May 22, 2024 at 10:43 AM Ole V. Villumsen 
>  wrote:
>
>> Just like in a piano staff we can have centred dynamics between the two 
>> staves, can Lilypond also centre the number of bars a multi-measure rest 
>> lasts?
>
> This is how I would do it:
>
> %%%\version "2.24.3"
>
> musicOne = {
> \clef bass
> \key f \major
> \time 3/8
> \partial 8
> \omit MultiMeasureRestNumber
> r8 | R4.*7 |
> }
>
> musicTwo = {
> \clef bass
> \key f \major
> \time 3/8
> \partial 8
> r8 | \offset MultiMeasureRestNumber.Y-offset 1 R4.*7 |
> }
>
> \new PianoStaff <<
> \new Staff \compressMMRests \musicOne
> \new Staff \compressMMRests \musicTwo
>>>
> %%%
>
> The key points are omitting the multi measure rest number in the right hand 
> and moving the number up in the left.
>
> --
> Knute Snortum

Re: jump to coda inside repeat with alternative

2024-05-22 Thread Knute Snortum
On Wed, May 22, 2024 at 10:50 AM Paul Scott  wrote:

> I sometimes use \stopStaff and \startStaff before the coda. Can anyone
> tell me how to get a clef sign after a \startStaff?
>

Would Staff.forceClef = ##t work in your situation?  If not, can you give
us a MWE?

%%%
\version "2.24.3"

{
  c''4 4 4 4 \stopStaff
  s1
  \once \set Staff.forceClef = ##t
  \startStaff c''4 4 4 4
}
%%%


--
Knute Snortum


Re: Centered number of bars of multi-measure rest in piano staff?

2024-05-22 Thread Knute Snortum
On Wed, May 22, 2024 at 10:43 AM Ole V. Villumsen <
ole.villum...@protonmail.ch> wrote:

> Just like in a piano staff we can have centred dynamics between the two
> staves, can Lilypond also centre the number of bars a multi-measure rest
> lasts?
>

This is how I would do it:

%%%
\version "2.24.3"

musicOne = {
  \clef bass
  \key f \major
  \time 3/8
  \partial 8
  \omit MultiMeasureRestNumber
  r8 | R4.*7 |
}

musicTwo = {
  \clef bass
  \key f \major
  \time 3/8
  \partial 8
  r8 | \offset MultiMeasureRestNumber.Y-offset 1 R4.*7 |
}

\new PianoStaff <<
  \new Staff \compressMMRests \musicOne
  \new Staff \compressMMRests \musicTwo
>>
%%%

The key points are omitting the multi measure rest number in the right hand
and moving the number up in the left.


--
Knute Snortum


Re: jump to coda inside repeat with alternative

2024-05-22 Thread Paul Scott


On 5/20/24 18:43, Laurie Savage wrote:
I have struggled with this one in the past and gave up in the end. 
There are some tweaks I found on the archived threads but I found it 
easier to enter the segnoMark and codaMark manually. Ditto for 
the"D.S. al Coda" (which is what I think you mean in your example. I 
often edit big band and small combo charts so any simple solution 
would be wonderful.


Thank you, Laurie.

That's what I've done for years until segno repeat appeared.

I also often edit big band, concert band and orchestra charts, often 
just to make my parts easier to read,


I sometimes use \stopStaff and \startStaff before the coda. Can anyone 
tell me how to get a clef sign after a \startStaff?


TIA,

Paul



Laurie


On Tue, 21 May 2024 at 10:35, Paul Scott  wrote:

Segno repeat structure is like a black box to me.  I have been
relatively successful with help and trial and error.

I would really appreciate some help with this that I need soon:

 From NR 2.25.16 1.4.1, Segno repeat structure/alla coda, how do I
add a
repeat with alternative so the coda jump is just before the
alternative?

Here is the manually written MWE:

\version "2.25.16"

\fixed c' {
   c1 \segnoMark \default
   \repeat volta 2 { d \codaMark \default }
   \alternative{ e f }
   e_"D.C. al Coda" \bar "||"
   <>^"Coda" e
   \bar "|."
}

TIA,

Paul



Re: One-page PDF cut off after a certain height?

2024-05-22 Thread Christ van Willegen
Hello Jean,

On Mon, May 20, 2024 at 11:54 AM Jean Abou Samra  wrote:

(Lots of helpful stuff)


> HTH
> Jean
>

Yes, that was exactly what was wrong, thanks!

Christ van Willegen


Re: Removing the change clef in a first ending (volta 1)

2024-05-21 Thread Knute Snortum
On Tue, May 21, 2024 at 11:28 AM Xavier Scheuer  wrote:

> On Tue, 21 May 2024 at 19:42, Knute Snortum  wrote:
> >
> > It's probably easier to see in the MWE and screen shot I've attached.
> So is there a way to get rid of the bass change clef indicator in the first
> ending?
>
> Hello,
>
> \once \set Staff.explicitClefVisibility = #end-of-line-invisible
> before your \break at the end of volta 1.
>

That's exactly what I was looking for, thanks!


--
Knute Snortum


Re: vertical spacing between systems for only part of a score

2024-05-21 Thread Dirck Nagy
Hi Werner, everyone else...

Oops, sorry...i didn't click "reply all"!

I also apologize for not searching the archive more thoroughly.  Googgle 
searches arent always the best thing...

Here are two examples from the score i'm working on now.  The first one is 
confusing because of the "sim" which is too close to the system below.(Yes, 
I know i can tweak the position of it, and i will, but sometimes articulations 
and expressions and markup can get really cluttered)

The second example, the "harm 12" and the ligature to the following note are 
problems.  (I will reposition the ligature to the top of the expression)

Neither of these are serious problems, but I'm sure you can imagine cases, 
especially in contemporary, or more avant-garde music,  where individually 
spaced systems might very well be a concern.

A third example might be where, instead of spreading out the last few measures 
to the very bottom of the page, (as per \paper {  ragged-last-bottom = ##f 
etc.)  a printer might want to only spread out the systems to cover 2/3 of the 
page, leaving room for text, images, etc, at the bottom of the page.   i.e., a 
final page might have only three systems instead of seven...this would look 
weird if it were evenly spread all the way to the bottom.

Not a big deal, really, but there it is.

Thanks for all  the help!

dirck


[cid:191e5338-025c-488a-862f-97ecd3f34827]

[cid:f31eba60-e224-4fd4-baa4-3049f382160d]





From: Werner LEMBERG 
Sent: Tuesday, May 21, 2024 1:34 PM
To: Dirck Nagy ; lilypond-user@gnu.org 
Subject: Re: vertical spacing between systems for only part of a score


Caution: *External Email: Use caution responding, opening attachments, or 
clicking on links.*


[Please always use 'reply to all'; I've now CCed the mailing list again.]


> >>> Here, I want to make 7 lines spread out to fill the entire last
> >>> page, but leave the other pages alone.
> >
> > Ah, I missed 'last page'.  Perhaps all you need is
> >
> > ```
> > \paper {
> >   ragged-last-bottom = ##f
> > }
> > ```
>
> the ragged-last-bottom = ##f does work in this case.

Good.

> I can see other uses for adjustable vertical spacing.  Is there any
> other way to do it, on a "one system at a time" basis?

No, as mentioned in the thread.  You should also look up the mentioned
issue to get more information.  I also recommend to do some searching
in the 'lilypond-user' mailing list archive, which collects LilyPond
wisdom for more than 20 years...

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

> Any workarounds that you can think of?

The issue gives a work-around; there are certainly more available.

However, in general, it is a rather uncommon request – you shalt not
question LilyPond's vertical spacing decisions :-) To be serious: what
is your exact use case?  In most cases it looks weird if the vertical
spacing suddenly changes.


Werner


Re: vertical spacing between systems for only part of a score

2024-05-21 Thread Mats Bengtsson


  
  


On 2024-05-21 18:45, Werner LEMBERG
  wrote:


  

  

  Here, I want to make 7 lines spread out to fill the entire last
page, but leave the other pages alone.


  
  
Ah, I missed 'last page'.  Perhaps all you need is

```
\paper {
  ragged-last-bottom = ##f
}
```


and possibly combined with a \pageBreak at the place where you
  want to page break to appear. 

   /Mats


  




Re: Removing the change clef in a first ending (volta 1)

2024-05-21 Thread Werner LEMBERG

>> This information should probably be added to the NR, together with
>> an example.  Can you prepare a patch (or even an MR) or formulate
>> something that I can then massage accordingly?
> 
> Actually this is already in NR 1.1.3 Clef (not specific to volta,
> but actually Lily's default kind of makes sense too in this case)

Mhmm, I think it's hard for beginners to see the connection.  I still
think this deserves either an explicit example in the NR – or an LSR
snippet, maybe a sibling to

  https://lsr.di.unimi.it/LSR/Item?id=1119


 Werner


Re: Removing the change clef in a first ending (volta 1)

2024-05-21 Thread Xavier Scheuer
On Tue, 21 May 2024 at 20:38, Werner LEMBERG  wrote:
>
> This information should probably be added to the NR, together with an
> example.  Can you prepare a patch (or even an MR) or formulate
> something that I can then massage accordingly?

Hi Werner,

Actually this is already in NR 1.1.3 Clef
(not specific to volta, but actually Lily's default kind of makes sense too
in this case)

> By default, a clef change taking place at a line break causes the new
clef symbol to be printed at the end of the previous line, as a ‘warning
clef’, as well as at the beginning of the next. This warning clef can be
suppressed.

Kind regards,
Xavier


Re: Removing the change clef in a first ending (volta 1)

2024-05-21 Thread Werner LEMBERG


> > is there a way to get rid of the bass change clef indicator in the
> > first ending?
> 
> \once \set Staff.explicitClefVisibility = #end-of-line-invisible
> before your \break at the end of volta 1.

This information should probably be added to the NR, together with an
example.  Can you prepare a patch (or even an MR) or formulate
something that I can then massage accordingly?


Werner



Re: vertical spacing between systems for only part of a score

2024-05-21 Thread Werner LEMBERG

[Please always use 'reply to all'; I've now CCed the mailing list again.]


> >>> Here, I want to make 7 lines spread out to fill the entire last
> >>> page, but leave the other pages alone.
> >
> > Ah, I missed 'last page'.  Perhaps all you need is
> >
> > ```
> > \paper {
> >   ragged-last-bottom = ##f
> > }
> > ```
>
> the ragged-last-bottom = ##f does work in this case.

Good.

> I can see other uses for adjustable vertical spacing.  Is there any
> other way to do it, on a "one system at a time" basis?

No, as mentioned in the thread.  You should also look up the mentioned
issue to get more information.  I also recommend to do some searching
in the 'lilypond-user' mailing list archive, which collects LilyPond
wisdom for more than 20 years...

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

> Any workarounds that you can think of?

The issue gives a work-around; there are certainly more available.

However, in general, it is a rather uncommon request – you shalt not
question LilyPond's vertical spacing decisions :-) To be serious: what
is your exact use case?  In most cases it looks weird if the vertical
spacing suddenly changes.


Werner


Re: Removing the change clef in a first ending (volta 1)

2024-05-21 Thread Xavier Scheuer
On Tue, 21 May 2024 at 19:42, Knute Snortum  wrote:
>
> It's probably easier to see in the MWE and screen shot I've attached.  So
is there a way to get rid of the bass change clef indicator in the first
ending?

Hello,

\once \set Staff.explicitClefVisibility = #end-of-line-invisible
before your \break at the end of volta 1.

Kind regards,
Xavier


Re: DIfferent note values within a chord

2024-05-21 Thread Xavier Scheuer
On Tue, 21 May 2024 at 16:04, Aaron Hill  wrote:
>
> It is interesting how we interpreted the clef and key signature
> differently when trying to recreate the image.  You did manage to the
> squeeze in the forte, which I did not.

Yes, I thought exactly the same thing when I saw your answer. In fact, I
added a B flat because I couldn't imagine having these chords with the B-F
tritone fourth.
And when I saw your answer in the bass clef, I said to myself that I must
be conditioned for the treble clef since I originally play the violin.
In the end, when seeing the original score communicated by Jun, neither of
us was “right”.  ;-P

Kind regards,
Xavier


Re: Stem disappearing

2024-05-21 Thread Werner LEMBERG

>> I am typesetting a piece and the stem in the first e quarter note
>> disappears when I add \slurUp upper notes.  Is this a bug?
> 
> This is the default behaviour of LilyPond: unify stems.  What you need
> to do is to tell LilyPond not to use `\voiceOne` (up) and `\voiceTwo`
> (down) but rather `\voiceTwo` (down) and `\voiceFour` (down).

I think I've misunderstood what you want to do.  See code below: You
should use a `\relative` block to enclose everything and `\voiceXXX`
inside to select the voice you need.


Werner


```
\version "2.24.2"

\new PianoStaff <<
  \new Staff <<
\time 4/4
\key a \major

 \new Voice \relative c' {
   \voiceOne
   e4-1\mf( a8.-3 b16 gis4) r8 \slurUp a-3
 }

 \new Voice \relative c' {
   \voiceTwo
   e2 e
 }
  >>
>>
```


Re: Stem disappearing

2024-05-21 Thread Pierre Perol-Schneider
Hi Raphael,
Your voice number commands are missplaced. You'd rather write:

\version "2.24.2"

\new PianoStaff <<
  \new Staff <<
\time 4/4
\key a \major
voice one
\new Voice \relative c' {
  \voiceOne
  %\slurUp % <= not needed
  e4-1\mf  ( a8.-3 b16 gis4) r8 a-3 \break
}%end voice one

voice two
\new Voice \relative c' {
  \voiceTwo
  %\stemDown % <= not needed
  e2 e
}%end voice two
  >>%end treble staff
>>%end piano staff

HTH, cheers,
Pierre

Le mar. 21 mai 2024 à 19:57, Rafael González  a
écrit :

> I am typesetting  a piece and the stem in the first e quarter note
> disappears when I add \slurUp upper notes. Is this a bug? Thank you. Rafael.
>
> %%%
> with the slur down , see attachment.
> \version "2.24.2"
> \new PianoStaff
>
> <<
>
> \new Staff <<
> \time 4/4
> \key a \major
>
> voice one
> \new Voice \voiceOne
> \relative c'
>
> {
> e4-1\mf  ( a8.-3 b16 gis4) r8 \slurUp a-3
> \break
>
> }%end voice one
>
>
> %voice two
> \new Voice \voiceTwo
> \relative c' {
> \stemDown e2 e
>
>
>
>
> }%end voice two
> >>%end treble staff
>
>
>
>
>
> >>%end piano staff
>
>
>
>
>
>
> 
> adding  \slurUp the stem in the e initial quarter note disappears. see
> attachment stem gone.
>
> \version "2.24.2"
> \new PianoStaff
>
> <<
>
> \new Staff <<
> \time 4/4
> \key a \major
>
> voice one
> \new Voice \voiceOne
> \relative c'
>
> {
>   \slurUp
> e4-1\mf  ( a8.-3 b16 gis4) r8 \slurUp a-3
> \break
>
> }%end voice one
>
>
> %voice two
> \new Voice \voiceTwo
> \relative c' {
> \stemDown e2 e
>
>
>
>
> }%end voice two
> >>%end treble staff
>
>
>
>
>
> >>%end piano staff
>


Re: Stem disappearing

2024-05-21 Thread Werner LEMBERG

> I am typesetting a piece and the stem in the first e quarter note
> disappears when I add \slurUp upper notes.  Is this a bug?

This is the default behaviour of LilyPond: unify stems.  What you need
to do is to tell LilyPond not to use `\voiceOne` (up) and `\voiceTwo`
(down) but rather `\voiceTwo` (down) and `\voiceFour` (down).


Werner


```
\version "2.24.2"

\new PianoStaff <<
  \new Staff <<
\time 4/4
\key a \major

 \new Voice \relative c' {
   \voiceFour
   e4-1\mf( a8.-3 b16 gis4) r8 \slurUp a-3
 }

 \new Voice \relative c' {
   \voiceTwo
   e2 e
 }
  >>
>>
```



Re: Moving dynamics onto the staff

2024-05-21 Thread Knute Snortum
On Tue, May 21, 2024 at 7:10 AM Werner LEMBERG  wrote:

>
> You want to position the 'f' sign into the staff lines of the upper
> staff?  If yes, then it doesn't fit with the concept of a a `Dynamics`
> context *between* the staves IMHO.  Instead, I would attach the 'f'
> sign to the upper staff, since it clearly belongs to that staff.
>

 Yes, you've hit the nail on the head.  I ran into the problem because I
almost always put my dynamic markings in a Dynamics context, but then
moving a mark into the upper or lower staff is impossible.  The solution is
just to put the dynamic mark in the staff, as you stated.


--
Knute Snortum


Re: vertical spacing between systems for only part of a score

2024-05-21 Thread Werner LEMBERG


>> Here, I want to make 7 lines spread out to fill the entire last
>> page, but leave the other pages alone.

Ah, I missed 'last page'.  Perhaps all you need is

```
\paper {
  ragged-last-bottom = ##f
}
```


Werner



Re: vertical spacing between systems for only part of a score

2024-05-21 Thread Werner LEMBERG


> I would like to increase the vertical distance between systems for a
> specific area in a score.
> 
> I know how to change vertical distance by using the \paper
> {system-system etc... route, but that governs the entire score.  Here,
> I want to make 7 lines spread out to fill the entire last page, but
> leave the other pages alone.
> 
> Is there an "override" command i can use, or a way to add padding by
> typing it into the appropriate spot in one of the voices?  (BTW, i
> have a separate "spacing voice" in my score)

This has been discussed recently; see

  https://lists.gnu.org/archive/html/lilypond-user/2024-05/msg00293.html


 Werner



Re: DIfferent note values within a chord

2024-05-21 Thread Jun Tamura
Thank you all for your really quick response.

> It is interesting how we interpreted the clef and key signature differently

Sorry for the confusion. The example was actually from:
https://imslp.org/wiki/Special:ImagefromIndex/16500/wc13

Thanks again!

Jun

> 2024/05/21 23:24、David Kastrup のメール:
> 
> Aaron Hill mailto:lilyp...@hillvisions.com>> 
> writes:
> 
>> On 2024-05-21 6:40 am, Jun Tamura wrote:
>>> Hello,
>>> Could someone give me a pointer for this?
>>> This is a quite popular notation for bowed string instruments. I’m
>>> almost certain that I saw a way to achieve this before but could not
>>> find it this time.
>> 
>> 
>> What you typically do is \tweak the duration-log property of the
>> notehead you want to change.  In the example you provided, begin with
>> all notes simply as half-notes.  The only notehead you need to adjust
>> will be the low one.
>> 
>> 
>> \version "2.25.13"
>> 
>> {
>>  \clef bass \omit Staff.Clef
>>  \omit Staff.TimeSignature
>>  \stemDown
>> 
>>  <\tweak duration-log 2 d, d a>2
>>  <\tweak duration-log 2 d a f'>2
>>  <\tweak duration-log 2 e, c e>2 \fermata
>> }
>> 
> 
> Frankly, someone™ should put in the work to make
> 
> \version "2.25.13"
> 
> {
>  \clef bass \omit Staff.Clef
>  \omit Staff.TimeSignature
>  \stemDown
> 
>  << d,4 d2 a >>
>  << d4 a2 f' >>
>  << e,4 c2 e \fermata >>
> }
> 
> 
> just work.  There is an additional bit of ickiness for per-note
> articulations as compared to per-chord articulations since per-note
> articulations would require an extra < > bracketing around the note in
> question in addition to << >> around the chord.
> 
> Also you need to take care when using that construct in \relative since
> < ... > conveys the _first_ pitch in the chord as the current relative
> pitch to the next note while << ... >> conveys the _last_ pitch.  So
> switching between the two does involve some editing.
> 
> -- 
> David Kastrup



Re: DIfferent note values within a chord

2024-05-21 Thread David Kastrup
Aaron Hill  writes:

> On 2024-05-21 6:40 am, Jun Tamura wrote:
>> Hello,
>> Could someone give me a pointer for this?
>> This is a quite popular notation for bowed string instruments. I’m
>> almost certain that I saw a way to achieve this before but could not
>> find it this time.
>
>
> What you typically do is \tweak the duration-log property of the
> notehead you want to change.  In the example you provided, begin with
> all notes simply as half-notes.  The only notehead you need to adjust
> will be the low one.
>
> 
> \version "2.25.13"
>
> {
>   \clef bass \omit Staff.Clef
>   \omit Staff.TimeSignature
>   \stemDown
>
>   <\tweak duration-log 2 d, d a>2
>   <\tweak duration-log 2 d a f'>2
>   <\tweak duration-log 2 e, c e>2 \fermata
> }
> 

Frankly, someone™ should put in the work to make

\version "2.25.13"

{
  \clef bass \omit Staff.Clef
  \omit Staff.TimeSignature
  \stemDown

  << d,4 d2 a >>
  << d4 a2 f' >>
  << e,4 c2 e \fermata >>
}


just work.  There is an additional bit of ickiness for per-note
articulations as compared to per-chord articulations since per-note
articulations would require an extra < > bracketing around the note in
question in addition to << >> around the chord.

Also you need to take care when using that construct in \relative since
< ... > conveys the _first_ pitch in the chord as the current relative
pitch to the next note while << ... >> conveys the _last_ pitch.  So
switching between the two does involve some editing.

-- 
David Kastrup



Re: Moving dynamics onto the staff

2024-05-21 Thread Werner LEMBERG


> Interestingly, the following does *not* work, [...]

It's not clear to me how the end result should look like.

> The dynamics context doesn't know that there's a staff above it
> and/ot the piano staff forbids the dynamics from encroaching on the
> staff above.

You want to position the 'f' sign into the staff lines of the upper
staff?  If yes, then it doesn't fit with the concept of a a `Dynamics`
context *between* the staves IMHO.  Instead, I would attach the 'f'
sign to the upper staff, since it clearly belongs to that staff.


Werner



Re: DIfferent note values within a chord

2024-05-21 Thread Aaron Hill

On 2024-05-21 6:55 am, Xavier Scheuer wrote:

\relative c' {
\key bes \major
\stemDown
<\tweak duration-log 2 bes bes' f'>2\f
  <\tweak duration-log 2 bes' f' d'>2 |
<\tweak duration-log 2 c, a' c>2\fermata
}


It is interesting how we interpreted the clef and key signature 
differently when trying to recreate the image.  You did manage to the 
squeeze in the forte, which I did not.



-- Aaron Hill



Re: Moving dynamics onto the staff

2024-05-21 Thread Knute Snortum
On Mon, May 20, 2024 at 8:58 PM Werner LEMBERG  wrote:

> Since version 2.25.13 the NR contains the attached warning box.
>

Thank you, Werner.  Interestingly, the following does *not* work, but I can
kind of understand why.  The dynamics context doesn't know that there's a
staff above it and/ot the piano staff forbids the dynamics from encroaching
on the staff above.

\version "2.25.16"

rightHand = \relative {
  c''1
}

leftHand = \relative {
  \clef bass
  c1
}

dynamics = {
  \once \override DynamicLineSpanner.outside-staff-priority = ##f
  \once \override DynamicLineSpanner.Y-offset = 7
  s1\f
}

\score {
  \new PianoStaff <<
\new Staff \rightHand
\new Dynamics \dynamics
\new Staff \leftHand
  >>
}



--
Knute Snortum


Re: DIfferent note values within a chord

2024-05-21 Thread Xavier Scheuer
On Tue, 21 May 2024 at 15:42, Jun Tamura  wrote:
>
> Hello,
>
> Could someone give me a pointer for this?
>
> This is a quite popular notation for bowed string instruments. I’m almost
certain that I saw a way to achieve this before but could not find it this
time.

Hello,

\relative c' {
\key bes \major
\stemDown
<\tweak duration-log 2 bes bes' f'>2\f
  <\tweak duration-log 2 bes' f' d'>2 |
<\tweak duration-log 2 c, a' c>2\fermata
}

Kind regards,
Xavier


Re: DIfferent note values within a chord

2024-05-21 Thread Aaron Hill

On 2024-05-21 6:40 am, Jun Tamura wrote:

Hello,

Could someone give me a pointer for this?

This is a quite popular notation for bowed string instruments. I’m 
almost certain that I saw a way to achieve this before but could not 
find it this time.



What you typically do is \tweak the duration-log property of the 
notehead you want to change.  In the example you provided, begin with 
all notes simply as half-notes.  The only notehead you need to adjust 
will be the low one.



\version "2.25.13"

{
  \clef bass \omit Staff.Clef
  \omit Staff.TimeSignature
  \stemDown

  <\tweak duration-log 2 d, d a>2
  <\tweak duration-log 2 d a f'>2
  <\tweak duration-log 2 e, c e>2 \fermata
}




-- Aaron Hill



Re: DIfferent note values within a chord

2024-05-21 Thread Jean Abou Samra
> Could someone give me a pointer for this?
> 
> This is a quite popular notation for bowed string instruments. I’m almost
> certain that I saw a way to achieve this before but could not find it this
> time.


\version "2.24.2"

{
  2
}


HTH
Jean



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


Re: Moving dynamics onto the staff

2024-05-20 Thread Werner LEMBERG

>> > So why would overriding the dynamic line spanner's
>> > outside-staff-priority change where the forte goes?  Isn't it
>> > DynamicText?  If anyone can clear this up for me, I would be very
>> > appreciative.
>>
>> When there are consecutive dynamics like \p \< ... \f \> ... \pp,
>> they need to be all vertically aligned. LilyPond achieves that by
>> grouping them into a same DynamicLineSpanner, so it's that object
>> which is responsible for the vertical placement of dynamics. In
>> this case, there's only one dynamic in the DynamicLineSpanner, but
>> this still applies.
> 
> Thank you for taking the time to explain that to me.

Since version 2.25.13 the NR contains the attached warning box.


Werner


Re: Moving dynamics onto the staff

2024-05-20 Thread Knute Snortum
On Mon, May 20, 2024 at 6:33 PM Jean Abou Samra  wrote:

> > So why would overriding the dynamic line spanner's outside-staff-priority
> > change where the forte goes?  Isn't it DynamicText?  If anyone can clear
> this
> > up for me, I would be very appreciative.
>
> When there are consecutive dynamics like \p \< ... \f \> ... \pp, they
> need to be all vertically aligned. LilyPond achieves that by grouping
> them into a same DynamicLineSpanner, so it's that object which is
> responsible
> for the vertical placement of dynamics. In this case, there's only
> one dynamic in the DynamicLineSpanner, but this still applies.
>

Thank you for taking the time to explain that to me.


--
Knute Snortum


Re: jump to coda inside repeat with alternative

2024-05-20 Thread Laurie Savage
I have struggled with this one in the past and gave up in the end. There
are some tweaks I found on the archived threads but I found it easier to
enter the segnoMark and codaMark manually. Ditto for the"D.S. al Coda"
(which is what I think you mean in your example. I often edit big band and
small combo charts so any simple solution would be wonderful.

Laurie


On Tue, 21 May 2024 at 10:35, Paul Scott  wrote:

> Segno repeat structure is like a black box to me.  I have been
> relatively successful with help and trial and error.
>
> I would really appreciate some help with this that I need soon:
>
>  From NR 2.25.16 1.4.1, Segno repeat structure/alla coda, how do I add a
> repeat with alternative so the coda jump is just before the alternative?
>
> Here is the manually written MWE:
>
> \version "2.25.16"
>
> \fixed c' {
>c1 \segnoMark \default
>\repeat volta 2 { d \codaMark \default }
>\alternative{ e f }
>e_"D.C. al Coda" \bar "||"
><>^"Coda" e
>\bar "|."
> }
>
> TIA,
>
> Paul
>
>
>


Re: Moving dynamics onto the staff

2024-05-20 Thread Jean Abou Samra
> So why would overriding the dynamic line spanner's outside-staff-priority
> change where the forte goes?  Isn't it DynamicText?  If anyone can clear this
> up for me, I would be very appreciative. 

When there are consecutive dynamics like \p \< ... \f \> ... \pp, they
need to be all vertically aligned. LilyPond achieves that by grouping
them into a same DynamicLineSpanner, so it's that object which is responsible
for the vertical placement of dynamics. In this case, there's only
one dynamic in the DynamicLineSpanner, but this still applies.



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


Re: Conditional code in the midi block

2024-05-20 Thread Carolyn Beeton
Thank you all for your suggestions.  I finally have the flag working after 
years of just editing my master file when I wanted one track per voice!
Thanks,
Carolyn

> On May 20, 2024, at 6:09 AM, Jean Abou Samra  wrote:
> 
> 
>> nostaffmidi =
>> #(define-scheme-function () ()
>>   (if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #}))
> 
> 
> Ah, that proves me wrong. I didn't recall the parser was smart enough for 
> this.
> 
> 
>> Although, I don't understand why the contents of the scheme functions cannot 
>> be placed directly into the midi block like this
>> 
>> \midi {
>>  #(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #})
>>  #(if TrackPerVoice #{ \context { \Voice \consists "Staff_performer" } #})
>> }
> 
> 
> It works with $ instead of # , as explained in my other post.
> 
> 
> 



Re: Conditional code in the midi block

2024-05-20 Thread David Kastrup
Jean Abou Samra  writes:

> Alternatively, you can do it more like you were envisioning, but for
> technical reasons, you have to start the Scheme code with $ , not # ,
> and you also have to include an extra \midi { } around the \context
> blocks (basically because \context outside \layout or \midi is a
> different command).


> The # vs $ issue is explained here:
> https://extending-lilypond.gitlab.io/en/extending/lily-and-scheme.html#hash-vs-dollar

No, it isn't.  What happens here is actually not as much a "technical
reason" as a design decision.  The difference between $ and # explained
in the manual entry is orthogonal to it.

Here is the rundown:

$ produces a token category based on the type of the expression.  That
means that the type of the expression can change the way the parser
parses an expression, and that can be important since the parser may use
lookahead to make its decisions, and that may mean that the type of the
token (and thus the underlying expression) may need to be known before
the previous expression is given its place in the grammar.

# does produce a single token category.  That means that the parsing can
go ahead without even knowing the value of the expression, and the
expression is only evaluated once its value is actually needed, making
for more predictable evaluation order.

That much is sort of in the manual.  But what isn't there is that
whenever # is going to be accepted, there must be an explicit rule in
the grammar accepting it, and that essentially means that when that rule
is considered applicable, the grammar is fixed.

That still is sort of in the manual.  But here is where the design
decision comes into play: Scheme may be executed for the purpose of
creating a side effect, like assigning a value to a variable.  When a
Scheme function is being called, it doesn't know whether its return
value is going to get used for anything, and a Scheme function executed
for its side effect may or may not return a meaningful value.

The most prominent side effect is a variable assignment.  So as kind of
a design rule, at any place in the grammar where you could conceivably
write an assignment, the value returned by #... is getting ignored
because the expression may only have been called for its side effect,
like an assigment.

Now $ should never be called just for a side effect (because it is kind
of a sledgehammer you should not be using unnecessarily).  Function
calls introduced by \ are explicitly declared to be of the kind where
LilyPond knows when it is supposed to be using the return value.  And
calling a variable by its name \... does not cause a side effect, so it
is safe to assume that you are not invoking its name for the purpose of
getting a side effect.

So this "I am ignoring the result in contexts where assignments may
occur" rule only is made to affect # as a way of invoking Scheme
expressions.

Where and how should we document/put this rationale so that future
contributors and power users are able to understand the current behavior
and make qualified decisions about future behavior?

I am not sold on this being the best/simplest/most logical that LilyPond
can be made to behave.  But at the current point of time, I don't know
how to do better.  And when someone wants to change it, I'd like them to
be aware of the rationale behind the current behavior.

-- 
David Kastrup



Re: Conditional code in the midi block

2024-05-20 Thread Thomas Morley
Am So., 19. Mai 2024 um 21:28 Uhr schrieb Carolyn Beeton
:
>
> I would like to include some Staff and Voice context settings in the \midi 
> block only if a flag is set to ##t and I have not been able to figure out how 
> to do this.  When I try to wrap the \context blocks in a code block with 
> #{…#} I get this error:
> trackPerVoiceMWE.ly:31:16: error: syntax error, unexpected '{', expecting 
> SCM_IDENTIFIER or SCM_TOKEN or STRING or SYMBOL
>   \context {
> Is there any way to conditionally change the Staff_performer based on a flag 
> setting?
>
> This is my non-working MWE:
>
> \version "2.24.0"
> \include "english.ly"
>
> global = {
>   \key c \major
>   \time 4/4
> }
> TrackPerVoice = ##t
> \score {
>   \new ChoirStaff <<
> \new Staff <<
>   \new Voice = "soprano" <<
> \global
> \relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
>   >>
>   \new Voice = "alto" <<
> \global
> \voiceTwo
> \relative c' { c'4 b a g | f e d2 }
>   >>
> >>
>   >>
>   \layout {}
>   \midi {
> #(display (format #f "TrackPerVoice is ~a\n" TrackPerVoice))
> #(if TrackPerVoice #{
>   #(display "One track per Voice (may make too many voices with 
> polyphony)")
>   #(display "Turn this off to get sop and alto combined in one track.")
>   \context {
> \Staff
> \remove "Staff_performer"
>   }
>   \context {
> \Voice
> \consists "Staff_performer"
>   }
> #} )
>   }
> }
>
> Thanks,
> Carolyn

Here my take on this. Modeled after `enablePolymeter`. Prpbably
overkill, though...

\version "2.24.3"

enableVoicePerformer =
#(define-void-function (do-it) (boolean?)
  (when do-it
(display "One track per Voice (may make too many voices with polyphony)")
(display "Turn this off to get sop and alto combined in one track.")
(let ((module (current-module))
  (cmod-remove (ly:make-context-mod))
  (cmod-consists (ly:make-context-mod)))
 (if (not (output-module? module))
 (ly:parser-error (G_ "Not in an output definition")))
 (ly:add-context-mod cmod-remove (list 'remove 'Staff_performer))
 (ly:add-context-mod cmod-consists (list 'consists 'Staff_performer))
 ;; FIXME: any chance to use ly:output-find-context-def here?  The
 ;; problem is that we don't have access to the context def, just
 ;; its scope (module).
 (module-map
  (lambda (_sym var)
   (if (variable-bound? var)
   (let ((cdef (variable-ref var)))
 (if (ly:context-def? cdef)
 (let* ((context-name
  (ly:context-def-lookup cdef 'context-name))
(aliases (ly:context-def-lookup cdef 'aliases))
(all-names (cons context-name aliases)))
   (cond
((memq 'Staff all-names)
 (variable-set!
   var
   (ly:context-def-modify cdef cmod-remove)))
((memq 'Voice all-names)
 (variable-set!
   var
   (ly:context-def-modify cdef cmod-consists)
  module

global = {
  \key c \major
  \time 4/4
}

TrackPerVoice = ##t

\score {
  \new ChoirStaff <<
\new Staff
\with { midiInstrument = "acoustic grand" }
<<
  \new Voice = "soprano"
  \with { midiInstrument = "marimba" }
   <<
\global
\relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
  >>
  \new Voice = "alto"
  \with { midiInstrument = "violin" }
  <<
\global
\voiceTwo
\relative c' { c'4 b a g | f e d2 }
  >>
>>
  >>
  \layout {}
  \midi {
\enableVoicePerformer \TrackPerVoice
  }
}


Cheers,
  Harm



Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra

> nostaffmidi =
> #(define-scheme-function () ()
>(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #}))


Ah, that proves me wrong. I didn't recall the parser was smart enough for this.


> Although, I don't understand why the contents of the scheme functions cannot 
> be placed directly into the midi block like this
> 
> \midi {
>   #(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #})
>   #(if TrackPerVoice #{ \context { \Voice \consists "Staff_performer" } #})
> }


It works with $ instead of # , as explained in my other post.




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


Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra

> I would like to include some Staff and Voice context settings in the
> \midi block only if a flag is set to ##t and I have not been able to
> figure out how to do this.  When I try to wrap the \context blocks
> in a code block with #{…#} I get this error:
> trackPerVoiceMWE.ly:31:16: error: syntax error, unexpected '{', expecting
> SCM_IDENTIFIER or SCM_TOKEN or STRING or SYMBOL
>   \context {


Probably the easiest way is to include or exclude a whole \midi block like this:


\version "2.24.0"
\include "english.ly"

global = {
  \key c \major
  \time 4/4
}

TrackPerVoice = ##t
\score {
  \new ChoirStaff <<
\new Staff <<
  \new Voice = "soprano" <<
\global
\relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
  >>
  \new Voice = "alto" <<
\global
\voiceTwo
\relative c' { c'4 b a g | f e d2 }
  >>
>>
  >>
  \layout { }
  #(if TrackPerVoice
   (begin
 (display "One track per Voice (may make too many voices with 
polyphony)")
 (display "Turn this off to get sop and alto combined in one track.")
 #{
   \midi {
 \context {
   \Staff
   \remove "Staff_performer"
 }
 \context {
   \Voice
   \consists "Staff_performer"
 }
   }
 #})
   #{ \midi { } #})
}



Alternatively, you can do it more like you were envisioning, but for technical
reasons, you have to start the Scheme code with $ , not # , and you also have
to include an extra \midi { } around the \context blocks (basically because
\context outside \layout or \midi is a different command).



\version "2.24.0"
\include "english.ly"

global = {
  \key c \major
  \time 4/4
}
TrackPerVoice = ##t
\score {
  \new ChoirStaff <<
\new Staff <<
  \new Voice = "soprano" <<
\global
\relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
  >>
  \new Voice = "alto" <<
\global
\voiceTwo
\relative c' { c'4 b a g | f e d2 }
  >>
>>
  >>
  \layout { }
  \midi {
$(if TrackPerVoice
 (begin
   (display "One track per Voice (may make too many voices with 
polyphony)")
   (display "Turn this off to get sop and alto combined in one track.")
   #{
 \midi {
   \context {
 \Staff
 \remove "Staff_performer"
   }
   \context {
 \Voice
 \consists "Staff_performer"
   }
 }
   #}))
  }
}




The # vs $ issue is explained here: 
https://extending-lilypond.gitlab.io/en/extending/lily-and-scheme.html#hash-vs-dollar

HTH
Jean



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


Re: Conditional code in the midi block

2024-05-20 Thread Timothy Lanfear

On 19/05/2024 20:27, Carolyn Beeton wrote:

I would like to include some Staff and Voice context settings in the \midi 
block only if a flag is set to ##t and I have not been able to figure out how 
to do this.  When I try to wrap the \context blocks in a code block with #{…#} 
I get this error:
trackPerVoiceMWE.ly:31:16: error: syntax error, unexpected '{', expecting 
SCM_IDENTIFIER or SCM_TOKEN or STRING or SYMBOL
   \context {
Is there any way to conditionally change the Staff_performer based on a flag 
setting?


I think this does what you want.

\version "2.24.0"

\include "english.ly" TrackPerVoice = ##t nostaffmidi = 
#(define-scheme-function () () (if TrackPerVoice #{ \context { \Staff 
\remove "Staff_performer" } #})) voicemidi = #(define-scheme-function () 
() (if TrackPerVoice #{ \context { \Voice \consists "Staff_performer" } 
#})) global = { \key c \major \time 4/4 } \score { \new ChoirStaff << 
\new Staff << \new Voice = "soprano" << \global \relative c' { c'4 d e f 
<< g1 \\ { g4 f e2 } >> } >> \new Voice = "alto" << \global \voiceTwo 
\relative c' { c'4 b a g | f e d2 } >> >> >> \layout {} \midi { 
#(ly:message "TrackPerVoice is ~a\n" TrackPerVoice) #(when TrackPerVoice 
(ly:message "One track per Voice (may make too many voices with 
polyphony)") (ly:message "Turn this off to get sop and alto combined in 
one track.")) \nostaffmidi \voicemidi }


Although, I don't understand why the contents of the scheme functions 
cannot be placed directly into the midi block like this


\midi { #(if TrackPerVoice #{ \context { \Staff \remove 
"Staff_performer" } #}) #(if TrackPerVoice #{ \context { \Voice 
\consists "Staff_performer" } #}) }


--
Timothy Lanfear, Bristol, UK.


Re: One-page PDF cut off after a certain height?

2024-05-20 Thread Jean Abou Samra

> I run into a problem when I create a (very high) single-page PDF file from a
> Lilypond score. 'After a certain time', the rest of the page is rendered in
> white.
> 
> In my use case, I wanted to make a large system staff, and white-on-black
> music, because of readability-reasons. Specifically: Puttin this on a tablet,
> and using one page for continuous scrolling to make the music less 'jumpy'
> (even staff spacing, not constrained to page height).
> 
> Can anyone shed a light on what goes wrong here? I've attached my files for
> reference.


You have

          \filled-box #'(-1000 . 1000) #'(-1000 . 4000) #0

in your color.ily file. That's painting a big black box for the background, but
the box just happens not to be big enough. Try adding an extra zero to the
second -1000 value.

Also, are you sure you need the big color-staff-lines function? It goes through
hoops to allow coloring each staff line in its own color, but if you just
want all staff lines in white, you can just add an
\override Score.StaffSymbol.color
with the other overrides in the \color function.

And also, LilyPond has supported CSS-style colors natively for a long time,
so this whole function:

color =
#(define-music-function (parser location color) (string?)
   (define (hexa->decimal x)
 (let ((num (string->number x 16)))
   (if (= 0 num)
   num
   (exact->inexact
(/ 255 num)
   (let* ((str (string-take
(if (string-prefix? "#" color)
(string-drop color 1)
color)
6))
  (r (string-take str 2))
  (g (string-drop (string-drop-right str 2) 2))
  (b (string-take-right str 2))
  (translated-color
   (map hexa->decimal
(list r g b)))
  (lily-color (primitive-eval
   (cons rgb-color translated-color
 #{
   \override Score.BarNumber.color = #lily-color
   [...]
 #}))


can be simplified to just

color =
#(define-music-function (parser location lily-color) (string?)
 #{
   \override Score.BarNumber.color = #lily-color
   [...]
 #})


HTH
Jean



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


Re: Disable all padding and collision around markup

2024-05-19 Thread William Rehwinkel via LilyPond user discussion

This is perfect, thanks so much for your responses everybody.

-William

On 5/19/24 10:56, Kieren MacMillan wrote:

Hi Knute,


There are ways to "disable the padding" (a.k.a. have the spacing engine
ignore the TextScript). However, it might be just as easy — or maybe
even easier? — to simply tweak the X-offset and Y-offset rather than
using extra-offset:

The extra-offset happens late in the rendering process, so the other grobs 
can't adjust to its movement like they do with X- and Y-offset.


Exactly!  :)
— Kieren
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Looking for documentation for constants

2024-05-19 Thread Jean Abou Samra
> This is a very basic question.  I have see some examples that use
> constants like "$SELECTION" or ""$CURSOR'$ANCHOR". but despite doing all the
> obvious things (searching the documentation, etc.) I've not found any relevant
> information.
> 
> I would sincerely appreciate being pointed in the right direction.


This is a Frescobaldi thing, not a LilyPond thing. See Help > User guide >
Editing files > Snippets > Snippet editor in Frescobaldi.


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


Re: Disable all padding and collision around markup

2024-05-19 Thread Kieren MacMillan
Hi Knute,

>> There are ways to "disable the padding" (a.k.a. have the spacing engine 
>> ignore the TextScript). However, it might be just as easy — or maybe 
>> even easier? — to simply tweak the X-offset and Y-offset rather than 
>> using extra-offset:
> The extra-offset happens late in the rendering process, so the other grobs 
> can't adjust to its movement like they do with X- and Y-offset.

Exactly!  :)
— Kieren
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




Re: Disable all padding and collision around markup

2024-05-19 Thread Knute Snortum
On Sun, May 19, 2024 at 4:22 AM  wrote:

> Hi William,
>
> > In the following example, I use a section label and a TextScript on a
> > note. I offset the markup text so that it appears inside the staff, but
> > it still makes the section text higher up. I would like to know if it
> > is possible to disable this padding around the TextScript, so that the
> > section label appears directly over the staff without the extra space,
> > the same way as it does when there is no text script.
>
> There are ways to "disable the padding" (a.k.a. have the spacing engine
> ignore the TextScript). However, it might be just as easy — or maybe
> even easier? — to simply tweak the X-offset and Y-offset rather than
> using extra-offset:
>

The extra-offset happens late in the rendering process, so the other grobs
can't adjust to its movement like they do with X- and Y-offset.


--
Knute Snortum


Re: Variables, tags, filtering, conditions

2024-05-19 Thread Timothy Lanfear

On 19/05/2024 12:11, Giles Boardman wrote:

Hello Timothy,

Looks about perfect to me.

Thank you very much.

I can see how it's working and there are obviously a lot of other 
programming possibilities hinted at that I haven't found the 
documentation for. Where do I read about #( if (string=? and (set! ?




Extensions to LilyPond functionality are written in a programming 
language called Scheme (in particular the GNU Guile implementation of 
Scheme); some parts of LilyPond are written in Scheme. Jean Abou Samra 
has written a document on the topic of extending LilyPond 
https://extending-lilypond.gitlab.io/en/index.html.




--
Timothy Lanfear, Bristol, UK.


Re: Disable all padding and collision around markup

2024-05-19 Thread kieren

Hi William,

In the following example, I use a section label and a TextScript on a 
note. I offset the markup text so that it appears inside the staff, but 
it still makes the section text higher up. I would like to know if it 
is possible to disable this padding around the TextScript, so that the 
section label appears directly over the staff without the extra space, 
the same way as it does when there is no text script.


There are ways to "disable the padding" (a.k.a. have the spacing engine 
ignore the TextScript). However, it might be just as easy — or maybe 
even easier? — to simply tweak the X-offset and Y-offset rather than 
using extra-offset:


%%%  SNIPPET BEGINS
% --
\version "2.25.7"

\score {
  \relative c' {
\once \override NoteHead.extra-spacing-width = #'( -6 . 0 )
\once \override TextScript.extra-offset = #'(-6 . -3)
\once \override TextScript.outside-staff-priority = ##f
\sectionLabel "Section label (extra-offset)"
\clef alto c2^\markup\whiteout\bold "Text"
  }
}

\score {
  \relative c' {
\once \override NoteHead.extra-spacing-width = #'( -6 . 0 )
\once \override TextScript.X-offset = -6
\once \override TextScript.Y-offset = -0.375
\once \override TextScript.outside-staff-priority = ##f
\sectionLabel "Section label (X-offset + Y-offset)"
\clef alto c2^\markup\whiteout\bold "Text"
  }
}
%%%  SNIPPET ENDS

Hope this helps!
Kieren.



Re: Variables, tags, filtering, conditions

2024-05-19 Thread Giles Boardman
Hello Timothy,

Looks about perfect to me.

Thank you very much.

I can see how it's working and there are obviously a lot of other programming 
possibilities hinted at that I haven't found the documentation for. Where do I 
read about #( if (string=? and (set! ?

Thanks

Giles


From: Timothy Lanfear 
Sent: 19 May 2024 12:03
To: Giles Boardman ; lilypond-user@gnu.org 

Subject: Re: Variables, tags, filtering, conditions

On 19/05/2024 11:36, Giles Boardman wrote:
Hello,

I am an occasional Bb clarinetist and very bad at transposing on the fly.
I would like to create alternative versions of a score based on the value of a 
parameter.



How about this as a solution?


\version "2.24.0"

instrument = "clarinet"
tpose = c
#(if (string=? instrument "clarinet")
  (set! tpose #{ bes, #}))

\transpose c \tpose {
 \key c\major
 c'8 d' e' f' g' a' b' c''
}


--
Timothy Lanfear, Bristol, UK.


Re: Variables, tags, filtering, conditions

2024-05-19 Thread Timothy Lanfear

On 19/05/2024 11:36, Giles Boardman wrote:

Hello,

I am an occasional Bb clarinetist and very bad at transposing on the fly.
I would like to create alternative versions of a score based on the 
value of a parameter.




How about this as a solution?


\version "2.24.0"

instrument = "clarinet"
tpose = c
#(if (string=? instrument "clarinet")
  (set! tpose #{ bes, #}))

\transpose c \tpose {
 \key c\major
 c'8 d' e' f' g' a' b' c''
}

--
Timothy Lanfear, Bristol, UK.


Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra



> Le 19 mai 2024 à 02:53, Walt North  a écrit :
> 
> David, thanks, this did indeed accomplish my goal - so I'm happy.

Well, \bookpart will work *if* you are happy with having a page break between 
the two scores.





Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra



> Le 19 mai 2024 à 01:56, David Wright  a écrit :
> 
> Perhaps
> 
> https://lists.gnu.org/archive/html/lilypond-user/2024-04/msg00247.html


Indeed, but there was a more technical one, with Lukas I think.





Re: vertical spacing per score

2024-05-18 Thread Walt North
David, thanks, this did indeed accomplish my goal - so I'm happy.  It 
sounds like my original approach was the right idea but apparently this 
is a known issue.


On 5/18/2024 4:56 PM, David Wright wrote:

On Sun 19 May 2024 at 01:24:44 (+0200), Jean Abou Samra wrote:

Hi.  I have a case where I want to have different vertical spacing between two
different scores.  I can get system-system spacing to change for both scores
using a \paper variable. But if I'm understanding the documentation correctly
I should be able to use the same variable in a distinct layout block in each
of the two scores.  If tried several different coding lines based on things
I've found on google but have not found the correct coding yet.

Sorry, this isn't supported, it's a known issue
(https://gitlab.com/lilypond/lilypond/-/issues/1885 ; there are
no comments there, but IIRC there was a more recent discussion).

Perhaps

https://lists.gnu.org/archive/html/lilypond-user/2024-04/msg00247.html

Cheers,
David.




Re: vertical spacing per score

2024-05-18 Thread David Wright
On Sun 19 May 2024 at 01:24:44 (+0200), Jean Abou Samra wrote:
> > Hi.  I have a case where I want to have different vertical spacing between 
> > two
> > different scores.  I can get system-system spacing to change for both scores
> > using a \paper variable. But if I'm understanding the documentation 
> > correctly
> > I should be able to use the same variable in a distinct layout block in each
> > of the two scores.  If tried several different coding lines based on things
> > I've found on google but have not found the correct coding yet.
> 
> Sorry, this isn't supported, it's a known issue
> (https://gitlab.com/lilypond/lilypond/-/issues/1885 ; there are
> no comments there, but IIRC there was a more recent discussion).

Perhaps

https://lists.gnu.org/archive/html/lilypond-user/2024-04/msg00247.html

Cheers,
David.



Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra
> Hi.  I have a case where I want to have different vertical spacing between two
> different scores.  I can get system-system spacing to change for both scores
> using a \paper variable. But if I'm understanding the documentation correctly
> I should be able to use the same variable in a distinct layout block in each
> of the two scores.  If tried several different coding lines based on things
> I've found on google but have not found the correct coding yet.

Sorry, this isn't supported, it's a known issue
(https://gitlab.com/lilypond/lilypond/-/issues/1885 ; there are
no comments there, but IIRC there was a more recent discussion).





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


Re: Cry for help - lost plot ....

2024-05-18 Thread Kieren MacMillan
Hi Giles,

> Just like that? Just like that! Wow!

Eventually, one gets tired of how often Lilypond wows you…
Nice to see you’re not there yet.  ;)

— K
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




Re: Cry for help - lost plot ....

2024-05-18 Thread Giles Boardman
Just like that? Just like that! Wow!

From: Kieren MacMillan 
Sent: 18 May 2024 18:45
To: Giles Boardman 
Cc: Aaron Hill ; Lilypond-User Mailing List 

Subject: Re: Cry for help - lost plot 

Hi Giles,

> though being able to put multiple columns side by side without them thinking 
> they were continuous music would be even more awesome, and very elegant imho

Like this?

%%%  SNIPPET BEGINS
\version "2.24.3"

\layout {
  \context {
\Score
\override RehearsalMark.padding = #3
  }
}

\markup {
  \fill-line {
\score { { \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 
e''8 d''4 d''8 } }
\score { { \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 
d''8 e''8 f''8 g''8 } }
\score { { \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 
e''8 d''4 f''8 } }
  }
}
%%%  SNIPPET ENDS

Cheers,
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.



Re: Cry for help - lost plot ....

2024-05-18 Thread Giles Boardman
Thanks David - that's good advice and exactly how I got here. As I said, 
somewhere along the line I lost the plot. I think you have put your finger on 
what I have failed to grasp by telling me that only the first \mark statement 
is being processed and that everything else is "spurious".


From: David Wright 
Sent: 18 May 2024 18:24
To: Giles Boardman 
Cc: Aaron Hill ; lilypond-user@gnu.org 

Subject: Re: Cry for help - lost plot 

On Sat 18 May 2024 at 16:46:43 (+), Giles Boardman wrote:
> Thanks for getting back to me Aaron and throwing me a rope 
>
> I understand the two models you describe. I thought I was going for the 
> second i.e. a single sequential part, but I want to put each section on a 
> different line - this will help me enormously with proof-reading.
>
> What I see in the preview without the score block is just what I want, for 
> this part of my process - is there no (simple) way to embed it in a score 
> block to get it into a pdf and also into a midi file? Would each line need to 
> be its own score with the midi file produced in its own separate block?
>
> I think my fundamental problem is I don't understand why this, below, isn't 
> an example of the sequential model (isn't it "one music") - can you tell me 
> what Lilypond is objecting to?
>
> \version "2.24.3"
>
> \score {
>
>
> \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 d''8
> \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
> g''8
> \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 f''8
>
> \layout { }
> \midi { }
>

> }
Learning Manual §4.1.2 addresses exactly that problem. I would read it
through, then start with /their/ scores and work to produce what you
want in terms of one-liners.

In the example above, the one music consists of \mark "ON079-1a-_01",
and everything else is spurious.

Cheers,
David.


Re: Cry for help - lost plot ....

2024-05-18 Thread Kieren MacMillan
Hi Giles,

> though being able to put multiple columns side by side without them thinking 
> they were continuous music would be even more awesome, and very elegant imho

Like this?

%%%  SNIPPET BEGINS
\version "2.24.3"

\layout {
  \context {
\Score
\override RehearsalMark.padding = #3
  }
}

\markup {
  \fill-line {
\score { { \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 
e''8 d''4 d''8 } }
\score { { \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 
d''8 e''8 f''8 g''8 } }
\score { { \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 
e''8 d''4 f''8 } }
  }
}
%%%  SNIPPET ENDS

Cheers,
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




Re: Cry for help - lost plot ....

2024-05-18 Thread Giles Boardman
Thanks Kieren - I take it a couple of dozen expressions is good and one is bad 

Both snippets are really helpful. Though I'm a bit concerned about the ton of 
other issues you mention, I'll happily take the one that works for now, though 
my fried brain is still struggling a bit. The other one with the justified 
lines anticipates where I'll get to next - I love the left justified single 
bars (though being able to put multiple columns side by side without them 
thinking they were continuous music would be even more awesome, and very 
elegant imho) but eventually one bar just won't be enough and I'll want 
multiple lines elegantly spaced, just like this.

And it's such fun too, apart from the hair tearing.

Thanks again

Giles

From: Kieren MacMillan 
Sent: 18 May 2024 18:21
To: Giles Boardman 
Cc: Aaron Hill ; Lilypond-User Mailing List 

Subject: Re: Cry for help - lost plot 

Hi Giles,

Are you looking for something like this?

%%%  SNIPPET BEGINS
\version "2.24.3"

\paper {
  score-system-spacing.padding = #6
}

\layout {
  indent = 0
  ragged-right = ##f
  \context {
\Score
\override RehearsalMark.padding = #3
  }
}

\score {
  { \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
d''8 }
}
\score {
  { \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
g''8 }
}
\score {
  { \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
f''8 }
}
%%%  SNIPPET ENDS

> I think my fundamental problem is I don't understand why this, below, isn't 
> an example of the sequential model (isn't it "one music")

This “works”:

%%%  SNIPPET BEGINS
\version "2.24.3"

\score {
  {
\mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
d''8
\mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
g''8
\mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
f''8
  }
  \layout { }
  \midi { }
}
%%%  SNIPPET ENDS
[Of course, this introduces a whole bunch of other issues… but it “works”!]

> - can you tell me what Lilypond is objecting to?

Your \score block contains about two dozen music expressions.  ;)
Wrapping that whole chunk in {} reduces it to a single music expression.

Hope that helps!
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.



Re: Cry for help - lost plot ....

2024-05-18 Thread David Wright
On Sat 18 May 2024 at 16:46:43 (+), Giles Boardman wrote:
> Thanks for getting back to me Aaron and throwing me a rope 
> 
> I understand the two models you describe. I thought I was going for the 
> second i.e. a single sequential part, but I want to put each section on a 
> different line - this will help me enormously with proof-reading.
> 
> What I see in the preview without the score block is just what I want, for 
> this part of my process - is there no (simple) way to embed it in a score 
> block to get it into a pdf and also into a midi file? Would each line need to 
> be its own score with the midi file produced in its own separate block?
> 
> I think my fundamental problem is I don't understand why this, below, isn't 
> an example of the sequential model (isn't it "one music") - can you tell me 
> what Lilypond is objecting to?
> 
> \version "2.24.3"
> 
> \score {
> 
> 
> \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 d''8
> \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
> g''8
> \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 f''8
> 
> \layout { }
> \midi { }
> 
> }

Learning Manual §4.1.2 addresses exactly that problem. I would read it
through, then start with /their/ scores and work to produce what you
want in terms of one-liners.

In the example above, the one music consists of \mark "ON079-1a-_01",
and everything else is spurious.

Cheers,
David.



Re: Cry for help - lost plot ....

2024-05-18 Thread Kieren MacMillan
Hi Giles,

Are you looking for something like this?

%%%  SNIPPET BEGINS
\version "2.24.3"

\paper {
  score-system-spacing.padding = #6
}

\layout {
  indent = 0
  ragged-right = ##f
  \context {
\Score
\override RehearsalMark.padding = #3
  }
}

\score {
  { \mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
d''8 }
}
\score {
  { \mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
g''8 }
}
\score {
  { \mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
f''8 }
}
%%%  SNIPPET ENDS

> I think my fundamental problem is I don't understand why this, below, isn't 
> an example of the sequential model (isn't it "one music")

This “works”:

%%%  SNIPPET BEGINS
\version "2.24.3"

\score {
  {
\mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
d''8 
\mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 
g''8 
\mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 
f''8 
  }
  \layout { }
  \midi { }
}
%%%  SNIPPET ENDS
[Of course, this introduces a whole bunch of other issues… but it “works”!]

> - can you tell me what Lilypond is objecting to? 

Your \score block contains about two dozen music expressions.  ;)
Wrapping that whole chunk in {} reduces it to a single music expression.

Hope that helps!
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




Re: Cry for help - lost plot ....

2024-05-18 Thread Giles Boardman
Thanks for getting back to me Aaron and throwing me a rope 

I understand the two models you describe. I thought I was going for the second 
i.e. a single sequential part, but I want to put each section on a different 
line - this will help me enormously with proof-reading.

What I see in the preview without the score block is just what I want, for this 
part of my process - is there no (simple) way to embed it in a score block to 
get it into a pdf and also into a midi file? Would each line need to be its own 
score with the midi file produced in its own separate block?

I think my fundamental problem is I don't understand why this, below, isn't an 
example of the sequential model (isn't it "one music") - can you tell me what 
Lilypond is objecting to?

\version "2.24.3"

\score {


\mark "ON079-1a-_01" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 d''8
\mark "ON079-1a-_02" \key c\major \time 9/8 a'8 a'8 a'8 d''4 d''8 e''8 f''8 g''8
\mark "ON079-1a-_03" \key c\major \time 9/8 a''8 b''8 a''8 g''4 e''8 d''4 f''8

\layout { }
\midi { }

}






From: Aaron Hill 
Sent: 18 May 2024 17:18
To: Giles Boardman 
Cc: lilypond-user@gnu.org 
Subject: Re: Cry for help - lost plot 

On 2024-05-18 8:49 am, Giles Boardman wrote:
> \score {
>
> … music …
>
>   \layout { }
>   \midi { }
> }
>
> Please, someone help me while I still have a little hair left to pull
> out on a later occasion :-}


\score basically expects just one "music".  You are providing many
"musics".  The question is how you want to handle it.

Normally, we have simultaneous music where the parts are meant to run in
parallel.  But you can also do sequential music.

So, this means your \score block should have one of these two patterns:


\score {
   <<
 ...simultaneous music...
   >>

   \layout { }
   \midi { }
}

\score {
   {
 ...sequential music...
   }

   \layout { }
   \midi { }
}



-- Aaron Hill


Re: Cry for help - lost plot ....

2024-05-18 Thread Paul Hodges
If you make your lines sequential music in one score (by adding {...} around 
them, as a score can contain only one music expression) they'll all run 
together continuously.  You can add \break to force new lines, but then they 
are stretched to the width of the page.  You can then add ragged-right = ##t, 
but you will still have an indent for the first (which can be set to zero); you 
will also have the time signature repeated at the end of each line - which I'm 
sure can be turned off, though I can't recall the details.


It seems you'd be better off putting a \score block round each line, if you 
want each line to remain independent.


Paul



 From:   Aaron Hill  
 To:   Giles Boardman  
 Cc:
 Sent:   18/05/2024 17:18 
 Subject:   Re: Cry for help - lost plot  

On 2024-05-18 8:49 am, Giles Boardman wrote: 
> \score { 
>  
> … music … 
>  
>   \layout { } 
>   \midi { } 
> } 
>  
> Please, someone help me while I still have a little hair left to pull  
> out on a later occasion :-} 
 
 
\score basically expects just one "music".  You are providing many  
"musics".  The question is how you want to handle it. 
 
Normally, we have simultaneous music where the parts are meant to run in  
parallel.  But you can also do sequential music. 
 
So, this means your \score block should have one of these two patterns: 
 
 
\score { 
   << 
     ...simultaneous music... 
   >> 
 
   \layout { } 
   \midi { } 
} 
 
\score { 
   { 
     ...sequential music... 
   } 
 
   \layout { } 
   \midi { } 
} 
 
 
 
-- Aaron Hill 
 


Re: Cry for help - lost plot ....

2024-05-18 Thread Aaron Hill

On 2024-05-18 8:49 am, Giles Boardman wrote:

\score {

… music …

  \layout { }
  \midi { }
}

Please, someone help me while I still have a little hair left to pull 
out on a later occasion :-}



\score basically expects just one "music".  You are providing many 
"musics".  The question is how you want to handle it.


Normally, we have simultaneous music where the parts are meant to run in 
parallel.  But you can also do sequential music.


So, this means your \score block should have one of these two patterns:


\score {
  <<
...simultaneous music...
  >>

  \layout { }
  \midi { }
}

\score {
  {
...sequential music...
  }

  \layout { }
  \midi { }
}



-- Aaron Hill



Re: Footnotes for the entire bar

2024-05-18 Thread YTG 1234

Did you try attaching it to a mark?


You definitely set me on the right track there. Marks are typically only 
drawn on the top-most staff, and I didn't want to interfere with other 
marks, so my (slightly overkill) solution was to create a new engraver 
for this purpose. In any case, I learned some things about Lilypond 
internals.


%%%

\version "2.25.12"

#(define-event-class 'footnote-mark-event 'mark-event)

%% Shamelessly copied from Text_mark_engraver at scm/scheme-engravers.scm.
%% We shouldn't have more than one footnote per timestep per staff, but
%% I'm keeping that code to be safe.
#(define (Footnote_mark_engraver context)
  (let ((evs '())
    (grobs '()))
   (make-engraver
    (listeners
     ((footnote-mark-event engraver event)
      (set! evs (cons event evs
    ((process-music engraver)
     (for-each
      (lambda (ev)
       (let ((grob (ly:engraver-make-grob engraver 'TextMark ev))
         (offset (ly:event-property ev 'f-offset)))
    ;; Empty text
    (ly:grob-set-property! grob 'text (make-null-markup))
    ;; Attaching the footnote manually
    (ly:grob-set-property! grob 'footnote-music
     (once
      (propertyTweak 'annotation-line #f
       (make-music
        'FootnoteEvent
        'X-offset (car offset)
        'Y-offset (cdr offset)
        'automatically-numbered (ly:event-property ev 'f-auto)
        'text (ly:event-property ev 'f-mark)
        'footnote-text (ly:event-property ev 'f-footnote)
    (set! grobs (cons grob grobs
      evs))
    ((stop-translation-timestep engraver)
     (let ((staves (ly:context-property context 'stavesFound)))
      (for-each
       (lambda (grob)
    (ly:grob-set-object!
     grob
     'side-support-elements
     (ly:grob-list->grob-array staves)))
       grobs))
     (set! evs '())
     (set! grobs '())

#(ly:register-translator
  Footnote_mark_engraver 'Footnote_mark_engraver
  '((grobs-created . (TextMark)) ; Technically I don't create Footnotes
    (events-accepted . (footnote-mark-event))
    (properties-read . ())
    (properties-written . ())
    (description . "Create footnotes attached to invisible text marks.")))

%% I don't think there is any inherent difference between attaching the
%% footnote in this function as opposed to the engraver, except guaranteeing
%% that *any* FootnoteMarkEvent will have a footnote, even if not created
%% using this function.
m-footnote =
#(define-music-function (mark endmark offset content)
  (scheme? boolean? number-pair? markup?)
  (_i "Attach a footnote with content @var{content} to a text mark.

@var{mark} and @var{offset} are like their corresponding arguments in the
@code{footnote} function. @var{content} corresponds to @var{footnote} and
@var{endmark} decides whether to set this to a text mark or a text end mark.

The recommended @var{offset} for regular marks is @code{(1 . 3)}, and 
for end marks @code{(-1 . 3)} or @code{(-2 . 3)}.


You should probably use @code{markFootnote} or @code{endMarkFootnote}
instead.")
  (make-music 'FootnoteMarkEvent
   'f-mark (or mark (make-null-markup))
   'f-offset offset
   'f-footnote content
   'f-auto (not mark)
   ;; Properties are carried over when using ly:engraver-make-grob.
   'horizontal-direction (if endmark LEFT RIGHT)))

markFootnote =
#(define-music-function (mark offset content)
  ((markup?) number-pair? markup?)
  (_i "Attach a footnote to a text mark.")
  (m-footnote mark #f offset content))

endMarkFootnote =
#(define-music-function (mark offset content)
  ((markup?) number-pair? markup?)
  (_i "Attach a footnote to a text end mark.")
  (m-footnote mark #t offset content))

ossiaScore =
#(define-scheme-function (magnification music)
  (rational? ly:music?)
  #{
    \score {
  \new Staff \with {
    \magnifyStaff #magnification
    \omit TimeSignature % You can bring it back using \revert
  } { #music }
  \layout {
    ragged-bottom = ##t
    ragged-right = ##t
    ragged-last = ##t
    ragged-last-bottom = ##t
    indent = 0
  }
    }
  #})

ossia =
#(define-music-function (endmark offset magnification music)
  (boolean? number-pair? rational? ly:music?)
  (_i "Create a footnote with an ossia @var{music}.")
  (m-footnote #f endmark offset
   (markup
    #:italic "Ossia:"
    #:score (ossiaScore magnification music

markOssia =
#(define-music-function (offset magnification music)
  ((number-pair? '(1 . 3)) (rational? 2/3) ly:music?)
  (_i "Create a footnote with an ossia @var{music} attached to a text 
mark.")

  (ossia #f offset magnification music))

endMarkOssia =
#(define-music-function (offset magnification music)
  ((number-pair? '(-1 . 3)) (rational? 2/3) ly:music?)
  (_i "Create a footnote with an ossia @var{music} attached to an end 
mark.")

  (ossia #t offset magnification music))

%% Thank you 



Re: Problems hiding clef using \omit

2024-05-17 Thread Dirck Nagy
Thank you, Kieren and Aaron!

\omit Staff.ClefModifier  was what i needed.

And the Visual index you sent is VERY useful!  I wish i had known of this 
earlier; would have saved me a lot of time

peace!

dirck



From: Aaron Hill 
Sent: Friday, May 17, 2024 12:26 PM
To: kie...@kierenmacmillan.info 
Cc: Dirck Nagy ; lilypond-user@gnu.org 
; dirckn...@hotmail.com 
Subject: Re: Problems hiding clef using \omit


Caution: *External Email: Use caution responding, opening attachments, or 
clicking on links.*


On 2024-05-17 10:15 am, kie...@kierenmacmillan.info wrote:
> Hi Dirck,
>
>> I don't know what the term is for this "8", so i was not successful
>> searching the manuals and snippets.
>
> ClefModifier
> <https://lilypond.org/doc/v2.25/Documentation/internals/clefmodifier>


Also if you need help with identifying grobs, the visual index [1]
should be your first place to check.

[1]:
https://lilypond.org/doc/v2.25/Documentation/ly-examples/visualindex.pdf


-- Aaron Hill


Re: Problems hiding clef using \omit

2024-05-17 Thread Aaron Hill

On 2024-05-17 10:15 am, kie...@kierenmacmillan.info wrote:

Hi Dirck,

I don't know what the term is for this "8", so i was not successful 
searching the manuals and snippets.


ClefModifier




Also if you need help with identifying grobs, the visual index [1] 
should be your first place to check.


[1]: 
https://lilypond.org/doc/v2.25/Documentation/ly-examples/visualindex.pdf



-- Aaron Hill



Re: Problems hiding clef using \omit

2024-05-17 Thread kieren

Hi Dirck,

I don't know what the term is for this "8", so i was not successful 
searching the manuals and snippets.


ClefModifier


Hope that helps!
Kieren.

Re: Scoop (jazz notation)

2024-05-17 Thread Wols Lists

On 15/05/2024 18:54, Flaming Hakama by Elaine wrote:
On the other hand, you could argue that many examples of scoop are not 
intended to convey specific shapes,
so a one-size-fits-all glyph is sufficient, and it is not intended to 
solve the problem of expressive glissando.


Which, is also a reasonable argument.  There is no reason both cannot exist.


Responding to this, it seems to me that scoops, bends, glissandos etc 
are all the same family of 
articulations/embellishments/call-it-what-you-will. So I'd like to see 
some kind of generic all-encompassing solution.


Han-Wen wrote bends for me, so I was surprised to discover that scoops 
(the same thing in a different place) seem not to have been done at the 
same time / the same way.


My feeling would be can we implement something along similar lines to 
format-box-barnumber and friends.


So we have

\slideBeforeCurve et al, it's called a slide, it's Before or After, it 
can be a Curve, Straight, Jagged, it can be Fall, Rise, Anchored. I'm 
sure other people will be able to think of other things. And then we can 
special-case with shortcuts called \glissando, \bend, and so on.


But as with \format..., back in the 2.2, 2.4 days I kept tripping over 
the fact that the particular mix I wanted hadn't been implemented, and 
then somebody kindly just implemented all possible combinations for me 
(and everybody else). So now whatever you wanted is "just there". (I did 
try to do it myself, I just couldn't grok scheme :-(


If we look at it as "variations on a theme", we can have a simple, 
single implementation that can be tweaked to suit.


Cheers,
Wol



Re: \omit TupletBracket

2024-05-16 Thread Aaron Hill

On 2024-05-16 7:54 pm, carsonm...@ca.rr.com wrote:

Aaron,

Thank you for the instruction yet how does it apply to my notation?



It is simply a fairly common mistake we see post on the mailing list.

For instance, new users are often tempted to put the square brackets 
*around* the notes:


  [c16 r 8]

This does not associate the beaming start with the c16.  Since [ is a 
post-event, it must look like this:


  c16[ r 8]


-- Aaron Hill



RE: \omit TupletBracket

2024-05-16 Thread carsonmark
Aaron,

Thank you for the instruction yet how does it apply to my notation?

Mark

-Original Message-
From: Aaron Hill  
Sent: Thursday, May 16, 2024 6:28 PM
To: carsonm...@ca.rr.com
Cc: 'Dimitri Sykias' ; 'Lilypond-User Mailing List'

Subject: Re: \omit TupletBracket

On 2024-05-16 5:57 pm, carsonm...@ca.rr.com wrote:
>   c16 [r c8]

It is important to understand that the syntax for beaming, like slurs,
requires the symbols to be post-fixed.

As such it is best to keep the symbols snug to the event they apply:

   c16[ r c8]

To a seasoned LilyPonder, this clearly indicates beaming beginning with the
16th note and ending with the 8th.


-- Aaron Hill




Re: \omit TupletBracket

2024-05-16 Thread Aaron Hill

On 2024-05-16 5:57 pm, carsonm...@ca.rr.com wrote:

  c16 [r c8]


It is important to understand that the syntax for beaming, like slurs, 
requires the symbols to be post-fixed.


As such it is best to keep the symbols snug to the event they apply:

  c16[ r c8]

To a seasoned LilyPonder, this clearly indicates beaming beginning with 
the 16th note and ending with the 8th.



-- Aaron Hill



RE: \omit TupletBracket

2024-05-16 Thread carsonmark
Dimitri,

First three should be
  c16 [r c8]

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
 On Behalf Of Dimitri Sykias
Sent: Thursday, May 16, 2024 4:07 PM
To: Lilypond-User Mailing List 
Subject: \omit TupletBracket

Although the output is fine when I use "\omit TupletBracket” I get a Warning of 
Unattached Beam Event.

\new RhythmicStaff \with { \consists Clef_engraver } { \time 3/4
  \omit Score.BarLine
  \clef percussion
  [c16 r c8] \tuplet 3/2 {c4 c c~} | \tuplet 3/2 {c8 c c~} c16 c c c r4 | c8 c4 
c8~ c16 c8 c16 | c2~c8  \omit TupletBracket \tuplet 3/2 {c16 c c} |\tuplet 5/4 
{c8 c c c c} r8 c | }

Thanks!




Re: manual repeat mark syntax question

2024-05-16 Thread Paul Scott

Thank you!

Paul


On 5/16/24 11:42, Jean Abou Samra wrote:

    \set Score.repeatCommands = #'((volta ,voltaOpt))

  ^^^

This should be ` not ' .






Re: manual repeat mark syntax question

2024-05-16 Thread Jean Abou Samra

>    \set Score.repeatCommands = #'((volta ,voltaOpt))
 ^^^

This should be ` not ' .




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


Re: Custom colors in fret diagrams

2024-05-16 Thread Nikita Borisenko
Hi there,

Would it be accurate to assume that custom hex/rgb colors in fret diagrams
are not supported as of now?

Sincerely,
Nikita

On Thu, May 16, 2024 at 2:29 AM Nikita Borisenko  wrote:

> Hi Jean,
>
> Thanks for the quick response.
>
> Putting quotes around it doesn't really help. The expression gets ignored
> and the dot comes with the default black color in this case.
>
> Sincerely,
> Nikita
>
> On Thu, May 16, 2024 at 2:18 AM Jean Abou Samra 
> wrote:
>
>> > Quick question on coloring dots in fret-diagrams. There is an option to
>> use
>> > predefined colors from normal, CSS or X11 palettes which works
>> perfectly well
>> > in the fret-diagram-verbose with the snippet below:
>> >
>> > >  (place-fret 3 6 3 dodgerblue2)
>> >
>> > For some reason I cannot get it working with custom RGB or Hex colors
>> like
>> > this:
>> >
>> > > (place-fret 3 6 3 #FF)
>>
>>
>> You should put quotes around it:
>>
>> (place-fret 3 6 3 "#FF")
>>
>> HTH
>> Jean
>>
>>
>>


Re: \once squashedPosition = 100 ('O_o!)

2024-05-16 Thread Pierre-Luc Gauthier
What‽ How in the world could I have not found this for myself… So much shame.

Thank you Timothy :-)

Le jeu. 16 mai 2024, à 10 h 16, Timothy Lanfear  a écrit :
>
> On 16/05/2024 14:56, Pierre-Luc Gauthier wrote:
>
> Hello there,
>
> Is it possible to \override the squashedPosition e.g. \once ?
>
> Yes, \once \set squashedPosition = #4
>
> --
> Timothy Lanfear, Bristol, UK.



-- 
Pierre-Luc Gauthier



Re: \once squashedPosition = 100 ('O_o!)

2024-05-16 Thread Timothy Lanfear

On 16/05/2024 14:56, Pierre-Luc Gauthier wrote:

Hello there,

Is it possible to \override the squashedPosition e.g. \once ?


Yes, \once \set squashedPosition = #4

--
Timothy Lanfear, Bristol, UK.


Re: Footnotes for the entire bar

2024-05-16 Thread Kieren MacMillan
Hi there,

> I want to create footnotes which attach to a specified bar or just a 
> particular time

Did you try attaching it to a mark? e.g.

%%%  SNIPPET BEGINS
\version "2.25.11"

\paper {
  tagline = ##f
}

fn_ossia =
#(define-music-function (os music) (pair? ly:music?)
  #{
  \once \override Score.Footnote.annotation-line = ##f
  \footnote \default #os \markup {
\italic "Ossia:"
\score {
  \new Staff \with {
%% Magnification, removing unnecessary elements, ...
  } { #music }
  \layout {
%% If any of those were set in a higher-level \layout
ragged-right = ##t
ragged-last = ##t
ragged-bottom = ##t
ragged-last-bottom = ##t
indent = 0
  }
}
  } Score.RehearsalMark
  #})

{
  \fn_ossia #'(1 . 3) { c'1 } \mark \markup \null
  c''1
  \fn_ossia #'(1 . 3) { d'1 } \mark \markup \null
  f'1
}
%%%  SNIPPET ENDS

Hope this helps!
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




Re: Custom colors in fret diagrams

2024-05-15 Thread Nikita Borisenko
Hi Jean,

Thanks for the quick response.

Putting quotes around it doesn't really help. The expression gets ignored
and the dot comes with the default black color in this case.

Sincerely,
Nikita

On Thu, May 16, 2024 at 2:18 AM Jean Abou Samra  wrote:

> > Quick question on coloring dots in fret-diagrams. There is an option to
> use
> > predefined colors from normal, CSS or X11 palettes which works perfectly
> well
> > in the fret-diagram-verbose with the snippet below:
> >
> > >  (place-fret 3 6 3 dodgerblue2)
> >
> > For some reason I cannot get it working with custom RGB or Hex colors
> like
> > this:
> >
> > > (place-fret 3 6 3 #FF)
>
>
> You should put quotes around it:
>
> (place-fret 3 6 3 "#FF")
>
> HTH
> Jean
>
>
>


Re: italic phrase in lyrics

2024-05-15 Thread Carolyn Beeton
I have these functions defined:

\version “2.24.0"

italic = {
  \override Lyrics.LyricText.font-shape = #'italic
}

bold = {
  \override Lyrics.LyricText.font-series = #'bold
}

normal = {
  \revert Lyrics.LyricText.font-series
  \revert Lyrics.LyricText.font-shape
}

and I use them like this:

VerseOne = \lyricmode
{
  \italic "O Lord, open thou our lips;" \normal "And our mouth shall show” 
\bold forth thy \normal praise.
}

Carolyn

> Date: Wed, 15 May 2024 17:05:54 -0400 (EDT)
> From: David Olson 
> To: lilypond-user 
> Subject: italic phrase in lyrics
> Message-ID:
> <1642762455.2851938.1715807154285.javamail.zim...@dslextreme.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Suppose the lyrics contain two contradictory propositions: 
> 
> Ma -- the -- ma -- tics is in -- vent -- ed. 
> Ma -- the -- ma -- tics is dis -- cov -- ered. 
> 
> Is this the only way to put the second proposition in italics? 
> 
> \markup { \italic Ma } -- 
> \markup { \italic the } -- 
> \markup { \italic ma } -- 
> \markup { \italic tics } 
> \markup { \italic is } 
> \markup { \italic dis } -- 
> \markup { \italic cov } -- 
> \markup { \italic ered. } 




Re: Custom colors in fret diagrams

2024-05-15 Thread Jean Abou Samra
> Quick question on coloring dots in fret-diagrams. There is an option to use
> predefined colors from normal, CSS or X11 palettes which works perfectly well
> in the fret-diagram-verbose with the snippet below:
> 
> >  (place-fret 3 6 3 dodgerblue2)
> 
> For some reason I cannot get it working with custom RGB or Hex colors like
> this:
> 
> > (place-fret 3 6 3 #FF)


You should put quotes around it:

(place-fret 3 6 3 "#FF")

HTH
Jean




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


Re: italic phrase in lyrics

2024-05-15 Thread Jean Abou Samra
Le mercredi 15 mai 2024 à 17:05 -0400, David Olson a écrit :
> Suppose the lyrics contain two contradictory propositions:
> 
>    Ma -- the -- ma -- tics is in -- vent -- ed.
>   Ma -- the -- ma -- tics is dis -- cov -- ered.
> 
> Is this the only way to put the second proposition in italics? 
> 
> \markup { \italic Ma } --  
> \markup { \italic the }  -- 
> \markup { \italic ma } --  
> \markup { \italic tics } 
> \markup { \italic is }  
> \markup { \italic dis }  -- 
> \markup { \italic cov }  -- 
> \markup { \italic  ered. }


You could do it like this:

\version "2.24.2"

\lyrics {
  \override LyricText.font-shape = #'italic
  Ma -- the -- ma -- tics is dis -- cov -- ered.
}


or even like this:


\version "2.24.2"

\lyrics {
  \markupMap text \markup \italic \etc {
Ma -- the -- ma -- tics is dis -- cov -- ered.
  }
}


HTH
Jean



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


Re: Scoop (jazz notation)

2024-05-15 Thread Flaming Hakama by Elaine
>
> -- Forwarded message --
> From: Tim Giles 
> To: lilypond-user@gnu.org
> Date: Tue, 14 May 2024 22:34:00 +0200
> Subject: Re: Scoop (jazz notation)
> Thanks for the link, Werner.  I have added a comment regarding the jazz
> application.  Cheers, -Tim
>
> > On 14 May 2024, at 19:21, Werner LEMBERG  wrote:
> >
> >
> >> I agree with Tim.  It's one of those frequently used jazz-isms that
> >> lilypond doesn't handle very elegantly.  What's the procedure for
> >> submitting a feature request like this?
> >
> > You might expand
> >
> >  https://gitlab.com/lilypond/lilypond/-/issues/529
> >
> > with comments – and images of professionally typeset scores! –
> > regarding its usage in jazz music.
> >
> >
> >Werner
>
>

Also, it would be good to discuss the feature here to see what people think
about it.

What kind of variety does it need to accommodate?
What is the best way to conceptualize it, and how does it fit into the
lilypond language?
What are your suggestions for syntax, how you want to use it in code?


>From my perspective, to start with, I would disagree that a scoop is an
articulation.

Conceptually, I can see how it is similar to an articulation, but I think
there are bigger differences.

Mainly, the space it takes on the page is prior to the note, like a
glissando, not above the note, like an articulation.  So it has horizontal
implications that articulations do not.

The scoop also describes how to approach the note, rather than what the
note sounds like when you get to it.

There is potentially a lot more information in a scoop,
including the vertical pitch component, the horizontal duration,
and to some extent the shape (linear vs convex vs concave),
as well as all the engraving details about the thickness of the line.



On the other hand, you could argue that many examples of scoop are not
intended to convey specific shapes,
so a one-size-fits-all glyph is sufficient, and it is not intended to solve
the problem of expressive glissando.

Which, is also a reasonable argument.  There is no reason both cannot exist.

However, from my perspective, I would want to be able to modify the scoop
curve, so a solution that does not address spatial configuration would be
disappointing.  So, I am going to speak to that.


My suggestion for syntax, since the scoop comes before the note, would be
more along the lines of prefix

\scoop c4

rather than postfix like an articulation

c4-@


In terms of balancing ease of use with flexibility, there could be a more
general function where you could specify the origin of the scoop

One idea is to use a number pair to describe the X and Y extent of the
scoop in units of staff spaces
so the above examples might be

\scoopFrom ( 1 . 1 ) c4  % default scoop
\scoopFrom ( 4 . 1 ) c4  % long scoop
\scoopFrom ( 1 . 4.5 ) c4  % octave tall scoop
\scoopFrom ( 1 . -1 ) c4  % scoop from above?

If we had this, then \scoop could be a shorthand for \scoopFrom ( 1 . 1 )


A similar but possibly more "musical" approach would be to have the
\scoopFrom function take
instead of a number pair, another note, that would suggest the location
from which the scoop starts

\scoopFrom a4 c4  % default scoop
\scoopFrom a1 c4  % long scoop
\scoopFrom c,4 c4  % octave tall scoop
\scoopFrom e4 c4  % scoop from above



Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Re: Scoop (jazz notation)

2024-05-14 Thread Tim's Bitstream
As a short term solution you could save that script in a separate file,  name 
the function \scoop and use it via an \include statement.

> On May 14, 2024, at 3:35 PM, Tim Giles  wrote:
> 
> Thanks for the link, Werner.  I have added a comment regarding the jazz 
> application.  Cheers, -Tim
> 
>>> On 14 May 2024, at 19:21, Werner LEMBERG  wrote:
>>> 
>>> 
>>> I agree with Tim.  It's one of those frequently used jazz-isms that
>>> lilypond doesn't handle very elegantly.  What's the procedure for
>>> submitting a feature request like this?
>> 
>> You might expand
>> 
>> https://gitlab.com/lilypond/lilypond/-/issues/529
>> 
>> with comments – and images of professionally typeset scores! –
>> regarding its usage in jazz music.
>> 
>> 
>>   Werner
> 
> 
> 




  1   2   3   4   5   6   7   8   9   10   >