[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can NoteNames in higher octaves be changed?
From: |
Jay Vara |
Subject: |
Re: Can NoteNames in higher octaves be changed? |
Date: |
Tue, 16 Sep 2014 11:52:17 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
> I'm not top posting.
David,
How I wish I could understand how you do what you do! It all looks like
magic to me. Is there a place that shows how to use all these functions?
I tried to adapt what you showed to my system. So far, all attempts have
resulted in syntax error or other error, mostly because I do not know
what the commands actually do.
Here is what I have - it prints the NoteNames as S R G M P D and N as
defined in the newnames variable. For the range of notes from low G to
high G, it prints P D N S R G M P D N S R G M P. What I would like to
see printed is: p d n S R G M P D N s̊ r̊ g̊ m̊ p̊ [where the
higher octave notes have a dot on top].
Jay
\version "2.18.2"
music = {g2 a b c d e f g a b c d e f g}
newnames =
#`(("c" . "S")
("d" . "R")
("e" . "G")
("f" . "M")
("g" . "P")
("a" . "D")
("b" . "N"))
myNoteNames =
#(lambda (grob)
(let* (
;; bindings
(default-name (ly:grob-property grob 'text))
(new-name (assoc-get default-name newnames))
)
;; body
(ly:grob-set-property! grob 'text new-name)
(ly:text-interface::print grob)
)
)
\new Staff {
<<
\relative c' \music
\context NoteNames {
\set printOctaveNames = ##t
\override NoteName.stencil = #myNoteNames
\music
}
>>
}