6 This shows how accidentals in different octaves are handled.
7 FIXME: Shorten and docu
14 #(define (lo-octave p)
15 (let* ((a (ly:pitch-alteration p))
16 (n (ly:pitch-notename p)))
17 (ly:make-pitch -1 n a)))
19 #(define (no-octaves music)
20 (let* ((es (ly:get-mus-property music 'elements))
21 (e (ly:get-mus-property music 'element))
22 (p (ly:get-mus-property music 'pitch)))
36 (set! p (lo-octave p))
37 (ly:set-mus-property! music 'pitch p)))
44 mel = \notes \transpose c c' {
45 \time 4/4 \key d \major
46 gis4 g' g gis' | gis2 g' | g1 | gis | g | gis' | g |
47 fis4 f' f fis' | fis2 f' | f1 | fis | f | fis' | f |
55 % \property Score.oneMeasureLazy = ##t
58 \property Score.autoAccidentals = #'(Staff (same-octave . 0))
59 < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (same-octave . 0))" \mel >
60 \property Score.autoAccidentals = #'(Staff (same-octave . 1))
61 < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (same-octave . 1))" \mel >
62 \property Score.autoAccidentals = #'(Staff (any-octave . 0))
63 < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (any-octave . 0))" \mel >
64 \property Score.autoAccidentals = #'(Staff (any-octave . 1))
65 < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (any-octave . 1))" \mel >
67 < s1^""^""^"$\\backslash$modernAccidentals" \mel >
69 < s1^""^""^"$\\backslash$modernCautionaries" \mel >
71 < s1^""^""^"$\\backslash$noResetKey" \mel >
73 < s1^""^""^"$\\backslash$forgetAccidentals" \mel >
79 \context NoteNames \apply #no-octaves \mus