[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ties to alternate endings
From: |
Nick Busigin |
Subject: |
Re: Ties to alternate endings |
Date: |
Tue, 6 Jan 2004 16:26:43 -0500 (EST) |
On Tue, 6 Jan 2004, Marco Caliari wrote:
> Already answered:
>
> On Tue, 18 Mar 2003, Mats Bengtsson wrote:
>
> > The easiest is probably to add an invisible note that the tie can start
> > from:
> >
> > \alternative{{...}{\makeInvisible c4/2 ~ \makeVisible c4/2 ...}
> > where the macros can be defined as
> >
> > makeInvisible = {\property Voice.NoteHead \override #'transparent = ##t
> > \property Voice.Stem \override #'transparent = ##t }
> > makeVisible = { \property Voice.NoteHead \revert #'transparent
> > \property Voice.Stem \revert #'transparent }
> >
> > The 4/2 duration is just a trick to avoid that the extra note destroys
> > the rhythm.
> >
> > /Mats
>
> --
> Marco
Thank you Marco and Mats!
In case anyone else finds this useful, I have included a short example
of how the above is applied in the Lilypond program below and also
have attached the resulting output in a PNG file.
---------- lilypond code starts below this line --------
% This lilypond file shows how to fix a problem with
% a missing tie to a second alternate ending by using
% two "tweaks":
%
% 1) Use of an invisible note - which is placed at the
% beginning of the second alternate ending that is
% missing the partial tie if Lilypond is left to
% its own devices. (v2.1.6 and earlier)
%
% and
%
% 2) Use of a feature that allows us to alter the
% duration of a note without changing its appearance
% (by muliplying its duration by a fraction) - so that
% we can alter the times of the notes in the bar so that
% adding the hidden note doesn't mess up what fits in
% the bar.
\include "paper16.ly"
\paper {
raggedright = ##t
indent = 0.0\mm
}
\version "2.1.6"
MkInvis = {\property Voice.NoteHead \override #'transparent = ##t
\property Voice.Stem \override #'transparent = ##t
}
MkVis = { \property Voice.NoteHead \revert #'transparent
\property Voice.Stem \revert #'transparent
}
mm = \notes % main part
{
c4 d e f ~ % want this to tie to both endings
}
ra = \notes % first ending
{
f2 f
}
rb = \notes % second ending
{
\MkInvis f4 ~ \MkVis f2*1/2 f,
}
\score {
\notes {
\relative c'' {
\repeat volta 2 { \mm }
\alternative { { \ra } { \rb } }
} %relative
} %notes
} % score
---------- lilypond code ends above this line --------
Hope this proves useful to someone else.
Nick
==============------- www.SongBirdofSwing.com -------==================
Nick Busigin address@hidden
Visit Our Indie Jazz CD Construction Project!
==============------- www.SongBirdofSwing.com -------==================