Re: Can't figure out breaks in ensemble scores

2021-10-02 Thread Xavier Scheuer
On Sat, 2 Oct 2021 at 06:53, Carlos Martinez 
wrote:
>
> Thank you! That work! Although I am still having one part that need to
figure out one space…. But the score looks great now! Thanks!

Hello,

You can also use an extra voice for breaks, as documented in NR 4.3.1 Line
breaking
http://lilypond.org/doc/v2.23/Documentation/notation/line-breaking.html

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: How to get warnings for unused parts of a file?

2021-10-02 Thread Omid Mo'menzadeh
I didn't know about $ at all! Where in the documentation can I find more
about it? It was hard to search for!

I tried it, but it doesn't seem to find my variable "vocal" defined in the
same .ily file. I tried using #(top-repl) and $(top-repl) too, in the #
version it knows what \vocal is, but in the $ version it doesn't.

In any case, I'm fine with defining that "main" variable, but I'm curious
about what's going on here.

On Fri, Oct 1, 2021 at 4:41 PM Jean Abou Samra  wrote:

> Le 01/10/2021 à 15:05, David Kastrup a écrit :
> > Right.  Sorry.
>
>
> No need to be sorry. Just happens.
>
> It's not like there is no potential for confusion,
> cf. commits 662c549602 and e12ee4107c0…
>
> Jean
>


Re: How to get warnings for unused parts of a file?

2021-10-02 Thread David Kastrup
"Omid Mo'menzadeh"  writes:

> I didn't know about $ at all! Where in the documentation can I find more
> about it? It was hard to search for!
>
> I tried it, but it doesn't seem to find my variable "vocal" defined in the
> same .ily file. I tried using #(top-repl) and $(top-repl) too, in the #
> version it knows what \vocal is, but in the $ version it doesn't.

How about a minimal example exhibiting the problem?

-- 
David Kastrup



Re: How to get warnings for unused parts of a file?

2021-10-02 Thread Omid Mo'menzadeh
Of course!I just attached two files that demonstrate the difference.

On Sat, Oct 2, 2021 at 3:30 PM David Kastrup  wrote:

> "Omid Mo'menzadeh"  writes:
>
> > I didn't know about $ at all! Where in the documentation can I find more
> > about it? It was hard to search for!
> >
> > I tried it, but it doesn't seem to find my variable "vocal" defined in
> the
> > same .ily file. I tried using #(top-repl) and $(top-repl) too, in the #
> > version it knows what \vocal is, but in the $ version it doesn't.
>
> How about a minimal example exhibiting the problem?
>
> --
> David Kastrup
>
\version "2.22.1"

vocal = \relative c'' {
  a4 b c d |
}

main = #(if (not (defined? 'is-loaded-file)) #{ \score { \vocal } #})

\main
\version "2.22.1"

vocal = \relative c'' {
  a4 b c d |
}

$(if (not (defined? 'is-loaded-file)) #{ \score { \vocal } #})


Re: How to get warnings for unused parts of a file?

2021-10-02 Thread David Kastrup
"Omid Mo'menzadeh"  writes:

> Of course!I just attached two files that demonstrate the difference.
>
> On Sat, Oct 2, 2021 at 3:30 PM David Kastrup  wrote:
>
>> "Omid Mo'menzadeh"  writes:
>>
>> > I didn't know about $ at all! Where in the documentation can I find more
>> > about it? It was hard to search for!
>> >
>> > I tried it, but it doesn't seem to find my variable "vocal" defined in
>> the
>> > same .ily file. I tried using #(top-repl) and $(top-repl) too, in the #
>> > version it knows what \vocal is, but in the $ version it doesn't.
>>
>> How about a minimal example exhibiting the problem?
>>
>> --
>> David Kastrup
>>
>
> \version "2.22.1"
>
> vocal = \relative c'' {
>   a4 b c d |
> }
>
> $(if (not (defined? 'is-loaded-file)) #{ \score { \vocal } #})

Well, that one's a timing problem.  You couldn't write

vocal = \relative c'' {
  a4 b c d |
}

\vocal

either.  The reason is that the assignment is not complete before
LilyPond has a chance to check whether something like \addlyrics { Ah }
follows, and so when it looks at the next thing that comes up to make
that decision, \vocal is not yet defined.  So there really needs to be
anything after that assignment that does not immediately reference
\vocal .

With #, LilyPond does not allow different syntactic functionality, so
when it sees # it does not bother evaluating it until after it has
completed the assignment, being sure that it won't have to add something
like \addlyrics ... to the expression to be assigned.

This is one case where minimal examples tend to fail more often than
actual use of assigned variables in practice, because usually when you
employ variables seriously, you don't reference them immediately right
afterwards.

-- 
David Kastrup



Re: Transform notes in a variable?

2021-10-02 Thread Craig Comstock
Jean and others on this list, thank you so much for your help. It was so 
supportive! I was really surprised and pleased with how supportive this 
community was.

It was certainly challenging to learn so much so quickly but I have 
accomplished a score for general use, and also a specific viola part using the 
transformPitches Jean provided.

Performance tonight in Kansas City, MO, USA :) 

https://www.eventbrite.com/e/new-music-composition-concert-feat-ensemble-mother-russia-industries-tickets-169892660521

Source files, pdfs and a few rehearsal snippets are here:

http://unreasonablefarm.org/resonance/ 

I didn’t quite achieve ultimate re-use of materials between the standard score 
and the viola score but it’s close. One more little refactor would get me there 
but I didn’t have time just yet.

Cheers,
Craig

> On Aug 2, 2021, at 6:51 AM, Craig Comstock  wrote:
> 
> 
>> mappingOne = {   }
>> mappingTwo = {   }
>> 
>> music = { c' d' e' }
>> 
>> \transformPitches \mappingOne \music
>> \transformPitches \mappingTwo \music
> 
> This is exactly what I needed.
> Once again I am impressed by the generosity of your time.
> 
>> Since you seem interested by the Scheme level,
> 
> Yes, and your seeming ease of generating the right code is making me doubt my 
> not learning lisp/scheme more deeply. Will have to consider that for another 
> time as I must write this music immediately. ;) (performance October 2nd, 
> rehearsals start August 17th.)
> 
> Much thanks,
> Craig
> 
> 



Re: Can't figure out breaks in ensemble scores

2021-10-02 Thread Carlos R Martinez
Thank you. That’s a first for me. And of course is one of the things I love 
from Likypond. It is versatile and I don’t think ever going to stop learning 
new things there. Lol. Thank you!!

Carlos R Martinez 
279.850.5650
essentialmusic.org



> On Oct 2, 2021, at 03:19, Xavier Scheuer  wrote:
> 
> 
> On Sat, 2 Oct 2021 at 06:53, Carlos Martinez  
> wrote:
> >
> > Thank you! That work! Although I am still having one part that need to 
> > figure out one space…. But the score looks great now! Thanks!
> 
> Hello,
> 
> You can also use an extra voice for breaks, as documented in NR 4.3.1 Line 
> breaking
> http://lilypond.org/doc/v2.23/Documentation/notation/line-breaking.html
> 
> Cheers,
> Xavier
> 
> -- 
> Xavier Scheuer 
> 


Re: addlyric

2021-10-02 Thread Lukas-Fabian Moser

Hi,

[Please keep the replies on-list, so everybody can follow.]


what if the note is not one but many?
See the very last word "jago" in the attached music score.


This requires no change in the lyrics you enter:

ja -- go

will do fine. But you have to tell LilyPond to create a melisma: For 
example, using a slur, or an explicit \melisma:


\version "2.22"

\relative {
  c'8 d e16\melisma f g f e f d g e'32 d c b a g f d\melismaEnd c4
} \addlyrics {
  Vir -- tu -- o -- so.
}

I really strongly recommend you work through the Learning Manual 
(especially the tutorial), most of your questions are answered there.


Lukas



Re: How to get warnings for unused parts of a file?

2021-10-02 Thread Omid Mo'menzadeh
I'm just re-stating this to make sure I'm getting it right: Definitions are
lazy, and the expression in front of # is lazy too, so it gets a chance to
see the definition once it's done? Am I right?

That's good to know!

On Sat, Oct 2, 2021 at 4:00 PM David Kastrup  wrote:

> "Omid Mo'menzadeh"  writes:
>
> > Of course!I just attached two files that demonstrate the difference.
> >
> > On Sat, Oct 2, 2021 at 3:30 PM David Kastrup  wrote:
> >
> >> "Omid Mo'menzadeh"  writes:
> >>
> >> > I didn't know about $ at all! Where in the documentation can I find
> more
> >> > about it? It was hard to search for!
> >> >
> >> > I tried it, but it doesn't seem to find my variable "vocal" defined in
> >> the
> >> > same .ily file. I tried using #(top-repl) and $(top-repl) too, in the
> #
> >> > version it knows what \vocal is, but in the $ version it doesn't.
> >>
> >> How about a minimal example exhibiting the problem?
> >>
> >> --
> >> David Kastrup
> >>
> >
> > \version "2.22.1"
> >
> > vocal = \relative c'' {
> >   a4 b c d |
> > }
> >
> > $(if (not (defined? 'is-loaded-file)) #{ \score { \vocal } #})
>
> Well, that one's a timing problem.  You couldn't write
>
> vocal = \relative c'' {
>   a4 b c d |
> }
>
> \vocal
>
> either.  The reason is that the assignment is not complete before
> LilyPond has a chance to check whether something like \addlyrics { Ah }
> follows, and so when it looks at the next thing that comes up to make
> that decision, \vocal is not yet defined.  So there really needs to be
> anything after that assignment that does not immediately reference
> \vocal .
>
> With #, LilyPond does not allow different syntactic functionality, so
> when it sees # it does not bother evaluating it until after it has
> completed the assignment, being sure that it won't have to add something
> like \addlyrics ... to the expression to be assigned.
>
> This is one case where minimal examples tend to fail more often than
> actual use of assigned variables in practice, because usually when you
> employ variables seriously, you don't reference them immediately right
> afterwards.
>
> --
> David Kastrup
>


Re: How to get warnings for unused parts of a file?

2021-10-02 Thread David Kastrup
"Omid Mo'menzadeh"  writes:

> I'm just re-stating this to make sure I'm getting it right: Definitions are
> lazy, and the expression in front of # is lazy too, so it gets a chance to
> see the definition once it's done? Am I right?

It's not a definition but an assignment, and the assignment is not
"lazy" but executed as soon as it is complete.  Recognizing its
completeness may require examining the type of the next token, and the
type of $ depends on its value (which consequently needs to be evaluated
to figure out its type) while the type of # doesn't.

-- 
David Kastrup



Re: How to get warnings for unused parts of a file?

2021-10-02 Thread Omid Mo'menzadeh
Ah! Now I get it! Thank you very much!

On Sat, Oct 2, 2021 at 6:39 PM David Kastrup  wrote:

> "Omid Mo'menzadeh"  writes:
>
> > I'm just re-stating this to make sure I'm getting it right: Definitions
> are
> > lazy, and the expression in front of # is lazy too, so it gets a chance
> to
> > see the definition once it's done? Am I right?
>
> It's not a definition but an assignment, and the assignment is not
> "lazy" but executed as soon as it is complete.  Recognizing its
> completeness may require examining the type of the next token, and the
> type of $ depends on its value (which consequently needs to be evaluated
> to figure out its type) while the type of # doesn't.
>
> --
> David Kastrup
>


Scheme function names

2021-10-02 Thread David Zelinsky
I'm trying get some facility with Scheme in Lilypond.  One thing I
haven't found in the manual is an explanation of naming conventions for
built-in scheme functions.  Specifically, why do some of them have names
starting with "ly:" and others don't?  Can someone explain this, and/or
point me to where in the manual it is explained?

-David



End pedal optionally with text.

2021-10-02 Thread Andy Bradford
Hello,

I'm trying to  accomplish something similar to attached  image where the
sustain pedal ends without showing the line. In ASCII:

Ped. __/\

Optionally, it would be nice to follow it with something like:

Ped. __/\ con ped.

I've been able to eliminate the  bracket, but somehow have not been able
to get rid of the line:

Ped. __/\_

Using something like:

\version "2.18.2"
\relative c' {
  \set Staff.pedalSustainStyle = #'mixed
  a b c d\sustainOn
  e \once\override Staff.PianoPedalBracket.edge-height = #'(1 . 0) f 
\sustainOff \sustainOn g \sustainOff a
}

I've tried  altering Staff.SustainPedalLineSpanner but clearly  I do not
understand what it is for. Even hiding it has no effect.

Is there some documentation for this that I've missed? Any thoughts?

Thanks,

Andy



Re: End pedal optionally with text.

2021-10-02 Thread Kieren MacMillan
Hi Andy,

> Optionally, it would be nice to follow it with something like:
> Ped. __/\ con ped.

Below, I’ve attached what I use.

Notes:

1. It’s pretty old code, so there’s probably a better way nowadays…

2. It could (and should) be abstracted so that the “sim” is a parameter, rather 
than hard-coded.

Hope this helps!
Kieren.



pedalSim =
  \override Staff.PianoPedalBracket.stencil =
  #(lambda (grob)
   (let* (;; have we been split?
 (orig (ly:grob-original grob))
 ;; if yes, get the split pieces (our siblings)
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
   ;; Modify the unbroken grob-stencil or the first part of the broken
   ;; grob-stencil.
   (if (or (null? siblings)
   (and (>= (length siblings) 2)
(eq? (car siblings) grob)))
   (let* (;; Get the default-stencil and its x-dimension and x-length.
  (stil (ly:piano-pedal-bracket::print grob))
  (stil-x-extent (ly:stencil-extent stil X))
  (stil-x-length (interval-length stil-x-extent))
  ;; Create a stencil to be added to the default-stencil.
  ;; Gets its x-dimension and x-length.
  (sim-stil
 (grob-interpret-markup grob
(markup #:fontsize -1 #:hspace 0.75 #:raise -0.05 #:italic 
"sim.")))
  (sim-stil-x-extent (ly:stencil-extent sim-stil X))
  (sim-stil-x-length (interval-length sim-stil-x-extent))
  (thickness (max (layout-line-thickness grob) 0.1))
  ;; The value to shorten the default-stencil from the right side.
  ;; 0.8 will shorten about 80%.
  ;; Hard-coded, could be turned into a music-function.
  (amount 0.6))

 ;; Print a warning if the length of the default-stencil would not
 ;; warrant a sufficient output.
 (if (> sim-stil-x-length stil-x-length)
 (ly:warning "PianoPedalBracket is too short"))

 ;; Shorten the default-stencil.
 (ly:grob-set-property!
grob
'shorten-pair
(cons 0 (* amount stil-x-length)))

 ;; Calculate the final stencil.
 (let* (;; Get the shortened (default-)stencil
;; and its y-dimension.
(shortened-stil (ly:piano-pedal-bracket::print grob))
(shortened-stil-y-ext (ly:stencil-extent shortened-stil Y))
;; Modify the sim-stil to gain a little gap to the left and
;; enlarge it downwards a little (otherwise the stencil-whiteout
;; will not work sufficient.
(new-sim-stil
  (ly:make-stencil
(ly:stencil-expr sim-stil)
(interval-widen sim-stil-x-extent (* 2 thickness))
(cons (- (car shortened-stil-y-ext) thickness)
  (cdr shortened-stil-y-ext)

   (ly:stencil-add
   shortened-stil
   (ly:stencil-translate-axis
  (stencil-whiteout-box new-sim-stil)
  (* (- 1 amount) (- stil-x-length sim-stil-x-length))
  X
   ;; TODO:
   ;; Is there any need to return #f explicitly?
   ;; Deleting it seems to make no difference.
   ;#f
   )))


Re: Scheme function names

2021-10-02 Thread David Kastrup
David Zelinsky  writes:

> I'm trying get some facility with Scheme in Lilypond.  One thing I
> haven't found in the manual is an explanation of naming conventions for
> built-in scheme functions.  Specifically, why do some of them have names
> starting with "ly:" and others don't?  Can someone explain this, and/or
> point me to where in the manual it is explained?

Historically, functions defined in C++ have a prefix of ly: .  It's not
really a distinction valuable to the user, and it is no longer
unilaterally the case.

-- 
David Kastrup



Re: Scheme function names

2021-10-02 Thread David Zelinsky
David Kastrup  writes:

> David Zelinsky  writes:
>
>> I'm trying get some facility with Scheme in Lilypond.  One thing I
>> haven't found in the manual is an explanation of naming conventions for
>> built-in scheme functions.  Specifically, why do some of them have names
>> starting with "ly:" and others don't?  Can someone explain this, and/or
>> point me to where in the manual it is explained?
>
> Historically, functions defined in C++ have a prefix of ly: .  It's not
> really a distinction valuable to the user, and it is no longer
> unilaterally the case.

Thanks, good to know!

I'd suggest putting a remark such as what you said at the top of the
Scheme Functions page (.../Documentation/internals/scheme-functions).
Otherwise it's pretty confusing to newbies.

-David



Re: Scheme function names

2021-10-02 Thread David Zelinsky
David Zelinsky  writes:

> David Kastrup  writes:
>
>> David Zelinsky  writes:
>>
>>> I'm trying get some facility with Scheme in Lilypond.  One thing I
>>> haven't found in the manual is an explanation of naming conventions for
>>> built-in scheme functions.  Specifically, why do some of them have names
>>> starting with "ly:" and others don't?  Can someone explain this, and/or
>>> point me to where in the manual it is explained?
>>
>> Historically, functions defined in C++ have a prefix of ly: .  It's not
>> really a distinction valuable to the user, and it is no longer
>> unilaterally the case.
>
> Thanks, good to know!
>
> I'd suggest putting a remark such as what you said at the top of the
> Scheme Functions page (.../Documentation/internals/scheme-functions).
> Otherwise it's pretty confusing to newbies.

Oh, maybe never mind.  It looks like it's just the development branch
(2.23) where that page has a mix of ly: and non-ly: functions.  In 2.22
it only lists ly: functions.  Maybe it's ok for newbies to be confused
in the devel branch :)

-David



Re: responses in hymn tunes?

2021-10-02 Thread Karlin High

On 10/2/2021 4:18 PM, Kira Garvie wrote:
how to add a tenor response within the repeat of a hymn tune when there 
is also a response in the verses.


You are doing work for or from hymnary.org? Nice!

The song you have there is one I learned around age 6 in school, from 
this thing:




So my response is a little incautious, thinking I know exactly what's 
needed, and may stand for some correction.


TenorResponse = \lyricmode {

  \repeat unfold 11 { \skip 1 }

  Send the light! Send the light!

   \repeat unfold 11 { \skip 1 }

   Send the light! Send the light!

   % BEGIN SUGGESTION
   Send the light the bless -- ed gos -- pel light.
   Let it shine
   From shore to shore
   Let it shine
   For -- ev -- er -- more
   % END SUGGESTION
}

--
Karlin High
Missouri, USA



Re: responses in hymn tunes?

2021-10-02 Thread Carl Sorensen
Hi, Kira

From: lilypond-user  
on behalf of Kira Garvie 
Date: Saturday, October 2, 2021 at 3:19 PM
To: Lilypond-User Mailing List 
Subject: responses in hymn tunes?

Hello all,
I have a very specific problem I am running into of how to add a tenor response 
within the repeat of a hymn tune when there is also a response in the verses. 
Here is the hymn and my code. (I just copied everything... sorry if it is too 
much!)

When I have this situation, I create a lyric that has only the response.

I then I create a music line that has only the notes for the response (and 
actually, the pitches don’t matter).

Then, put the music line for the response into a nullVoice so the notes won’t 
show.

Finally, do \lyricsto to the nullVoice  with the response lyrics.

However, it appears that 2.16 does not have nullVoice (I’d push hymnary.org to 
move to 2.22 – but that may be impossible).  I believe you can use devNull 
instead of nullVoice with 2.16.

If you had given us a tiny example , ( https://lilypond.org/tiny-examples.html 
) I would have shown you an example. But this file is much too big for me to 
spend the time to work it out for you.

Best,

Carl




Re: responses in hymn tunes?

2021-10-02 Thread Kira Garvie
Sorry! I am still new, I havent made a tiny example yet... some of the
features of FlexScores only work with 2.16.2, so that is why Hymnary still
uses it.

On Sat, Oct 2, 2021 at 5:50 PM Carl Sorensen  wrote:

> Hi, Kira
>
>
>
> *From: *lilypond-user  gmail@gnu.org> on behalf of Kira Garvie 
> *Date: *Saturday, October 2, 2021 at 3:19 PM
> *To: *Lilypond-User Mailing List 
> *Subject: *responses in hymn tunes?
>
>
>
> Hello all,
>
> I have a very specific problem I am running into of how to add a tenor
> response within the repeat of a hymn tune when there is also a response in
> the verses. Here is the hymn and my code. (I just copied everything...
> sorry if it is too much!)
>
>
>
> When I have this situation, I create a lyric that has only the response.
>
>
>
> I then I create a music line that has only the notes for the response (and
> actually, the pitches don’t matter).
>
>
>
> Then, put the music line for the response into a nullVoice so the notes
> won’t show.
>
>
>
> Finally, do \lyricsto to the nullVoice  with the response lyrics.
>
>
>
> However, it appears that 2.16 does not have nullVoice (I’d push
> hymnary.org to move to 2.22 – but that may be impossible).  I believe you
> can use devNull instead of nullVoice with 2.16.
>
>
>
> If you had given us a tiny example , (
> https://lilypond.org/tiny-examples.html ) I would have shown you an
> example. But this file is much too big for me to spend the time to work it
> out for you.
>
>
>
> Best,
>
>
>
> Carl
>
>
>
>
>


Re: responses in hymn tunes?

2021-10-02 Thread Karlin High

On 10/2/2021 4:55 PM, Kira Garvie wrote:
some of the features of FlexScores only work with 2.16.2, so that is why 
Hymnary still uses it.


Understandable and unfortunate. It will be harder to get good help for 
older versions. Especially from me. Effectively all of my LilyPond 
experience comes after 2.18, so my advice won't be reliable for versions 
prior to that.

--
Karlin High
Missouri, USA



Re: responses in hymn tunes?

2021-10-02 Thread Karlin High

On 10/2/2021 4:47 PM, Kira Garvie wrote:

I added the repeat voltas to the response, but now I have extra barlines!


You can try entering the TenorResponse lyrics just like I gave it. The 
lyrics will follow the volta/alternative structure defined in StanzaTwo.

--
Karlin High
Missouri, USA



fret diagram number position

2021-10-02 Thread Gary Brookman
The position of the fret diagram number is confusing and I'd like to move it, 
but I'm not seeing a way. I looked at fret-diagram-interface but nothing is 
obvious for moving it towards the middle of a fret. Like this:

[cid:952f67fd-477d-41c4-949f-a859abaddc69]
Lilypond looks like this:
[cid:385e60de-6a0f-4947-92c9-08b9ab63bc3c]
Is there a way to set the position?


Re: fret diagram number position

2021-10-02 Thread Carl Sorensen


From: lilypond-user  
on behalf of Gary Brookman 
Date: Saturday, October 2, 2021 at 9:30 PM
To: "lilypond-user@gnu.org" 
Subject: fret diagram number position

The position of the fret diagram number is confusing and I'd like to move it, 
but I'm not seeing a way. I looked at fret-diagram-interface but nothing is 
obvious for moving it towards the middle of a fret. Like this:

[cid:952f67fd-477d-41c4-949f-a859abaddc69]
Lilypond looks like this:
[cid:385e60de-6a0f-4947-92c9-08b9ab63bc3c]
Is there a way to set the position?

Yes.   It’s in the ‘details property.

You need to adjust the fret-label-vertical-offset.

See 
https://lilypond.org/doc/v2.22/Documentation/internals/fret_002ddiagram_002dinterface

HTH,

Carl.



Re: Adding a quote to lyrics

2021-10-02 Thread Wilbert Berendsen
Op Thu, 9 Sep 2021 17:46:13 -0400
Kira Garvie  schreef:

> Hello all,
> I am typing the lyrics to a hymn, and it has the line: The cry “To
> arms!” is heard afar and near. How do I do those quotations without
> Frescobaldi thinking it’s a string of code? Also I am the newbie-est
> of newbies with coding and this program here so please be gentle and
> very specific! Thank you!!

As Karlin wrote, you can use Ctrl+' and Ctrl+" to get those, they are
snippets in the Snippets menu.

And there is a tool in Tools→Programming→Special Characters, under
General Punctuation there are many special quotes which can be clicked
on to enter them in your LilyPond source.

Good luck!

-- 
Wilbert Berendsen (www.wilbertberendsen.nl)