\version "2.11.37" GMup = { c4 d8 e f g a b } Gmup = { c4 d8 ees f g aes b } GMmid = { c4 d8 e f g a b c1 } GMmidB = { c4 d8 e f g f e d1} Gmmid = { c4 d8 ees f g aes b c1 } GmmidB = { c4 d8 ees f g f ees d1} GMdown = { c4 b8 a g f e d } GMend = { c4 b8 a g f e d | c1 } Gmdown = { c4 b8 aes g f ees d } Gmend = { c4 b8 aes g f ees d | c1 } PM = \relative c { c e g c e g c e g c e g c g e c g e c g e c g e c } Pm = \relative c { c ees g c ees g c ees g c ees g c g ees c g ees c g ees c g ees c } septdom = \relative c {g b d f g b d f g b d f g b d f g b d f d b g f d b g f d b g f d b g f d b g } NoTupletNumber = { s4 \override Voice.TupletNumber #'stencil = ##f } #(define tonique-pitch (ly:make-pitch 0 0 0 )) SetTonique = #(define-music-function (parser location m ) (ly:music?) ( let* ( (p (ly:music-property (car (ly:music-property m 'elements)) 'pitch)) (p-index (ly:pitch-notename p)) (p-alt (ly:pitch-alteration p)) (ton (vector-ref #("Do" "Ré" "Mi" "Fa" "Sol" "La" "Si") p-index)) (mode-str (if (eq? mode minor) "mineur" "majeur" )) ) (set! tonique-pitch p) (make-music 'SequentialMusic 'elements (list (make-music 'ContextSpeccedMusic 'context-type 'Staff 'element (make-music 'PropertySet 'value (markup #:line ( #:italic( #:center-align ( #:line (#:simple ton (cond ((= p-alt SHARP) (make-rotate-markup -16 (make-translate-markup '(-0.2 . 0.85) (make-tiny-markup (make-sharp-markup))))) ((= p-alt FLAT) (make-rotate-markup -16 (make-translate-markup '(-0.1 . 0.35) (make-tiny-markup (make-flat-markup))))) (else "" ))) #:simple mode-str) ))) 'symbol 'instrumentName ) ) )) )) #(define (getPitch note) (ly:music-property (car (ly:music-property note 'elements)) 'pitch) ) #(define (transposeToCurrentTon music) (ly:music-transpose (ly:music-deep-copy music) tonique-pitch) ) %%%%%%%%%%%%%%%%%%%%%%%% #(define (filterByPitch accord firstpitch uppitch lastpitch) ( let* ( (originlist (ly:music-property (ly:music-property accord 'element) 'elements)) (lastAdded-pitch (ly:make-pitch -5 0 0)) ) (make-music 'SequentialMusic 'elements (filter (lambda (note) ( let* ( (current-pitch (getPitch note)) (asc (ly:pitchutf-8 #x2014) )) } } } } \header { tagline = #f %% copyright = #f }