Mats Bengtsson <[EMAIL PROTECTED]> writes: > Trent Johnston wrote: > >>Sorry I should have been a bit more specific before... >> >>I tried using >> >>manBeam = #(define-music-function (parser location beg end) (number? >>number?) >> #{ \once \override Beam #'positions = #'($beg . $end) #} ) >>
> Nicolas recently answered a closely related question. > One solution should be to replace > #'($beg . $end) > by > (cons $beg $end) To Trent: You need to understand that a scheme form preceded by a quote (that's called a quoted form) is not evaluated. Thus, something like '(var1 . var2) evaluates to that, (var1 . var2), eg a cons cell containing two symbols, var1 and var2. But what you want is a cons cell with two numbers, the value of the variables var1 and var2. So you should not quote the form, so that the variables should be evalutated. Instead, you make the cons cell using the function `cons': (cons var1 var2) ==> (3 . 6) supposing that var1 and var2 respectively evaluate to 3 and 6. manBeam = #(define-music-function (parser location beg end) (number? number?) #{ \once \override Beam #'positions = #(cons $beg $end) #}) \manBeam #3 #6 or: manBeam = #(define-music-function (parser location beg-end) (cons?) #{ \once \override Beam #'positions = #$beg-end #}) \manBeam #'(3 . 6) \manBeam #(cons 3 6) nicolas _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user