[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compound time signatures
From: |
Pedro Kröger |
Subject: |
Re: Compound time signatures |
Date: |
Wed, 31 Aug 2005 23:46:26 -0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Graham Percival <address@hidden> writes:
> How does let* work? I mean, how would I modify
> (define hmoveDivOne
> (if (equal? divone "16")
> 0.6
> 0.0))
>
> to use let* instead of define? (simple replacement produced an error)
In this case let* isn't necessary. let is used to define local variables
while let* is used to create local variables in sequence (e.g. when you
need to use a just defined local variable inside a subsequent local
variable). this should do it:
#(define (compound-time grob one two divone divtwo)
(let ((hmoveDivOne
(if (equal? divone "16")
0.6
0.0))
(hmoveDivTwo
(if (equal? divtwo "16")
0.6
0.0))
(hmoveLastCol
(if (equal? divtwo "16")
-0.6
-0.3)))
(interpret-markup
(ly:grob-layout grob)
'(((baseline-skip . 2)
(word-space . 1.5)
(font-family . number)))
(markup
#:line ( #:column ((#:translate (cons hmoveDivOne 0) one) divone)
#:lower 1 (#:translate (cons hmoveDivOne 0) "+")
(#:translate (cons hmoveLastCol 0)
#:column ((#:translate (cons hmoveDivTwo 0)
two) divtwo)))))))
Cheers,
Pedro