[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Scheme
From: |
Trent Johnston |
Subject: |
Re: Using Scheme |
Date: |
Fri, 12 May 2006 18:20:08 +1000 |
Thanks for your help Paul, but I was actually looking at Beam settings
a way to simplify \once \override Beam #'positions = #'( number . number )
I used the padText as an example but couldn't get it to work with the above
example...
Trent
----- Original Message -----
From: "Paul Scott" <address@hidden>
To: "Trent Johnston" <address@hidden>; <address@hidden>
Sent: Friday, May 12, 2006 5:32 PM
Subject: Re: Using Scheme
| Paul Scott wrote:
| > Trent Johnston wrote:
| >> Hello,
| >>
| >> I was wondering if someone could help me in using scheme to make a
| >> short cut.
| >>
| >> I'm trying to simplify:
| >>
| >> \once \override Beam #'positions = #'( number . number )
| >>
| >> using a shortcut say \manBeam and specify the numbers beginning and
| >> ending beam height. I want to use this to alter the height of beams
| >> that have accidentals in them or lengthen some shorter beams.
| >>
| >> In 5.4 Advanced tweaks with scheme gives some information about using
| >> only the one variable as in the padText example.
| > I'm not sure what corresponds to that in the 2.8.2 manual
| The online manual I was browsing just changed and now looks line the one
| you were referring to and I see that section.
|
| > but padText may exist because of help I got from Nicolas Sceaux. Here
| > is my code for textPad. You might be able to create what you want
| > from this:
| >
| > #(use-modules (ice-9 optargs))
| > #(define* (textPad padding #:optional once?)
| > (ly:export ; this is necessary for using the expression
| > ; directly inside a block
| > (if once?
| > #{ \once \override TextScript #'padding = #$padding #}
| > #{ \override TextScript #'padding = #$padding #})))
| This suggests I should be able to simplify my (Nicolas') code as per the
| manual.
|
| To possibly help with your question 'padding' in the first line
|
| padText = #(define-music-function (parser location padding) (number?)
|
| indicates a numerical variable as reinforced by the '(number?)'
| You can add more variables (say var2) by adding it/them after the position
of 'padding'
| and changing (number?) to (number? number? ... )
|
| var2 would be referred to in the code as $var2
|
| HTH
|
| I don't time to do any more for a day or two.
|
| Paul
|
|
- Using Scheme, Trent Johnston, 2006/05/12
- Re: Using Scheme, Paul Scott, 2006/05/12
- Re: Using Scheme, Paul Scott, 2006/05/12
- Re: Using Scheme, Mats Bengtsson, 2006/05/12
- Re: Using Scheme, Nicolas Sceaux, 2006/05/12
- Re: Using Scheme, Graham Percival, 2006/05/13
- Re: Using Scheme, Nicolas Sceaux, 2006/05/13
- Re: Using Scheme, Trent Johnston, 2006/05/14
- Re: Using Scheme, Graham Percival, 2006/05/14