lilypond-user
[Top][All Lists]
Advanced

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

Re: How to view the ("full") input that lilypond is engraving?


From: Aaron Hill
Subject: Re: How to view the ("full") input that lilypond is engraving?
Date: Tue, 12 Mar 2019 16:52:12 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-03-12 4:33 pm, Andrew Bernard wrote:
Hi Jaime,

Is it actually \displayMusic that you are interested in? See Section 1.3.1
in the NR, 'Displaying music expressions'.

Be aware that \displayMusic is only for "music". You cannot use it with higher-level things like \book, \bookpart, or \score.

You can do the following:

%%%%
\version "2.19.82"
\displayMusic { c'4 d' e'2 }
\displayMusic \new Staff { \new Voice { c'4 d' e'2 } }
%%%%

Which will produce output showing some of the differences between implicit and explicit creation of contexts:

====
(make-music
  'SequentialMusic
  'elements
  (list (make-music
          'NoteEvent
          'duration
          (ly:make-duration 2)
          'pitch
          (ly:make-pitch 0 0))
        (make-music
          'NoteEvent
          'pitch
          (ly:make-pitch 0 1)
          'duration
          (ly:make-duration 2))
        (make-music
          'NoteEvent
          'duration
          (ly:make-duration 1)
          'pitch
          (ly:make-pitch 0 2))))


(make-music
  'ContextSpeccedMusic
  'create-new
  #t
  'property-operations
  '()
  'context-type
  'Staff
  'element
  (make-music
    'SequentialMusic
    'elements
    (list (make-music
            'ContextSpeccedMusic
            'create-new
            #t
            'property-operations
            '()
            'context-type
            'Voice
            'element
            (make-music
              'SequentialMusic
              'elements
              (list (make-music
                      'NoteEvent
                      'duration
                      (ly:make-duration 2)
                      'pitch
                      (ly:make-pitch 0 0))
                    (make-music
                      'NoteEvent
                      'pitch
                      (ly:make-pitch 0 1)
                      'duration
                      (ly:make-duration 2))
                    (make-music
                      'NoteEvent
                      'duration
                      (ly:make-duration 1)
                      'pitch
                      (ly:make-pitch 0 2))))))))
====

Even embedding a \score within \markup does not reveal much with \displayMusic:

%%%%
\version "2.19.82"
\displayMusic { b'4^\markup { \score { << { c'4 d' e'2 } >> } } }
%%%%

====
(make-music
  'SequentialMusic
  'elements
  (list (make-music
          'NoteEvent
          'articulations
          (list (make-music
                  'TextScriptEvent
                  'direction
                  1
                  'text
                  (markup #:line (#:score #<Score>))))
          'duration
          (ly:make-duration 2)
          'pitch
          (ly:make-pitch 0 6))))
====

-- Aaron Hill



reply via email to

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