Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Adding extra fingering with Scheme
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
You can add additional elements to notes using <code>map-some-music</code>. In this example, an extra script is attached to a note (or a chord). In general, you should first apply <code>\displayMusic</code> to music similar to what you want to create so that you can see its structure. This can be then used as template for your Scheme code. <lilypond version="2.24"> addScript = #(define-music-function (script music) (ly:event? ly:music?) (map-some-music (lambda (mus) (define (append-script-at! prop) (set! (ly:music-property mus prop) (append (ly:music-property mus prop) (list (ly:music-deep-copy script)))) mus) (case (ly:music-property mus 'name) ((EventChord) (append-script-at! 'elements)) ((NoteEvent) (append-script-at! 'articulations)) (else #f))) music)) { \addScript _6 { c'4-3 <c' e' g'> } } </lilypond> [[Category:Scheme]] [[Category:Included in the official documentation]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)