lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ambitus per voice and Ez_numbers_engraver


From: Gloops
Subject: Ambitus per voice and Ez_numbers_engraver
Date: Tue, 8 Jan 2019 06:50:57 -0700 (MST)

Hello!
Ambitus by voice and Ez_numbers_engraver can not work together?
Gilles

#(define Ez_numbers_engraver
   (make-engraver
    (acknowledgers
     ((note-head-interface engraver grob source-engraver)
      (let* ((context (ly:translator-context engraver))
             (tonic-pitch (ly:context-property context 'tonic))
             (tonic-name (ly:pitch-notename tonic-pitch))
             (grob-pitch
              (ly:event-property (event-cause grob) 'pitch))
             (grob-name (ly:pitch-notename grob-pitch))
             (delta (modulo (- grob-name tonic-name) 7))
             (note-names
              (make-vector 7 (number->string (1+ delta)))))
        (ly:grob-set-property! grob 'note-names note-names))))))



\layout {
  ragged-right = ##t
  \context {
    \Voice
    \consists \Ez_numbers_engraver
    \consists "Ambitus_engraver"

  }
}



\new Staff <<
  \new Voice \with {
    
  } \relative c'' {
    \override Ambitus.X-offset = #2.0
    \voiceOne
    \easyHeadsOn
    c4 a d e
    f1
  }
  \new Voice \with {
    
  } \relative c' {
    \voiceTwo
    \easyHeadsOn
    es4 f g  as
    b1
  }
>>



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]