[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LSR categories
From: |
Graham Percival |
Subject: |
Re: LSR categories |
Date: |
Wed, 24 Jan 2007 03:50:00 -0800 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
Mats Bengtsson wrote:
Why is scheme programming so special? If I, as an ordinary user, want to
solve
a certain typesetting problem, I mostly don't have any idea if the
solution requires
Scheme programming or not and at least as long as the solution can be
copy/pasted
into my own file as it is, I wouldn't care.
I'm not talking about things like this:
date = #(strftime "%d-%m-%Y" (localtime (current-time)))
I was previously thinking about putting that in a special directory for
security reasons -- since we don't use lilypond --safe to build the web,
we don't want random scheme code in random files that are imported
semi-automatically from user-editable sources.
However, we can avoid this problem by running lilypond--safe on the
files whenever they are added (or modified) to the git tree. So this is
no longer a concern.
What you probably have in mind is good examples to learn Scheme
programming,
but unless these examples are very contrived they will also solve some
practical
typesetting problem.
Yes. If I'm a normal user looking for help on articulations, do I want
to see the below example? OTOH, if I'm an advanced user looking for
help on scheme programming, do I want to browse through all the
categories to find examples like this? (ok, an advanced user would
probably search LSR directly... but IMO, it would be still be nice to
have a collection of these scheme examples on the website)
#(define (make-script x)
(make-music 'ArticulationEvent
'articulation-type x))
#(define (add-script m x)
(if
(equal? (ly:music-property m 'name) 'EventChord)
(set! (ly:music-property m 'elements)
(cons (make-script x)
(ly:music-property m 'elements))))
m)
#(define (add-staccato m)
(add-script m "staccato"))
\score {
\relative c'' {
a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c }
}
\layout{ raggedright = ##t }
}
- LSR categories, Graham Percival, 2007/01/24
- Re: LSR categories, yota moteuchi, 2007/01/24
- Re: LSR categories, Bertalan Fodor, 2007/01/24
- Re: LSR categories, Mats Bengtsson, 2007/01/24
- Re: LSR categories, Graham Percival, 2007/01/24
- Re: LSR categories, Han-Wen Nienhuys, 2007/01/24
- Re: LSR categories, Han-Wen Nienhuys, 2007/01/24
- Re: LSR categories, Graham Percival, 2007/01/24
- Re: LSR categories, Han-Wen Nienhuys, 2007/01/24
- Re: LSR categories, Mats Bengtsson, 2007/01/24
- Re: LSR categories,
Graham Percival <=
- Re: LSR categories, Graham Percival, 2007/01/24