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