Hi,

I want to develop a 'lilypond-doc' package that can be used to
a) document the API of a project or a library and
b) document the musical content of lilypond scores.

You can see an overview of its goals on https://github.com/openlilylib/lilypond-doc/wiki

I urgently need at least the function signature of the core function of b) in order to be able to use it in an existing score, even when I haven't implemented the functionality yet.

As I think this can become a valuable extension and I'd like to see it in LilyPond proper one day I'd like to discuss it on this list before actually starting to work.

On https://github.com/openlilylib/lilypond-doc/wiki/Documenting-musical-content you'll find a quite detailed description what I think the function should look like, attached you'll find an example file showing how I'd use it in a score.

I'm interested in
- general thoughts on the signature design (as I still lack experience with Scheme functions) - more or different use cases, especially if they'd suggest changes in the signature design

Best
Urs
% Test file to develop the interface to \annotate
% See https://github.com/openlilylib/lilypond-doc/wiki/Documenting-musical-content for discussion

\version "2.17.18"

% Plain signature of the function draft
annotate = 
#(define-void-function (parser location grob type properties annotation)
   (string? string? list? string?)
   )

\relative ges, {
  \key ges \major
  \clef bass
  \time 3/4
  
  \repeat tremolo 24 ges32-> -\markup { \dynamic "sfz" } \p \< | 
  \annotate Script "critremark"
  #'(("voice" . "vc1")
     ("source" . "Ms. 2")
     ("author" . "Urs Liska")
     ("date" . "2013-06-06"))
  "Tenuto added as in Vc. 2"
  ges4-- \p 
    r r |
  r4 r 
    \annotate Hairpin "engraving"
      #'(("voice" . "vc1"))
      "Hairpin is too short (smashed)!"    
    f'( \( \p \< |
    \annotate Hairpin "followup"
      #'(("author" . "John Doe")
         ("date" . "May"))
      "I will take care of that ASAP"
  ges2.)~ \! | 
  ges4\> f e |
  f2.~ \p |
  f2 es4 |
  d2. \)|
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to