Re: List of scores for book function

2018-01-13 Thread Simon Albrecht

On 13.01.2018 21:15, Pierre-Luc Gauthier wrote:

Holy, what devilry is this?


Also, PS: , especially the title-/mouseover-text ;-)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: List of scores for book function

2018-01-13 Thread Simon Albrecht

On 13.01.2018 21:15, Pierre-Luc Gauthier wrote:

2018-01-13 15:04 GMT-05:00 Thomas Morley:

 @score-list

Holy, what devilry is this?


List splicing – prefixing with @ inserts all the elements of the list 
separately.


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: List of scores for book function

2018-01-13 Thread Pierre-Luc Gauthier
Hi Thomas,

2018-01-13 15:04 GMT-05:00 Thomas Morley :
> @score-list

Holy, what devilry is this?
It *does* work perfectly !

> Though I'm not sure what you're aiming at...
Hopefully I will try someday and make a post (on the lilypondblog.org
if I could set myself an account) for my setup which I think is quite
powerful for, easy to setup, complex chorus and full orchestra,
*multiple score* work.

The multiple score support was lacking in my setup but I need to make
it work ASAP.
It got me going for the last year and currently generates multiples
editions (letter, tablet, huge, kindle, etc) for all parts in the
orchestra for a small setup time.

Thank you very much Thomas.
-- 
Pierre-Luc Gauthier

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: List of scores for book function

2018-01-13 Thread Thomas Morley
2018-01-13 20:33 GMT+01:00 Pierre-Luc Gauthier :
> Thanks Thimothy
>
> 2018-01-13 13:49 GMT-05:00 Timothy Lanfear :
>> See this thread
>
> I will.
>
> Here is where I am so far.
>
> I'm trying to get some basic iteration going on.
> Still, I'm not sure why it does not work.
>
> --
> Pierre-Luc Gauthier
>
> %%%
> \version "2.21.0"
>
> scoreI = \score {{ces''4}}
>
> scoreII = \score {{cis''4}}
>
> bookFunc = #
> (define-void-function
>  (score-list filename)
>  (list?  string?)
>  (ly:book-process #{
>\book {
>  \header {title = #(strftime "%H:%M:%S" (localtime (current-time)))}
>
>  % $(car score-list) % This works
>  % $(cadr score-list) % This works
>
>  $(for-some-music ;; Or map? Neither works
> (lambda (score)
>   score)
> score-list)

@score-list

will do what you're trying to do here.
Though I'm not sure what you're aiming at...

Cheers,
  Harm

>}
>#} #{ \paper {} #} #{ \layout {} #}
>(string-append "Part-" filename)))
>
> \bookFunc #(list scoreI scoreII) "fileName"
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: List of scores for book function

2018-01-13 Thread Pierre-Luc Gauthier
Thanks Thimothy

2018-01-13 13:49 GMT-05:00 Timothy Lanfear :
> See this thread

I will.

Here is where I am so far.

I'm trying to get some basic iteration going on.
Still, I'm not sure why it does not work.

-- 
Pierre-Luc Gauthier

%%%
\version "2.21.0"

scoreI = \score {{ces''4}}

scoreII = \score {{cis''4}}

bookFunc = #
(define-void-function
 (score-list filename)
 (list?  string?)
 (ly:book-process #{
   \book {
 \header {title = #(strftime "%H:%M:%S" (localtime (current-time)))}

 % $(car score-list) % This works
 % $(cadr score-list) % This works

 $(for-some-music ;; Or map? Neither works
(lambda (score)
  score)
score-list)
   }
   #} #{ \paper {} #} #{ \layout {} #}
   (string-append "Part-" filename)))

\bookFunc #(list scoreI scoreII) "fileName"
\version "2.21.0"

scoreI = \score {{ces''4}}

scoreII = \score {{cis''4}}

bookFunc = #
(define-void-function
 (score-list filename)
 (list?  string?)
 (ly:book-process #{
   \book {
 \header {title = #(strftime "%H:%M:%S" (localtime (current-time)))}

 % $(car score-list) % This works
 % $(cadr score-list) % This works

 $(for-some-music ;; Or map? Neither works
(lambda (score)
  score)
score-list)
   }
   #} #{ \paper {} #} #{ \layout {} #}
   (string-append "Part-" filename)))

\bookFunc #(list scoreI scoreII) "fileName"___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: List of scores for book function

2018-01-13 Thread Timothy Lanfear
See this thread for some ideas on how to do it, plus some quirks to look 
out for.


http://lilypond.1069038.n5.nabble.com/Unexpected-behaviour-of-ly-make-book-and-ly-make-book-part-td192160.html



On 13/01/18 16:52, Pierre-Luc Gauthier wrote:

Hi there,

I'm trying to pass a list of scores to a book generating function and
I have a few questions.
Please see example post scriptum.

How should I structure (syntax) my score list?
I did some trials and (only) errors…

How should I iterate over said list?
I'm not quite sure how to "unfold" the score if that makes any sense.
I am using (display (car score-list)) just to figure out what is going on.

Good day


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


--
Timothy Lanfear, Bristol, UK.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user