[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: header properties not visible within score
From: |
Markus Rother |
Subject: |
Re: header properties not visible within score |
Date: |
Tue, 7 May 2019 09:24:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Hi Thomas,
Thank you very much for your detailed and swift response.
You are asking why it would be of interest to have a score style header:
I am trying to mimick a Jazz Realbook as presented here:
http://leighverlag.blogspot.com/2015/12/mimicking-real-book-look.html.
However, instead of creating a single sheet/score, I want to join
multiple, independent scores from separate files into a book. Each score
should be valid lilypond and contain all self-describing metadata. The
style definition for all scores should not be replicated, but rather
kept in the main file, laying out the whole book. I want the solution to
be lilypond/guile only without relying on templating engines, makefiles
or alike. So, that's the plan.
B.R. Markus
On 5/1/19 11:43 PM, Thomas Morley wrote:
> Am Mi., 1. Mai 2019 um 09:59 Uhr schrieb Markus Rother <address@hidden>:
>> % Embedding \fromproperty in a \score is not working (at least not) for
>> header properties.
>> % If header scope is hidden by design, how can I achieve the following?
>> % Many thanks and best regards, Markus
>> \book {
>> \paper {
>> indent = 0\mm
>> scoreTitleMarkup = \markup {
>> \fromproperty #'header:piece % works as expected
>> \score {
>> { s^\markup { "FOO" \fromproperty #'header:piece "BAR" } } %
>> property not visible
>> \layout {}
>> }
>> }
>> }
>> \score {
>> { s1 }
>> \header {
>> piece = "MENUET"
>> }
>> }
>> \score {
>> { s1 }
>> \header {
>> piece = "RONDEAU"
>> }
>> }
>> }
> Hi Markus,
>
> thanks for your report.
>
> As far as I understand things, \fromproperty can't be used
> successfully outside from \paper and/or in common markup.
> (score-markup is such a common markup.)
>
> Thus, below fails to print "MY-TITLE"
> \header { title = "MY-TITLE" }
> \markup { something \fromproperty #'header:title something }
>
> There is
> http://lsr.di.unimi.it/LSR/Item?id=467
> which has access to $defaultheader, thus below works
> \header { title = "MY-TITLE" }
> \markup { something \markupWithHeader \fromproperty #'header:title something }
> (code for markupWithHeader is not copied here, take it from the linked
> LSR-snippet)
> As soon as you wrap \book around above it fails again, because \header
> in book is not the $defaultheader.
> There's a TODO in said snippet:
> ";; TODO: If we are inside a score, add the score's local header block, too!"
> I don't know how, though.
>
> So yes, it would be nice to have a method to access book/score-header
> like the LSR-snippet does for $defaultheader.
> Not sure if possible at all...
>
> For now, I thought about how to find a work-around for your use-case...
> Why do you need a score _in_ scoreTitleMarkup? Likely for a short
> excerpt or hints about scordatura or similiar.
> But is it really necessary to code the piece-name as a common
> TextScript _inside_ this score?
> Probably you can do something like below. Yeah, more manual work, I know ...
>
> \book {
> \paper {
> indent = 0\mm
> scoreTitleMarkup = \markup \column {
> \line { \hspace #20 "FOO" \fromproperty #'header:piece "BAR" }
> \fromproperty #'header:sample
> \fromproperty #'header:piece
> }
> }
> \score {
> { s1 }
> \header {
> piece = "MENUET"
> sample = \markup \score { cis'1 \layout { indent = 30 } }
> }
> }
> \score {
> { s1 }
> \header {
> piece = "RONDEAU"
> sample = \markup \score { d'1 \layout { indent = 30 } }
> }
> }
> }
>
>
> Cheers,
> Harm
>
pEpkey.asc
Description: application/pgp-keys