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

2019-03-12 Thread Aaron Hill

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 #
  'duration
  (ly:make-duration 2)
  'pitch
  (ly:make-pitch 0 6


-- Aaron Hill

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


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

2019-03-12 Thread Andrew Bernard
Hi Jaime,

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

Andrew


On Wed, 13 Mar 2019 at 08:19, Jaime T  wrote:

> http://lilypond.org/doc/v2.19/Documentation/notation/file-structure
> (NR, section 3.1.5 "File structure") says:
>
> ...A file containing only "{ c'4 d' e'2 }" will be translated into:
>
> \book {
>   \score {
> \new Staff {
>   \new Voice {
> { c'4 d' e'2 }
>   }
> }
> \layout { }
>   }
>   \paper { }
>   \header { }
> }
>
> Is there any way I can get lilypond to output and show me the final
> version of my input i.e. *after* lilypond has included all these
> necessary implicit additions to my source input?
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


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

2019-03-12 Thread David Kastrup
Jaime T  writes:

> http://lilypond.org/doc/v2.19/Documentation/notation/file-structure
> (NR, section 3.1.5 "File structure") says:
>
> ...A file containing only "{ c'4 d' e'2 }" will be translated into:
>
> \book {
>   \score {
> \new Staff {
>   \new Voice {
> { c'4 d' e'2 }
>   }
> }
> \layout { }
>   }
>   \paper { }
>   \header { }
> }
>
> Is there any way I can get lilypond to output and show me the final
> version of my input i.e. *after* lilypond has included all these
> necessary implicit additions to my source input?

No.  LilyPond does not actually add anything to the input.  It just
processes partial forms of input differently from complete forms so that
it has the equivalent effect of some comparatively complete form.

Of course, you can try to write up a replacement for all of LilyPond's
processing that does output the equivalent input for all the available
options of arranging input.

But it does not gain you any insights into LilyPond's operation because
LilyPond does not actually work in that way.

> I'd love to be able to see exactly what goes into the engraver's
> front-end (and I'm sure that it's often *not* the same as what is in
> my .ly "source"!)

Well, LilyPond's idea of an "engraver" is a lot different from yours,
apparently, so it's anyone's guess what you even mean by "the engraver's
front-end".

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user