On Fri, Apr 3, 2015 at 1:28 PM, Mattes <r.mat...@mh-freiburg.de> wrote:
> > Am Freitag, 03. April 2015 20:15 CEST, Urs Liska <u...@openlilylib.org> > schrieb: > > > > > > > Am 03.04.2015 um 19:45 schrieb Kevin Barry: > > > > > > On Fri, Apr 3, 2015 at 2:23 PM, Urs Liska <u...@openlilylib.org > > > <mailto:u...@openlilylib.org>> wrote: > > > > > > I'll note that for explaining in a blog post because it seems like > > > a good example for demonstrating the relation between Scheme and > > > LilyPond variables and the role of symbols. > > > > > > Maybe it fits into a post I've just started to plan (explaining > > > what "#(define-music-function" actually means). > > > > > > > > > I would be very interested to read it. I have figured out over time > > > what kind of things tend to work and which things don't (when it comes > > > to variables and substitution) but I don't always understand why, for > > > example `t = \tuplet' doesn't work, but `#(define t tuplet)' does. > > Well, think of it like this (slightly oversimplified): > > 'tuplet' is a lilypond function, '\' will _call_ this function. > Let's quickly check that: > > guile> tuplet > #<Music function #<procedure #f (parser location ratio tuplet-span > music)>> > > If you do '#(define t tuplet)' 't' will have the same value as 'tuplet': > > guile> (define t tuplet) > guile> t > #<Music function #<procedure #f (parser location ratio tuplet-span > music)>> > > If you write: > > t = \tuplet > > 't' would have the value of calling 'tuplet' . > and thus you will get errors because _calling_ tuplet requires arguments t = \tuplet 3/2 { c d e } % works just fine -DN
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user