-\version "1.7.6"
+
+\version "1.9.6"
\header {
-texidoc="
+texidoc="@cindex Smart Transpose
@example
- Here's a copy of my feature request :
+ Here's a copy of my feature request :
@quotation
Your task, if you accept it is to implement a \smarttranspose
- command> that would translate such oddities into more natural
+ command>> that would translate such oddities into more natural
notations. Double accidentals should be removed, as well as E-sharp
(-> F), bC (-> B), bF (-> E), B-sharp (-> C).
@end quotation
(n (ly:pitch-notename p)))
(cond
- ((and (> a 0) (or (eq? n 6) (eq? n 2)))
- (set! a (- a 1)) (set! n (+ n 1)))
- ((and (< a 0) (or (eq? n 0) (eq? n 3)))
- (set! a (+ a 1)) (set! n (- n 1))))
+ ((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
- ((eq? a 2) (set! a 0) (set! n (+ n 1)))
- ((eq? a -2) (set! a 0) (set! n (- n 1))))
+ ((eq? a 4) (set! a 0) (set! n (+ n 1)))
+ ((eq? a -4) (set! a 0) (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))))
\transpose c ais \music
\apply #simplify \transpose c ais \music
}
- \paper { linewidth = -1. }
+ \paper { raggedright = ##t}
}
-%% new-chords-done %%
+