Hi all, In a recent piece I've had occasion to produce a trill mark with an accidental above, and stealing from the manual, I came up with
g4(^\markup{ \tiny \center-column { \flat \musicglyph #"scripts.trill" } for example. As this cropped up more than once I thought it would be a good idea to write a music function: trillflat = #(define-music-function (parser location note) (ly:music?) #{$note^\markup{ \tiny\center-column{ \flat \musicglyph #"scripts.trill" }} ) But the parser/lexer gets upset with the ^ and I suspect it doesn't like the # between the '#{' and '#}'. If I could find the routine that translates the note into scheme make-music call I could do something like #(define (make-a-script x) (make-music 'TextScriptEvent 'direction 1 'text x)) #(define (add-script m x) (set! (ly:music-property m 'elements) (cons (make-a-script x) (ly:music-property m 'elements))) #(define add-flat-trill m) (add-script m (markup #:line (#:tiny (#:center-column (#:flat #:musicglyph "scripts.trill")))))) #( define-music-function (parser location note) (ly:music?) (let (m ly:whatever($note) ; ^^^^^^^^^^^ ; Is there a real lily routine I can use here? ; (add-flat-trill (m) ) ) Is there a real procedure callable from scheme to turn g4 or whatever into: (make-music 'SequentialMusic 'elements (list (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch 0 4 0)))))) so I can modify it with the add-flat-trill routine? Any suggestions so I can have some reusable code to define a modified trill are welcome. Cheers, Ian _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user