Hi,

Here is a report on my attempts to display polychords in lilypond. Feedback and 
comments are welcome! As it's my beginnings in scheme, programming style may 
not be very good :).

I was able to print the chord root name transposed in the markup. 
Now I can't print the transposed root name above the normal root name, so I 
might need to find another way. May be write my own chord namer.

Greetings,

Jean-Alexis



#(define myChordRootNamer #f)

#(define-markup-command (transposedRootName layout props a b) (number? number?)
  #:properties ((cause #f))
  "Print the root of the chord transposed."
  (display (ly:event-property cause 'pitch))
  (display myChordRootNamer)
  (interpret-markup layout props
    (markup (myChordRootNamer 
             (ly:pitch-transpose (ly:event-property cause 'pitch) 
(ly:make-pitch 0 a b))
                                #f))))
chExceptionMusic = {
  <c e g des'' f'' aes''>1-\markup { & 
                         \transposedRootName #1 #-1/2 }
}
chExceptions = #( append
  ( sequential-music-to-chord-exceptions chExceptionMusic #t)
 ignatzekExceptions)
theMusic = \chordmode {
\set chordNameExceptions = #chExceptions
     \applyContext #(lambda (x)
      (set! myChordRootNamer (ly:context-property x 'chordRootNamer) ))
       c1:5.16-.18.20-
}
\layout {
  ragged-right = ##t
}
<< \context ChordNames \theMusic
   \context Voice \theMusic
>>

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to