lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme function to affect a compound music expression?


From: Robin Bannister
Subject: Re: Scheme function to affect a compound music expression?
Date: Fri, 24 Oct 2014 11:05:21 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Peter Crighton wrote:

But I would like to be able to use the function [...]
 > so it doesn’t only affect the next note,
 > but a sequence of notes enclosed in { … }:


The source file music-functions.scm defines
music-map
which you can use for this:


bgr = #(define-music-function (parser location music) (ly:music?)
   (music-map (lambda (note)
     #{
       \tweak NoteHead.font-size #-2
       \tweak Accidental.font-size #-2
       #note
     #})
     music ))


There is an advanced example in the regression tests:
http://www.lilypond.org/doc/v2.18/input/regression/collated-files.html#music-map.ly


Cheers,
Robin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]