X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fextending%2Fscheme-tutorial.itely;h=4c180538f5e9ed8246bfbb821063fdb0341f825d;hb=1d509b27723ea1c359b51c0f2fe623a32867d6f9;hp=4745e9449e56631b276331725039b056504c8450;hpb=50021d989fdbfa991ffab81215edabc0e7e6ce41;p=lilypond.git diff --git a/Documentation/extending/scheme-tutorial.itely b/Documentation/extending/scheme-tutorial.itely index 4745e9449e..4c180538f5 100644 --- a/Documentation/extending/scheme-tutorial.itely +++ b/Documentation/extending/scheme-tutorial.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.12.0" +@c \version "2.14.0" @node Scheme tutorial @chapter Scheme tutorial @@ -28,9 +28,9 @@ Scheme. If you want to know more about Scheme, see @uref{http://@/www@/.schemers@/.org}. LilyPond uses the GNU Guile implementation of Scheme, which is -based on the Scheme @qq{R5RS} standard. If you are learning Scheme +based on the Scheme @qq{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 +referring to a different standard) is not recommended. Information on guile can be found at @uref{http://www.gnu.org/software/guile/}. The @qq{R5RS} Scheme standard is located at @uref{http://www.schemers.org/Documents/Standards/R5RS/}. @@ -68,7 +68,7 @@ Scheme. On most systems you can experiment in a Scheme sandbox by opening a terminal window and typing @q{guile}. On some systems, notably Windows, you may need to set the environment variable @code{GUILE_LOAD_PATH} to the directory @code{../usr/shr/guile/1.8} -in the LilyPond installation. For the full path to this directory +in the LilyPond installation. For the full path to this directory see @rlearning{Other sources of information}. Alternatively, Windows users may simply choose @q{Run} from the Start menu and enter @q{guile}. @@ -148,7 +148,7 @@ and False is @code{#f}. @item Numbers Numbers are entered in the standard fashion, -@code{1} is the (integer) number one, while @code{-1.5} is a +@code{1} is the (integer) number one, while @w{@code{-1.5}} is a floating point number (a non-integer number). @item Strings @@ -609,7 +609,7 @@ guile> (cond ((< a b) "a is less than b") @subsection LilyPond Scheme syntax The Guile interpreter is part of LilyPond, which means that -Scheme can be included in LilyPond input files. The hash mark @code{#} +Scheme can be included in LilyPond input files. The hash mark@tie{}@code{#} is used to tell the LilyPond parser that the next value is a Scheme value. @@ -640,7 +640,7 @@ as follows: @end example For the rest of this section, we will assume that the data is entered -in a music file, so we add @code{#}s at the beginning of each Scheme +in a music file, so we add@tie{}@code{#}s at the beginning of each Scheme expression. All of the top-level Scheme expressions in a LilyPond input file can @@ -766,7 +766,7 @@ been written as Scheme code is evaluated as soon as the parser encounters it. To define some Scheme code in a macro (to be called later), use -@ref{Void functions}, or +@ref{Void scheme functions}, or @example #(define (nopc) @@ -780,7 +780,7 @@ define some Scheme code in a macro (to be called later), use @knownissues Mixing Scheme and LilyPond variables is not possible with the -@code{--safe} option. +@option{--safe} option. @node Object properties @@ -824,7 +824,7 @@ while @code{twentyFour} is a variable. @subheading Offsets Two-dimensional offsets (X and Y coordinates) are stored as @code{pairs}. -The @code{cdr} of the offset is the X coordinate, and the @code{cdr} is +The @code{car} of the offset is the X coordinate, and the @code{cdr} is the Y coordinate. @example @@ -1006,6 +1006,10 @@ containing a @code{NoteEvent} object (storing the duration and pitch properties) and any extra information (in this case, an @code{AbsoluteDynamicEvent} with a @code{"f"} text property. +@funindex{\void} +@code{\displayMusic} returns the music it displays, so it will get +interpreted as well as displayed. To avoid interpretation, write +@code{\void} before @code{\displayMusic}. @node Music properties @subsection Music properties @@ -1135,7 +1139,7 @@ Now we examine the input, @end example So in our function, we need to clone this expression (so that we -have two notes to build the sequence), add @code{SlurEvents} to the +have two notes to build the sequence), add a @code{SlurEvent} to the @code{'elements} property of each one, and finally make a @code{SequentialMusic} with the two @code{EventChords}.