[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposals for LM B. Scheme tutorial

From: Jonathan Kulp
Subject: Re: proposals for LM B. Scheme tutorial
Date: Sat, 20 Jun 2009 15:58:37 -0500
User-agent: Thunderbird (X11/20090409)

Graham Percival wrote:

- Graham

+1! Thanks for helping everyone else learn from your experience. (and for your sweet scheme hacks!)


On Sat, Jun 20, 2009 at 01:17:02PM -0700, Mark Polesky wrote:
Here are some proposed additions to LM B. Scheme tutorial

These are things that I wished I knew when I was starting! I
haven't made a patch because I want to get feedback from you guys
- Mark

***(I'm leaving this paragraph as it is)
LilyPond uses the Scheme programming language, both as part of the
input syntax, and as internal mechanism to glue modules of the
program together. This section is a very brief overview of
entering data in Scheme. If you want to know more about Scheme,

***new paragraph:
LilyPond uses the GNU Guile implementation of Scheme, which is
based on the Scheme "R5RS" standard. If you are learning Scheme to
use with LilyPond, working with a different implementation (or
referring to a different standard) is not recommended. Information
on guile can be found at The
"R5RS" Scheme standard is located at

***back to current:
The most basic thing of a language is data: numbers, character
strings, lists, etc. Here is a list of data types that are
relevant to LilyPond input.
...jump a bit...

In a music file, snippets of Scheme code are introduced with the
hash mark #. So, the previous examples translated in LilyPond are

    ##t ##f
    #1 #-1.5
    #"this is a string"
    a string"

***new paragraph and example:
Multiple consecutive scheme expressions in a music file can be
combined using the *begin* operator. This reduces the number of
hash marks to one. However, within such a combined expression,
LilyPond comments ("%" and "%{ %}") will produce errors.


    (define foo 0)
    (define bar 1)


***new sentence and example:
Comments in Guile Scheme are entered as follows:

    ; this is a single-line comment

    this a (non-nestable)
    guile-style block comment

***back to current:
For the rest of this section, we will assume that the data is
entered in a music file, so we add #s everywhere.


...and maybe at the end, some info regarding using the display
function within a music file to emulate a guile "sandbox".
See the thread at:

Jonathan Kulp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]