]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/tie-accidental.ly
patch::: 1.3.134.jcn1
[lilypond.git] / input / regression / tie-accidental.ly
1
2 \header{
3 texidoc="
4 When tieing notes with accidentals across a bar boundary, the
5 accidental must not be drawn on the note in the next bar.  Unless the
6 tie crosses a line break, in which case the accidental is repeated if
7 it would be different from an untied note.  The next note of the same
8 pitch in this next bar should always show the accidental (even if it's
9 natural).  Slurring a accidentaled note to a natural one across bar
10 boundaries should be explicit.
11
12 Pitches can be verified by printing them  with the @code{NoteNames} context.
13 ";
14 }
15
16 thenotes = \notes \relative cis' {
17   \time 4/4;
18   g'2 g ~ |
19   g g4 gis |
20   gis2 gis ~ |
21   gis4 gis8 ~ gis g4 gis |
22   g2 gis ~ |
23   gis g4 gis |
24   g2 gis( |
25   )g! gis4 gis |
26   \break
27   \key a \major;
28   gis2 gis ~ |
29   gis4 gis8 ~ gis g4 gis |
30   gis2 g ~ |
31   g4 gis8 ~ gis g4 gis |
32   g2 gis ~ |
33   gis g4 gis |
34   g2 gis( |
35   
36   % FIXME: check for accidentals at line break could look more cute
37   % maybe move to tie-break-accidental?
38   
39   % Btw: I don't even know what the rule is for the second note in the
40   % next bar, if a reminder accidental was printed.  These are really
41   % not very common cases.  Technically, if it is not tied, it
42   % should get an accidental; but it looks a bit silly and redundant.
43   % See last g.
44   
45   )g! gis4 gis ~ | \break
46   gis2  gis ~ | gis g ~\break
47   g2 g
48 }
49
50 \score {
51   <
52     \context Staff \thenotes
53     \context NoteNames \thenotes
54   >
55 }