initial commit

This commit is contained in:
Andrew Miner
2017-05-30 23:47:51 -07:00
commit 945ebc94d5
29 changed files with 2068 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
#(define (naturalize-pitch p)
(let ((o (ly:pitch-octave p))
(a (* 4 (ly:pitch-alteration p)))
;; alteration, a, in quarter tone steps,
;; for historical reasons
(n (ly:pitch-notename p)))
(cond
((and (> a 1) (or (eq? n 6) (eq? n 2)))
(set! a (- a 2))
(set! n (+ n 1)))
((and (< a -1) (or (eq? n 0) (eq? n 3)))
(set! a (+ a 2))
(set! n (- n 1))))
(cond
((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
(if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
(if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))
(ly:make-pitch o n (/ a 4))))
#(define (naturalize music)
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
(p (ly:music-property music 'pitch)))
(if (pair? es)
(ly:music-set-property!
music 'elements
(map (lambda (x) (naturalize x)) es)))
(if (ly:music? e)
(ly:music-set-property!
music 'element
(naturalize e)))
(if (ly:pitch? p)
(begin
(set! p (naturalize-pitch p))
(ly:music-set-property! music 'pitch p)))
music))
naturalizeMusic =
#(define-music-function (parser location m)
(ly:music?)
(naturalize m))
+40
View File
@@ -0,0 +1,40 @@
\version "2.18.2"
\language english
\include "functions.ly"
\header {
subtitle = \markup { \vspace #1 }
tagline = ""
}
\layout {
indent = 0.5 \in
\context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/8)
}
}
\paper {
#(set-paper-size "letter")
top-margin = 0.5 \in
right-margin = 1.0 \in
left-margin = 1.0 \in
bottom-margin = 0.5 \in
system-system-spacing = #'(
(basic-distance . 12)
(minimum-distance . 6)
(padding . 3)
(stretchability . 24)
)
markup-system-spacing = #'(
(basic-distance . 6)
(minimum-distance . 3)
(padding . 3)
(stretchability . 12)
)
}