[large/complex projects] where should transpositions go?

2024-01-27 Thread Kieren MacMillan
Hi all,

So… At the bottom of this email, I’ve included a somewhat-M W E of something 
I’m wrestling with around all this stuff. You’ll see I have a ScoreMarks.ily 
file (one of many \includes, but needed here because the structure of the vc 
and pc are slightly different!), a notes.ily file (with all the note-code), and 
output files.

There are *so* many variables on the input side in this industry (musical 
theatre): show version (cuts, etc.), voicing (different characters can be 
played by people singing in different clefs), chorus voicing (SATB? just SA?), 
etc. I’m trying to come up with a structure/workflow/plan that gives me maximum 
control and flexibility with minimum complexity (all terms relative, 
obviously!).

Questions:

1. Should I have one output file per score, or use \book? I assume if it’s 
multiple files, and I want to keep them synchronized, I would want to use make 
(or similar) to trigger a compilation of all of them at once?

2. Am I <<>>-ing the \global at the best spot(s)?

3. Compare the voicing of m3 in the SATB and SA voicings: mm1-2 are different, 
but m3 is the same. How can I do this kind of thing with the least amount of 
code duplication? I don’t believe quoted music can be transposed directly 
(i.e., you need to create a second, pre-transposed, quotation); I can’t see how 
to inject a transposition (e.g., using the Edition-Engraver) into a specific 
part of a score/variable; I really don’t want to have to break every variable 
into multiple subvariables to handle every difference between voicings (nor do 
I want to have complete duplicates, one per voicing!); etc.

Given Lilypond’s current powers and limitations, what’s my best path forward? 
At this point, even a high-level discussion would be really appreciated: As you 
can probably imagine, the number of permutations and combinations are ganging 
up on me, and I can’t grapple with them all myself.

Thanks,
Kieren.


\version "2.25.10"
\language "english"

\paper { tagline = ##f ragged-bottom = ##t indent = 0 }


%%%  ScoreMarks.ily

\layout {
  \context {
\type "Engraver_group"
\name ScoreMarks
keepAliveInterfaces = #'( metronome-mark-interface )
rehearsalMarkFormatter = #format-mark-box-alphabet
\consists "Axis_group_engraver"
\override VerticalAxisGroup.staff-affinity = #DOWN
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 3) (minimum-distance . 3) (padding . 1.5))
\consists "Metronome_mark_engraver"
\override MetronomeMark.Y-offset = #0
\override MetronomeMark.outside-staff-priority = #50
\override MetronomeMark.break-align-symbols =
  #'(left-edge staff-bar clef time-signature key-signature)
\override MetronomeMark.non-break-align-symbols =
  #'(paper-column-interface)
\consists "Mark_engraver"
\override RehearsalMark.Y-offset = #0
\override RehearsalMark.outside-staff-priority = #100
\override RehearsalMark.break-align-symbols =
  #'(left-edge staff-bar clef time-signature key-signature)
\override RehearsalMark.self-alignment-X = #CENTER
\override RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
\consists "Text_spanner_engraver"
\override TextSpanner.font-size = #2
\consists "Time_signature_engraver"
\override TimeSignature.stencil = #point-stencil
  }
  \context {
\Staff
\consists "Staff_collecting_engraver"
  }
  \context {
\Score
\remove "Metronome_mark_engraver"
\remove "Mark_engraver"
\accepts ScoreMarks
  }
}


%%%   notes.ily

global = {
  \tempo "Fast"
  \key c \major
  s1
  \tag #'full { s1 }
  \bar "||"
  \key d \major
  s1
  \bar "|."
}

Michael_notes = {
  \tag #'Michael-treble { \clef treble }
  \tag #'Michael-tenor { \clef "treble_8" }
  c'4 4 4 4
  \tag #'full { g4 4 a4 4 }
  d4 4 4 4
}

chorus_notes = {
  \tag #'satb {
4 4 4 4
\tag #'full { 4 4 4 4 }
4 4 4 4
  }
  \tag #'sa {
4 4 4 4
\tag #'full { 4 4 4 4 }
4 4 4 4
  }
}

theChords = \chordmode {
  c1
  \tag #'full { g2 a }
  d1
}

acc_notes_upper = {
  c''4 4 4 4
  \tag #'full { g'4 4 a'4 4 }
  d'4 4 4 4
}
acc_notes_lower = {
  \clef bass
  c4 4 4 4
  \tag #'full { g,4 4 a,4 4 }
  d,4 4 4 4
}


%%%  full.ly (i.e., full version, Michael at pitch)

vox =
  <<
\new Staff \new Voice << \global \Michael_notes >>
\new Staff \new Voice << \global \chorus_notes >>
%%  there would potentially be a lot of other vocal/choral parts in this 
blob
  >>

vc =
  <<
\new ScoreMarks \global
\new ChordNames \theChords
\vox
  >>

pc =
  <<
\new ScoreMarks \global
\vox
\new PianoStaff <<
  \new Staff << \global \acc_notes_upper >>
  \new ChordNames \theChords
  \new Staff << \global \acc_notes_lower >>
>>
  >>

\markup "Vocal/Choral Score, Full Version, Michael tenor-clef, SATB chorus"
\score {
  \keepWithTag #'(Michael-tenor satb full) \vc
}

\markup "Piano/Conductor Score, Full Version, 

Re: [large/complex projects] conditional header values and/or book name

2024-01-27 Thread Kieren MacMillan
 Hi Sam,

Thanks for these thoughts!

> I'm not sure if this fits under your umbrella of having a single top level 
> file, but what about this?
> 
>  song-FV.ly
> definedVariables = data
> \include song.ily
> 
>  song-SV.ly
> definedVariables = data
> \include song.ily
> 
>  song.ily
> \include [.ily files containing the notes, edition-engraver tweaks, etc.]

Different versions will share some tweaks and also have individual/unshared 
tweaks, so I can’t quite tell yet whether this structure would be sufficient 
(never mind optimal).

> \header {
>   [header parameters shared by both versions]
>   [differing header parameters defined in global variables]
> }
> 
> \score {
>   [contexts built from variables defined in \include-d files]
> }
> 
> 
> Optionally, you could use the output names and book blocks so that you can 
> compile the whole work from a FullVersion.ly and ShortVersion.ly which are 
> basically a series of includes of the applicable songs.

The full book (e.g. “Piano/Conductor Score” will definitely be a series of 
includes of applicable songs. I’m trying to figure out how to structure all 
this with the least amount of duplication (in note code, tweak code, and score 
code).

Thanks,
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.




Measure Counter Engraver with groups bigger than a measure

2024-01-27 Thread Ben Bradshaw
Hello everyone,
I have some music that has a four measure repeating section and then puts
numbers at the first measure to indicate how many times the group has been
done. I thought the measure counter engraver would work nicely, but it
numbers every measure instead of every four measures. Is there a way to
make it count in groups of 4? Or is a different tool better suited?

Thanks,
Ben


Re: "\override BarLine" for a PianoStaff

2024-01-27 Thread Ivan Kuznetsov
Yes it does!  Thank you.

On Fri, Jan 26, 2024 at 11:23 PM Vaughan McAlley 
wrote:

>
> Hi Ivan,
>
> \new PianoStaff \with {  \remove "Span_bar_engraver" }
>
> should work!
>
>


Re: Numérotation des versets

2024-01-27 Thread Jean Abou Samra
Try the code here?

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

Best,
Jean



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


Re: Numérotation des versets

2024-01-27 Thread Michael Werner
Hi there,

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

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

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

\version "2.25.12"

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

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

which gives:

[image: image.png]

-- 
Michael


Re: Numérotation des versets

2024-01-27 Thread David Kastrup
Silvain Dupertuis  writes:

> Thanks for the suggestion.
>
> This does provide a nice automatic numbering ...
> but does not repeat the verse number on subsequent lines.
>
> But I did recycle your suggestion using a modified function with one paramater
>
> #(define nextcountstanza
>    (let  ((counter 0))
>  (lambda (x)
>    (set! counter (+ x counter))
>    (string-append ( number->string counter)"."
>
> so that I can copy-paste these expressions instead of manually putting the 
> right number

Will only work for a single voice in a single piece as it uses a global
counter.

-- 
David Kastrup



Re: Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

Thanks for the suggestion.

This does provide a nice automatic numbering ...
but does not repeat the verse number on subsequent lines.

But I did recycle your suggestion using a modified function with one paramater

#(define nextcountstanza
   (let  ((counter 0))
 (lambda (x)
   (set! counter (+ x counter))
   (string-append ( number->string counter)"."

so that I can copy-paste these expressions instead of manually putting the 
right number

\set stanza = #(nextcountstanza 1) - at the betinning of each verse
\set stanza = #(nextcountstanza 0) - within the verses

Le 27.01.24 à 12:19, Ya Gloops a écrit :

#(define nextcountstanza
    (let  ((counter 0))
      (lambda ()
        (set! counter (1+ counter))
        (string-append ( number->string counter)"."

  \new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  
\VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  \VerseTwo }



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Numérotation des versets

2024-01-27 Thread Lukas-Fabian Moser

Hi Silvain,

Am 27.01.24 um 11:12 schrieb Silvain Dupertuis:


/Sorry for my question in French on an English-speaking forum... here
is an Englsh version/

Hello,

Is there a way to automatically repeat the verse numbers on each line
when it is defined by \set stanza = "1."
without repeating this instruction within the verse text

with this structure in the score part, lyrics being defined in variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }
...

For a 5-verse song, it's best to repeat these verse numbers!


Not to my knowledge, but this is something that's quite high on my list
of LilyPond enhancements I'd like to try my hands at. Stay tuned.

(As far as I can see, it's not completely trivial to implement since we
have to wait until the line breaking is known, and then horizontal
spacing has to take the additional stanza numbers into account.)

Lukas


Re: Numérotation des versets

2024-01-27 Thread Ya Gloops
Hello !
Maybe...

#(define nextcountstanza
   (let  ((counter 0))
     (lambda ()
       (set! counter (1+ counter))
       (string-append ( number->string counter)"."

 \new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  \VerseOne 
}
\new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  \VerseTwo }






Le samedi 27 janvier 2024 à 11:14:16 UTC+1, Silvain Dupertuis 
 a écrit : 







Sorry for my question in French on an English-speaking forum... here is an 
Englsh version


Hello,
Is there a way to automatically repeat the verse numbers on each line 
when it is defined by \set stanza = "1." 
without repeating this instruction within the verse text 
with this structure in the score part, lyrics being defined in variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }
  ...

For a 5-verse song, it's best to repeat these verse numbers!







-- 
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org







Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

/Sorry for my question in French on an English-speaking forum... here is an 
Englsh version/

Hello,

Is there a way to automatically repeat the verse numbers on each line
when it is defined by \set stanza = "1."
without repeating this instruction within the verse text

with this structure in the score part, lyrics being defined in variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }
...

For a 5-verse song, it's best to repeat these verse numbers!




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Numérotation des versets

2024-01-27 Thread Jean Abou Samra
Hello,

This is the English-speaking list. You probably meant to send this to the 
French forum, user-fr@lilypond.community .





Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

Bonjour,

Y a-t-il un moyen de répéter automatiquement les numéros de versets à chaque 
ligne
définis par  \set stanza = "1."  ... sans répéter cette instruction à l’intérieur du texte 
des versets


avec cette structure dans la partie score, les paroles étant définies dans des 
variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }

...

Pour un chant à 5 versets, il est préférable de les répéter...




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: cadenza puzzle

2024-01-27 Thread bobr...@centrum.is
The 'global' section in the project I'm setting is a quartet and I use 'global' 
as a template of sorts for time signatures, etc.  That way I only have to enter 
that information once.  The solution given does solve the problem of the 
duplicate rests, but why are the full measure rests not collected into a 
multimeasure rest?



- Original Message -
> From: "Charlie Ma" 
> To: "bobroff" 
> Cc: "Lillypond Users Mailing List" 
> Sent: Saturday, January 27, 2024 7:08:54 AM
> Subject: Re: cadenza puzzle

> not sure what you wanted to achieve with "global."
> But is this what you are looking for?
> See
> https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music
> 
> 
> \version "2.24.2"
> 
> \pointAndClickOff
> 
> global = \relative {
>  \time 4/4
>  s1*8
>  \bar "|."
> }
> 
> cadenzaMeasure = {
>  \cadenzaOff
>  \partial 1024 s1024
>  \cadenzaOn
> }
> cad = \relative c' {
>  \cadenzaOn
>  a8 b c f
>  e gis es b
>  g bes a es \cadenzaMeasure
>  \cadenzaOff
> }
> 
> tune = \relative c' {
>  c4 d e f
>  \cad \bar "|"
>  \break
>  R1*5
> }
> 
> \score {
>  \relative {
>\context Staff {
>\override MultiMeasureRest.expand-limit = #1
>\compressMMRests
><<
>  \global
>  \tune
>>>
>}
>  }
> }
> 
> [image: image.png]
> On Fri, Jan 26, 2024 at 12:36 PM bobr...@centrum.is 
> wrote:
> 
>> Hello,
>>
>> I don't understand what's going on here.  The output I get is in the
>> attached PNG file.  I hope this is minimal enough.  It essentially reflects
>> the structure of the file that is giving me trouble.  Why is the five
>> measure rest "duplicating" like that?  In the actual project I'm working
>> with, the cadenza passage goes across two systems and the multimeasure rest
>> is duplicated twice before the "real" one is supposed to be displayed.
>>
>> Thanks for any assistance,
>>
>> David
>>
>> *** BEGIN LILY-CODE ***
>>
>> \version "2.24.2"
>>
>> \pointAndClickOff
>>
>> global = \relative {
>>   \time 4/4
>>   s1*8
>>   \bar "|."
>> }
>>
>> cad = \relative c' {
>>   \cadenzaOn
>>   a8 b c f
>>   e gis es b
>>   g bes a es
>>   \cadenzaOff
>> }
>>
>> tune = \relative c' {
>>   c4 d e f
>>   \cad
>>   \break
>>   R1*5
>> }
>>
>> \score {
>>   \relative {
>> \context Staff {
>> \override MultiMeasureRest.expand-limit = #1
>> \compressMMRests
>> <<
>>   \global
>>   \tune
>> >>
>> }
>>   }
>> }
>>
> > *** END LILY-CODE ***