Score numbering

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Score numbering

Ferenc Wágner
Hi,

I'm creating a songbook using Lilypond the direct way, not via
lilypond-book, but entering several \score and \markup sections.
Is there an easy way to get automatic numbering of the scores in the
output?  I actually create each song by calling two Scheme functions to
factor out as much formatting as possible, so it's certainly possible to
include incrementing numbering there, but I'd like to check if there's a
built-in facility beforehand.  I'll go for automatic numbering of
additional verses (markups) then...
--
Thanks,
Feri

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Score numbering

Gianmaria Lari


On Sat, 1 Dec 2018 at 16:55, <[hidden email]> wrote:
Hi,

I'm creating a songbook using Lilypond the direct way, not via
lilypond-book, but entering several \score and \markup sections.
Is there an easy way to get automatic numbering of the scores in the
output?  I actually create each song by calling two Scheme functions to
factor out as much formatting as possible, so it's certainly possible to
include incrementing numbering there, but I'd like to check if there's a
built-in facility beforehand.  I'll go for automatic numbering of
additional verses (markups) then...

Try to have a look to the following example:

**************************************
\version "2.19.82"
#(define nextcount
   (let  ((counter 0))
     (add-score #{ \score { {c} \midi{}} #} )
     (lambda ()
       (set! counter (1+ counter))
       (number->string counter))))

mymusic = {
  a b c' d'
}
\score {
  \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic 
  \layout{} 
}

mymusic = {
  c' d' e' f'
}
\score {
  \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic 
  \layout{} 
}
************************************

Best regards, g.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Score numbering

Schneidy
Hi Gianmaria,
I don't understand what  (add-score #{ \score { {c} \midi{}} #} ) stands for (copy/paste typo?)
Cheers,
Pierre



Le dim. 2 déc. 2018 à 00:04, Gianmaria Lari <[hidden email]> a écrit :

>
>
>
> On Sat, 1 Dec 2018 at 16:55, <[hidden email]> wrote:
>>
>> Hi,
>>
>> I'm creating a songbook using Lilypond the direct way, not via
>> lilypond-book, but entering several \score and \markup sections.
>> Is there an easy way to get automatic numbering of the scores in the
>> output?  I actually create each song by calling two Scheme functions to
>> factor out as much formatting as possible, so it's certainly possible to
>> include incrementing numbering there, but I'd like to check if there's a
>> built-in facility beforehand.  I'll go for automatic numbering of
>> additional verses (markups) then...
>
>
> Try to have a look to the following example:
>
> **************************************
> \version "2.19.82"
> #(define nextcount
>    (let  ((counter 0))
>      (add-score #{ \score { {c} \midi{}} #} )
>      (lambda ()
>        (set! counter (1+ counter))
>        (number->string counter))))
>
> mymusic = {
>   a b c' d'
> }
> \score {
>   \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic
>   \layout{}
> }
>
> mymusic = {
>   c' d' e' f'
> }
> \score {
>   \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic
>   \layout{}
> }
> ************************************
>
> Best regards, g.
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Score numbering

Gianmaria Lari
On Sun, 2 Dec 2018 at 11:32, Pierre Perol-Schneider <[hidden email]> wrote:
Hi Gianmaria,
I don't understand what  (add-score #{ \score { {c} \midi{}} #} ) stands for (copy/paste typo?)
Cheers,
Pierre

You're right Pierre.  Copy and paste the following code that it's almost the same except for the \midi{}.

\version "2.19.82"
#(define nextcount
   (let  ((counter 0))
     (add-score #{ \score { {c} \midi{}} #} )
     (lambda ()
       (set! counter (1+ counter))
       (number->string counter))))

mymusic = {
  a b c' d'
}
\score {
  \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic 
  \layout{} 
  \midi{}
}

mymusic = {
  c' d' e' f'
}
\score {
  \new Staff \with {instrumentName=\markup \circle #(nextcount)} \new Voice \mymusic 
  \layout{} 
  \midi{}
}

This code will engrave a single document with two scores, numbered  1 and 2 and generate 3 (three) midi files with the following name:
  • document.mid - an empty-like midi file with name
  • document-1.mid
  • document-2.mid  
The reason is that in this way the midi file document-1.mid contains the audio for the score 1 etc.
If I don't generate the empty like midi file the document.mid would contain the audio file for the score 1 and the document-1.mid would contain the audio file for the score 2.

I hope I have been enough clear.
Ciao, g.


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user