6 This shows how accidentals in different octaves are handled.
13 #(define (lo-octave p)
14 (let* ((a (ly:pitch-alteration p))
15 (n (ly:pitch-notename p)))
16 (ly:make-pitch -1 n a)))
18 #(define (no-octaves music)
19 (let* ((es (ly:get-mus-property music 'elements))
20 (e (ly:get-mus-property music 'element))
21 (p (ly:get-mus-property music 'pitch)))
35 (set! p (lo-octave p))
36 (ly:set-mus-property! music 'pitch p)))
43 mel = \notes \transpose c c' {
44 \time 4/4 \key d \major
45 gis4 g' g gis' | gis2 g' | g1 | gis | g | gis' | g |
46 fis4 f' f fis' | fis2 f' | f1 | fis | f | fis' | f |
51 << \context Staff \mel
52 \context NoteNames \apply #no-octaves \mel