Hi all,

thanks to the feedback on this list I reviewed the interface to my \annotate function and think it has become quite elegant now. Please have a look at the attached file and at the updated description on https://github.com/openlilylib/lilypond-doc/wiki/Documenting-musical-content I'm interested in any caveats, enhancement suggestions, and/or further use cases.

This is only the starting point for a potentially interesting project, so anybody who's interested joining and helping me is highly welcome.

Urs

Am 06.06.2013 12:09, schrieb Urs Liska:
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


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

% Develop the interface to \annotate
% See 
https://github.com/openlilylib/lilypond-doc/wiki/Documenting-musical-content 
for discussion

\version "2.17.18"

annotate = 
#(define-music-function (parser location properties item)
   (ly:context-mod? symbol-list-or-music?)
   ;; annotates a musical object for use with lilypond-doc
   
   ; Dummy coloring
     #{ 
       \tweak color #magenta #item
     #}
   )

% Usage examples

\relative g' {
  % default call with specified grob
  \annotate \with {
    type = "critical remark"
    context = "vc1"
    author = "Urs Liska"
    date = "2013-06-06"
    message = "Tenuto added as in Vc. 2"
  }
  Script
  g1-- |
  
  % default call without specified grob (defaults to NoteHead (?))
  \annotate \with {
    type = "question"
    source = "MS2"
    message = "Ms. 2: b flat"
  }
  a4 b 
  
     % postfix call
     c-\annotate \with {
      type = "todo"
      message = "Improve tie engraving"
    }
    ~ 
    c 
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to