[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ly:pitch and string
From: |
Simon Albrecht |
Subject: |
Re: ly:pitch and string |
Date: |
Fri, 10 Oct 2014 23:55:57 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 |
Hello Paul,
thanks a lot! I thought along the same lines also, but (1) my less
elegant coding and (2) the complications brought along by German
notenames would’ve made it too tedious.
Am 10.10.2014 um 23:44 schrieb Paul Morris:
Just for fun, another version, more compact, probably more cryptic:
%%%%%%%%%%%%%%
\version "2.19.12"
If you were to make an LSR snippet, I’d suggest making a Dutch version
pitch-to-string-dutch also (same for both coding variants):
pitch-to-string =
#(define-scheme-function (parser location p) (ly:pitch?)
(string-append
(list-ref '("C" "D" "E" "F" "G" "A" "B")
(ly:pitch-notename p))
(list-ref '("-Double-Flat" "-Flat" "" "-Sharp" "-Double-Sharp")
replace the latter list by '("eses" "es" "" "is" "isis")
(+ 2 (* 2 (ly:pitch-alteration p))))))
newTonic = d
newTonicString = \pitch-to-string \newTonic
% for testing:
#(display (string-append "in-" newTonicString))
\bookOutputSuffix #(string-append "in-" newTonicString)
\score { \transpose c \newTonic { c' } }
%%%%%%%%%%%%%%
Best regards, Simon
Re: ly:pitch and string, David Kastrup, 2014/10/11