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