|
From: | Simon Albrecht |
Subject: | Re: Tags with multiple bookparts |
Date: | Fri, 22 Nov 2019 00:34:07 +0100 |
Hi Peter,\keepWithTag and similar are music functions and take music as their second argument, that’s why they don’t work as you wish on \book or \bookpart level.
There would certainly be ways to work around this using custom Scheme functions, but I use to think that it’s better to use standard tools here. Which means finding a clever arrangement of variables, includes, and separate .ly files, that allows you to avoid code duplication and still get clean ways of invoking the different output options.
Perhaps it helps that \include works in a _very_ literal, ‘stupid’ way: You could theoretically do something like
%%%%%%%%% m.ily %%%%%%%%%%% music = {} \bookPart { \score { << %%%%%%%%%% n.ily %%%%%%%%%%% \layout { \context { \Score \override NoteHead.color = #green } } %%%%%%%%%% main.ly %%%%%%%%% \include "m.ily" \music >> \include "n.ily" } } %%%%%%%%%%%%%%%%%%%%%%% or even more weird stuff. HTH, Simon On 21.11.19 16:56, Peter Toye wrote:
Tags with multiple bookparts I want to produce two different outputs from the same music which has several bookparts. Tagging would seem ideal for this, but it seems that \keepWithTag is only valid within \score {}. Oddly, Frescobaldi's auto-complete allows me to type it both before the \book block and before the first \bookPart but then LP gives an error:error: wrong type for argument 2. Expecting music, found #<Book>Is there any way round this? I certainly don't want to have two different score blocks for each section.Regards, Peter mailto:address@hiddenwww.ptoye.com <http://www.ptoye.com>
[Prev in Thread] | Current Thread | [Next in Thread] |