lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \keepWithTag #'A {\keepWithTag #'B \music}


From: H. S. Teoh
Subject: Re: \keepWithTag #'A {\keepWithTag #'B \music}
Date: Sun, 8 May 2016 15:44:28 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

On Sun, May 08, 2016 at 05:13:31PM -0500, David Wright wrote:
> On Sat 07 May 2016 at 10:42:43 (+0200), Gianmaria Lari wrote:
> > Dear David thank you for explaining the problem and pointing me out
> > the documentation where this is discussed.
> > 
> > Yes, I could organize my code differently but this would be less
> > clear. Try to have a look to the attached image capture.png.
> > The first line is the wanted screen output, the second line the wanted
> > midi output  (that is normally not intended to print).
> > Now let me discuss how I would like to obtain it.
> 
> AIUI there are three ways of achieving what you want:
> 1) reverse the logic, as you have done here,
> 2) use lists in keepWithTag so that you don't nest them,
> 3) use tag groups.

Use \removeWithTag to remove unwanted tags.


> If you want to structure your music as you wish, then you can't use
> (2).  So that leaves you option (3).
> 
> BTW what does markup do to the midi output that you don't like?
[...]

I'm not the OP, but in my own scores I often find myself fighting with
the default midi output if I try to use the same score for layout.  The
best approach that has worked for me so far is to put all actual musical
content in variables, e.g., fluteI = \relative c' { ...}, fluteII = ...,
clarinetI = ..., etc., then have two scores, one that creates all the
elaborate bracketing structures needed in an orchestral score, including
using \partcombine and so forth, and the other midi-only score that just
has one voice per (midi) staff.

Things like \trill are rarely interpreted to my liking in the midi
output, so I'd usually write \tag #'layout { c1\trill }, then spell out
the trill as a tuplet in a \tag #'midi {...} block.  This is just one of
many things I've encountered.

Another off the top of my head is writing tremolo passages, where my
soundfont has a dedicated tremolo "instrument" that takes whole notes
and plays them tremolo, whereas for layout I'd use \repeat tremolo with
the 32nd notes.

Dynamics also sometimes go missing in midi output, esp. in piano music
where there are lots of transitory voices which seem to just default to
the default dynamic instead of inheriting from the parent voice. These
are hacked using things like c1-\tag #'midi -\pp so that the voice gets
the right dynamic in midi, but the extraneous dynamic doesn't show up in
the score.

Using \partcombine is one big reason for separating layout score from
midi score, because it often does all sorts of strange things to the
midi output, plus it doesn't work very well when two different
instruments are sharing the same staff in a large orchestral score.
There *is* an option for making MIDI per-voice rather than per-staff,
but since midi needs so many hacks to be tolerable anyway, might as well
just separate the two.


T

-- 
Life would be easier if I had the source code. -- YHL



reply via email to

[Prev in Thread] Current Thread [Next in Thread]