TODO
-need to rethink paper size stuff?
-
pipethrough(date) sucks.
paragraphs have too much space.
-instead <-> instead
)
COMMENT(
- Mainly written by Han-Wen Nienhuys,
+ Mainly written by Han-Wen Nienhuys,
- with help of (among others)
+ with help of (among others)
- * Jan Nieuwenhuizen
+ * Jan Nieuwenhuizen
- * Lambert Meertens,
+ * Lambert Meertens,
- * Adrian Mariano
+ * Adrian Mariano
- * Mats Bengtsson
+ * Mats Bengtsson
)
specification that you, the user, supply. Using LilyPond may be a bit
quaint in the beginning, because you have to give that specification
using a em(language). This document is a gentle introduction to that
-language, which is called Mudela.
+language, which is called Mudela, an abbreviation for Music Definition
+Language.
-We will demonstrate the working of Mudela by presenting a examples of
+We will demonstrate the working of Mudela by presenting examples of
input alongside with the resulting output. We will comment on these
examples using English terms for notation, so if you are not familiar
with these terms, you should consult the glossary that is distributed
label(sec:firsttune)
To demonstrate what LilyPond input looks like, we start off with a
-full fledged (yet simple) example. It is somewhat convoluted version
+full fledged, yet simple, example. It is somewhat convoluted version
of one of the menuets in bind(J.)bind(S.)Bach's em(Clavierbuchlein).
mudela(verbatim)(
% lines preceded by a percent are comments.
\include "paper16.ly"
\score {
- \notes % let's start music
- \relative c'' { % octave quotes are relative now
- \key G;
- \time 3/4; % set the time signature.
-
- d4 [g,8 a b c] d4 g, g |
- e'4 [c8 d e fis] g4 g, g |
- c4 [d8( )c b a( ] )b4 [c8 b a g] |
- a4 [b8 a g fis] g2. |
-
- \bar ":|"; % a repeat sign
-
-
- b'4 [g8 a b g]
- a4 [d,8 e fis d] |
- g4 [e8 fis g d] cis4 [b8 cis] a4 |
- [a8-. b-. cis-. d-. e-. fis-. ] % try some super and subscripts.
- g4 fis e |
- fis a, r8 cis8
- d2.-\fermata
- \bar "|.";
+ \notes
+ \relative c'' {
+ \key g;
+ \time 3/4;
+
+ d4 [g,8 a b c] d4 g, g |
+ e'4 [c8 d e fis] g4 g, g |
+ c4 [d8( )c b a( ] )b4 [c8 b a g] |
+ a4 [b8 a g fis] g2. |
+
+ \bar ":|";
+
+ b'4 [g8 a b g]
+ a4 [d,8 e fis d] |
+ g4 [e8 fis g d] cis4 [b8 cis] a4 |
+ [a8-. b-. cis-. d-. e-. fis-. ]
+ g4 fis e |
+ fis a, r8 cis8
+ d2.-\fermata
+ \bar "|.";
}
\paper {
- linewidth = 10.0 \cm; % standard settings are too wide for a book
+ linewidth = 14.0 \cm; % standard settings are too wide for a book
}
})
it with LilyPond and view the output. Details of this procedure may
vary from system to system. On a Unix system, you should enter the
input in a file ending in file(.ly), such as file(menuet.ly). To
-create the output, one would issue
-verb(
- ly2dvi menuet
-)
-file(ly2dvi) is a little program that does the job of calling the LilyPond
-and
-TeX() and adjusting page margins.
-
-If all goes well, this will create the output file file(menuet.dvi).
-To view this output, isssue the command
-verb(
- xdvi menuet
-)
+create the output, one would issue code(ly2dvi menuet).
-[running on W32?]
+file(ly2dvi) is a little program that does the job of calling the
+LilyPond and TeX() and adjusting page margins.
-Now for some explanation of the input itself, we will dissect the
-input line by line
+If all goes well, this will create the output file file(menuet.dvi).
+To view this output, issue the command code(xdvi menuet). Now that we
+are familiar with the procedure to view the output, we will analyse
+the input itself, line by line.
-verb(% lines preceded by a percent are comments.)COMMENT
+verb(% lines preceded by a percent are comments.)COMMENT(
)The percent sign (code(%)) introduces a line comment. If you want
make larger comments, you can use block comments. These are delimited
music. The music is combined with the output directions by putting
them into a code(\score) block.
verb(
- \notes % get ready for notes
+ \notes
) COMMENT(
)This makes LilyPond ready for accepting notes.
verb(
- \relative c'' % octave quotes are relative now
-)
-As we will see, pitches are combinations of octave, note name and
-chromatic alteration. In this scheme, the octave is indicated by using raised
-quotes (') and lowered" quotes (commas: code(,)). The central C is denoted
-by code(c'). The C one octave higher is code(c''). One and two
-octaves below central C is denoted by code(c) and code(c,)
-respectively.
+ \relative c''
+)COMMENT(
+
+) As we will see, pitches are combinations of octave, note name and
+chromatic alteration. In this scheme, the octave is indicated by
+using raised quotes (`code (')') and ``lowered'' quotes (commas:
+`code(,)'). The central C is denoted by code(c'). The C one octave
+higher is code(c''). One and two octaves below central C is denoted
+by code(c) and code(c,) respectively.
If you have to indicate the pitches in a long piece that is written in
either a high or very low octave, you would have to type very many
high-quote an extra octave is added. The lowered quote will substract
an octave. Because the first note obviously has no predecessor, you
have to give the (absolute) pitch of the note to start with.
+COMMENT(
-verb(
+)verb(
{ % sequential music follows
-) COMMENT(
+)COMMENT(
) The brace indicates that what follows is sequential music, i.e.,
notes that are to be played and printed after each other. This is in
verb(
- \time 3/4; % set the time signature.
+ \time 3/4; % set the time signature.
) COMMENT(
) This command changes the time signature of the current piece: this
prints a 3/4 sign. The 3/4 value is also used to generate bar lines
in the right spots.
verb(
- \key G;
+ \key g;
) COMMENT(
) This command changes the current key to G-major. Although
output, the key comes before the time signature: LilyPond knows about
music typesetting conventions.
verb(
- d4
+ d4
) COMMENT(
) This is a code(d) note. The relative music was started with a
-code(c''), the real pitch of this note is code(d''). The 4 is
-designates the duration of the note (it is a quarter note).
-verb(
- [g,8
-)
-The open bracket starts a beam. This bracket is connected to the
-following note, which is an eighth pitch code(g') (remember relative mode)
-verb(
- a b
-)
-These are notes with pitch code(a') and code(b'). Because their
+code(c''), the real pitch of this note is code(d''). The 4
+designates the duration of the note (it is a quarter note). COMMENT(
+
+)verb(
+ [g,8
+)COMMENT(
+
+)The open bracket starts a beam. This bracket is connected to the
+following note, which is an eighth with pitch code(g') (remember
+relative mode for pitches!)
+COMMENT(
+
+)verb(
+ a b
+)COMMENT(
+
+)These are notes with pitch code(a') and code(b'). Because their
duration is the same as the code(g), there is no need to enter the
duration (It is not illegal to enter it anyway. Then you would have
to enter code(a8 b8))
-verb(
- c]
+COMMENT(
+
+)verb(
+ c]
) COMMENT(
-) This ends the beam started four notes earlier, at the code(g). In the output,
-you will notice a measure bar following this note. You do not have to
-enter anything to make LilyPond create a bar. Instead Lily deduce
-where bars have to be by comparing durations of notes with the current
-time signature.
-verb(
- d4 g, g |
+) This ends the beam started four notes earlier, at the code(g). In
+the output, you will notice a measure bar following this note. You do
+not have to enter anything to make LilyPond create a bar. Instead
+Lily will deduce where bars have to be by comparing durations of notes with
+the current time signature. COMMENT(
+
+)verb(
+ d4 g, g |
) COMMENT(
) Three more notes: The code(|) is a "barcheck". When processing the
music, LilyPond will check that barchecks are found at the start of
a bar precisely. This makes it easy to spot where notes are forgotten.
verb(
- e'4 [c8 d e fis]
+ e'4 [c8 d e fis]
) COMMENT(
) So far, no notes were chromatically altered. Here is the first one
sharp sign in the output. The program keeps track of key signatures,
and will only print accidentals if they are needed.
verb(
- c4 [d8( )c b a( ] )b4 [c8 b a g] |
+ c4 [d8( )c b a( ] )b4 [c8 b a g] |
) COMMENT(
) The next line shows something new: a slur is a symbol that is
see, the brackets and parentheses do not have to nest.
verb(
- a4 [b8 a g fis] g2. |
+ a4 [b8 a g fis] g2. |
) COMMENT(
) A duration that is to be augmented with a duration dot, is notated
-with a number followed by periods, as many as you want augmentation
-dots.
-verb(
- \bar ":|"; % a repeat sign
+with a duration number followed by periods, as many as you want
+augmentation dots.COMMENT(
+
+)verb(
+ \bar ":|"; % a repeat sign
) COMMENT(
)
This line shows that Lily will print an accidental if that is needed:
the first C sharp will be printed with an accidental, the second without.
verb(
- [a8-. b-. cis-. d-. e-. fis-. ] % try some super and subscripts.
+ [a8-. b-. cis-. d-. e-. fis-. ] % try some super and subscripts.
) COMMENT(
)
There is more to music than just pitches and rhythms. An important
aspect is articulation. You can enter articulation signs either in an
-abbreviated form, e.g., by using code(-.) for staccato as shown above.
+abbreviated form, by a dash and the the character for the
+articulation to use, e.g. code(-.) for staccato as shown above.
+COMMENT(
-verb(
- fis a, r8 cis8
+)verb(
+ fis a, r8 cis8
) COMMENT(
)
Rests are denoted by the special notename code(r). You can also make
an invisible rest by using the special notename code(s).
verb(
- d2.-\fermata
+ d2.-\fermata
) COMMENT(
-) Finally, all articulations has a verbose form, like code(\fermata).
+) Finally, all articulations have a verbose form, like code(\fermata).
The ``command'' COMMENT(Hi Adrian :-) code(\fermata) is not part of
the core of the language (most of the other discussed elements are),
but it is an abbreviation of a more complicated description of a
called an em(identifier).
verb(
- }
+ }
) COMMENT(
)
This ends the sequential music.
verb(\paper {
- linewidth = 10.0\cm;
+ linewidth = 10.0\cm;
})
This specifies a conversion from music to notation output. Most of
the details of this conversions (font sizes, dimensions, etc.) have
(approximately 4 inches).
verb(
- }
+ }
)
Finally, the last brace ends the code(\score) block.
capture the meaning of em(music), and not notation. Therefore the
format contains musical concepts like pitches and durations, instead
of symbols and positions. Second, the format tries to be
-em(context-free): a note will remain to sound the same regardless of
-the current time signature, the key nop(etc.)COMMENT(footnote The
-code(\relative) mode is a concession to this, but a )
-
+em(context-free): a note will sound the same regardless of the current
+time signature, the key nop(etc.)
The purpose of LilyPond informally is explained by the term `music
typesetter'. As you may have figured out by now, this is not a really
prettier output by using LilyPond.
-As you can see, the most interesting parts of the input is music
+As you can see, the most interesting part of the input is music
itself, in this case the sequence of notes. We will therefore focus
on entering music for now. Consequently, when we mean
verb(\score {
- \notes { XXXX }
+ \notes { XXXX }
\paper { }
})COMMENT(
-) we will leave out the the repetitive details and just print
+) we will leave out the the repetitive details for now and just print
code(XXXX).
\notes {
c'\longa c'\breve
c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64 c'2. c'8. c'16
- }
- \paper {
- linewidth = -1.0;
- \translator { \type "Score_engraver";
- \name "Score";
- \consists "Note_heads_engraver";
- \consists "Stem_engraver";
- \consists "Rhythmic_column_engraver";
- }}}
-
+ }
+ \paper {
+ linewidth = -1.0;
+ \translator { \type "Score_engraver";
+ \name "Score";
+ \consists "Note_heads_engraver";
+ \consists "Stem_engraver";
+ \consists "Rhythmic_column_engraver";
+ }}}
+
)
subsect(Basic pitches)
non-English convention for entering altered pitches: a note is made
sharp by adding the suffix `--is' to its name, and flat by adding the
suffix `--es'. For a double sharp another `--is' suffix is added, for
-flats another `--es' suffix. The names for the alterations of C are
-given in bind(Table)ref(notename-tab).
+flats another `--es' nop(suffix.) footnote(Variations on this
+convention are used in a number of germanic languages, notably Dutch,
+German, Swedish, and Norwegian.) The names for the alterations of C
+are given in bind(Table)ref(notename-tab).
latexcommand(\begin{table}[h])
center(
label(notename-tab)
latexcommand(\end{table})
-Variations on this convention are used in a number of germanic
-languages, notably Dutch, German, Swedish, and Norwegian.
-
Throughout this document we will continue to use these names.footnote(
Mudela defaults to Dutch notenames. To make (Dutch) pronunciation
easier, the a-flat and e-flat are contracted to code(as) and
code(es). Similarly, the a double flat and e double flat are
contracted to code(ases) and code(eses). For consistency, the dutch
names also include code(aes), code(aeses), code(ees) and
- code(eeses)) consistency
+ code(eeses))
If you are not comfortable with these names, you can make your own.
Note names for different languages are included with the example
}
)
+There is one thing to note, in sequences of chords, the (relative)
+pitch of a is taken with reference to the first note of the previous
+chord.
+
You can nest simultaneous and sequential music in any way you want,
-e.g.,
-mudela(verbatim,fragment)(
- < { g''4 g''4 }
- { c'8 <c' e'> c' <c' e'> } >
+e.g., COMMENT(
+
+)mudela(verbatim,fragment,center)(
+ < { g''4 g''4 }
+ { c'8 <c' e'> c' <c' e'> } >
+)COMMENT(
+
)
As you can see, LilyPond has some difficulty typesetting this
elegantly. To adequately solve this, you have to persuade LilyPond to
mudela()(
\score{ <
- \property Score.textstyle = typewriter
- \type Staff \notes {
- c''4-.
- c''4--
- c''4-+
- c''4-|
- c''4->
- c''4-^
- }
- \type Lyrics\lyrics {
- "."4 "-" "+" "|" ">" "\^{ }" }
- >
- \paper { linewidth = 12.\cm; }
+ \property Score.textstyle = typewriter
+ \type Staff \notes {
+ c''4-.
+ c''4--
+ c''4-+
+ c''4-|
+ c''4->
+ c''4-^
+ }
+ \type Lyrics\lyrics {
+ "."4 "-" "+" "|" ">" "\^{ }" }
+ >
+ \paper { linewidth = 12.\cm; }
})
Text and digits for fingering can be entered in the same manner: add a
dash and the text or digit to be printed:
mudela(fragment,verbatim)(
c''4-1 g''4-5 c''-"Sul tasto" )
-Currently, the meaning of the
+COMMENT(Currently, the meaning of the
syntax `note-dash-digit/articulation/text' is just ``add a superscript to this
note.'' This is not in line with our goal to em(define) music with
Mudela. We hope that this will be fixed in a future version of the
a caret (code(^)) or an underscore, code(_) instead of the dash:
mudela(fragment,verbatim,center)(
c'4-^ c'4^^ c'''4-^ c'''4_^
-)
+))
Dynamic markings are another way to add a nuance to a note. They are
entered by adding the name for the dynamic sign after the note. You
are variable: they run from one note to another. In LilyPond
terminology, such a symbol is called a em(spanner). To print a
spanner, you have to attach a marker to the note that begins it and to
-the one that ends it.
-
-It is your job to make sure that each spanner that you start, also ends.
-If it doesn't, then Bad Things are likely to happen. If you end
-spanners that are not started, LilyPond will
-warn you about illegal ending markers.
+the one that ends it. These are the spanners that are entered like
+this:
-LilyPond has a few spanners
description(
dit(The slur)
The slur has the opening parenthesis as
to be em(around) the beamed notes. footnote(Strictly speaking, a
beam is not a musical concept: beaming doesn't change the meaning of
music, it only clarifies the rhythmic structure. One might argue that
-beams should not be present in a "music" language. Unfortunately,
+beams should not be present in a ``music'' language. Unfortunately,
LilyPond is not smart enough to insert beams into music on its own.
LilyPond does have code that guesses what the pattern should look
)
+It is your job to make sure that each spanner that you start, also
+ends. If it doesn't, then Bad Things are likely to happen. If you end
+spanners that are not started, LilyPond will warn you about illegal
+ending markers.
+
sect(Commands)
label(sec:commands)
i.e., COMMENT(
)mudela(fragment)(
- <g4 e'4>
+ <g4 e'4>
)COMMENT(
) The Mudela construct for multiple staffs reflects the similarity
) mudela(verbatim,fragment)(
\type GrandStaff <
- \type Staff = treblestaff e'4
- \type Staff = bassstaff { \clef "bass"; g4 }
+ \type Staff = treblestaff e'4
+ \type Staff = bassstaff { \clef "bass"; g4 }
>)COMMENT(
)
verb(
\translator
{
- \type "Line_group_engraver_group";
+ \type "Line_group_engraver_group";
\name Staff ;
\consists "Bar_engraver";
\consists "Time_signature_engraver";
\consists "Staff_symbol_engraver";
- defaultClef = treble;
+ defaultClef = treble;
\accepts "Voice";
}) COMMENT(
-pl8.tca1
+--- ../lilypond-1.1.8/NEWS Sun Nov 22 20:16:26 1998
+++ b/NEWS Sun Nov 22 20:43:39 1998
+@@ -1,3 +1,6 @@
+pl 8.hwn1
+ - tutorial fixes.
+
+ pl 8
+
+ pl7.jcn3pl8.tca1
- changes to mudela-book. Junked fragment and floating options,
added eps option. Options should not stay as long that you get
comfortable with them. ;)
Most of the items are marked in the code as well, with full explanation.
grep for TODO and ugh/ugr/urg
-
BUGS:
-
* gallina barlines.
* latex bla.tex broken (titles / \lilyfooter stuff?)
* space after bars?
* [/3 c8 c16 c c c]/1
-
+
* fix singleStaffBracket
-
+
* repeat bars: need distance after ":|" and before "|:"
* The time signature warnings still remain, will be fixed later.
portato= \script { "portato" 0 -1 0 1 0 }
STUFF
+ * uniformise recent feta contributions.
+
+ * check out legal/(c) matters for scores.
* move option processing out of gh_enter
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=8
-MY_PATCH_LEVEL=tca1
+MY_PATCH_LEVEL=hwn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
(string-append (number->string (car c)) " ")
(string-append (number->string (cadr c)) " ")))
+
+
+(define
+ (font i)
+ (string-append
+ "font"
+ (make-string 1 (integer->char (+ (char->integer #\A) i)))
+ ))
+
+
+
+(define (scm-scm action-name)
+ 1)
+
+;;;;;;;;
+ (define (emptybar h)
+ (string-append ""))
+
+
;;;;;;;; TeX
-;(define (tex action)
-(define (beam-tex width slope thick)
- (embedded-ps-tex ((ps-scm 'beam) width slope thick)))
-(define (bracket-tex h)
- (embedded-ps-tex ((ps-scm 'bracket) h)))
-(define (dashed-slur-tex thick dash l)
- (embedded-ps-tex ((ps-scm 'dashed-slur) thick dash l)))
+(define (tex-scm action-name)
-(define (crescendo-tex w h cont)
- (embedded-ps-tex ((ps-scm 'crescendo) w h cont)))
+ (define (unknown)
+ "%\n\\unknown%\n")
-(define (decrescendo-tex w h cont)
- (embedded-ps-tex ((ps-scm 'decrescendo) w h cont)))
-(define (embedded-ps-tex s)
- (string-append "\\embeddedps{" s "}"))
+ (define (beam width slope thick)
+ (embedded-ps ((ps-scm 'beam) width slope thick)))
+ (define (bracket h)
+ (embedded-ps ((ps-scm 'bracket) h)))
-(define (end-output-tex)
- "\n\\EndLilyPondOutput")
+ (define (dashed-slur thick dash l)
+ (embedded-ps ((ps-scm 'dashed-slur) thick dash l)))
-(define (empty-tex)
- "%\n\\empty%\n")
+ (define (crescendo w h cont)
+ (embedded-ps ((ps-scm 'crescendo) w h cont)))
-(define (experimental-on-tex) "\\turnOnExperimentalFeatures")
+ (define (decrescendo w h cont)
+ (embedded-ps ((ps-scm 'decrescendo) w h cont)))
-(define (extender o h)
- ((invoke-output o "invoke-dim1") "extender" h))
+ (define (embedded-ps s)
+ (string-append "\\embeddedps{" s "}"))
-(define (font-switch-tex i)
- (string-append
- "\\" (font i) "\n"))
-(define (font-def-tex i s)
- (string-append
- "\\font" (font-switch-tex i) "=" s "\n"))
+ (define (end-output)
+ "\n\\EndLilyPondOutput")
-(define (generalmeter-tex num den)
- (string-append
- "\\generalmeter{" (number->string (inexact->exact num)) "}{" (number->string (inexact->exact den)) "}"))
+ (define (empty)
+ "%\n\\empty%\n")
-(define (header-end-tex) "\\turnOnPostScript")
+ (define (experimental-on) "\\turnOnExperimentalFeatures")
-(define (header-tex creator generate)
- (string-append
- "%created by: " creator generate "\n"))
+ (define (extender o h)
+ ((invoke-output o "invoke-dim1") "extender" h))
-(define (invoke-char-tex s i)
- (string-append
- "\n\\" s "{" (inexact->string i 10) "}" ))
+ (define (font-switch i)
+ (string-append
+ "\\" (font i) "\n"))
-(define (invoke-dim1-tex s d)
- (string-append
- "\n\\" s "{" (number->dim-tex d) "}"))
+ (define (font-def i s)
+ (string-append
+ "\\font" (font-switch i) "=" s "\n"))
-(define (lily-def-tex key val)
- (string-append
- "\\def\\" key "{" val "}\n"))
+ (define (generalmeter num den)
+ (string-append
+ "\\generalmeter{" (number->string (inexact->exact num)) "}{" (number->string (inexact->exact den)) "}"))
-(define (number->dim-tex x)
- (string-append
- (number->string (chop-decimal x)) "pt "))
+ (define (header-end) "\\turnOnPostScript")
-(define (placebox-tex x y s)
- (string-append
- "\\placebox{"
- (number->dim-tex y) "}{" (number->dim-tex x) "}{" s "}"))
+ (define (header creator generate)
+ (string-append
+ "%created by: " creator generate "\n"))
-(define (rulesym-tex h w)
- (string-append
- "\\vrule height " (number->dim-tex (/ h 2))
- " depth " (number->dim-tex (/ h 2))
- " width " (number->dim-tex w)
- )
- )
+ (define (invoke-char s i)
+ (string-append
+ "\n\\" s "{" (inexact->string i 10) "}" ))
+ (define (char i)
+ (string-append "\\show{" (inexact->string i 10) "}"))
+
+ (define (invoke-dim1 s d)
+ (string-append
+ "\n\\" s "{" (number->dim d) "}"))
-(define (slur-tex l)
- (embedded-ps-tex ((ps-scm 'slur) l)))
+ (define (lily-def key val)
+ (string-append
+ "\\def\\" key "{" val "}\n"))
-(define (start-line-tex)
- (string-append
- "\\hbox{%\n")
- )
+ (define (number->dim x)
+ (string-append
+ (number->string (chop-decimal x)) "pt "))
-(define (stem-tex kern width height depth)
- (string-append
- "\\kern" (number->dim-tex kern)
- "\\vrule width " (number->dim-tex width)
- "depth " (number->dim-tex depth)
- "height " (number->dim-tex height) " "))
+ (define (placebox x y s)
+ (string-append
+ "\\placebox{"
+ (number->dim y) "}{" (number->dim x) "}{" s "}"))
+
+ (define (rulesym h w)
+ (string-append
+ "\\vrule height " (number->dim (/ h 2))
+ " depth " (number->dim (/ h 2))
+ " width " (number->dim w)
+ )
+ )
+
+ (define (slur l)
+ (embedded-ps ((ps-scm 'slur) l)))
-(define (stop-line-tex)
- "}\\interscoreline")
+ (define (start-line)
+ (string-append
+ "\\hbox{%\n")
+ )
-(define (text-tex f s)
- (string-append "\\set" f "{" s "}"))
+ (define (stem kern width height depth)
+ (string-append
+ "\\kern" (number->dim kern)
+ "\\vrule width " (number->dim width)
+ "depth " (number->dim depth)
+ "height " (number->dim height) " "))
-(define (tuplet-tex dx dy dir)
- (embedded-ps-tex ((ps-scm 'tuplet) dx dy dir)))
+ (define (stop-line)
+ "}\\interscoreline")
+
+ (define (text f s)
+ (string-append "\\set" f "{" s "}"))
+
+ (define (tuplet dx dy dir)
+ (embedded-ps ((ps-scm 'tuplet) dx dy dir)))
+
+ (define (volta w last)
+ (embedded-ps ((ps-scm 'volta) w last)))
+
+ (define (maatstreep h)
+ (string-append "\\maatstreep{" (number->dim h) "}"))
+
+ (cond ((eq? action-name 'all-definitions)
+ `(begin
+ (define beam ,beam)
+ (define tuplet ,tuplet)
+ (define bracket ,bracket)
+ (define crescendo ,crescendo)
+ (define volta ,volta)
+ (define slur ,slur)
+ (define dashed-slur ,dashed-slur)
+ (define decrescendo ,decrescendo)
+ (define empty ,empty)
+ (define end-output ,end-output)
+ (define font-def ,font-def)
+ (define font-switch ,font-switch)
+ (define generalmeter ,generalmeter)
+ (define header-end ,header-end)
+ (define lily-def ,lily-def)
+ (define header ,header)
+ (define invoke-char ,invoke-char)
+ (define invoke-dim1 ,invoke-dim1)
+ (define placebox ,placebox)
+ (define rulesym ,rulesym)
+ (define start-line ,start-line)
+ (define stem ,stem)
+ (define stop-line ,stop-line)
+ (define text ,text)
+ (define experimental-on ,experimental-on)
+ (define char ,char)
+ (define maatstreep ,maatstreep)
+ ))
+
+ ((eq? action-name 'experimental-on) experimental-on)
+ ((eq? action-name 'beam) beam)
+ ((eq? action-name 'tuplet) tuplet)
+ ((eq? action-name 'bracket) bracket)
+ ((eq? action-name 'crescendo) crescendo)
+ ((eq? action-name 'volta) volta)
+ ((eq? action-name 'slur) slur)
+ ((eq? action-name 'dashed-slur) dashed-slur)
+ ((eq? action-name 'decrescendo) decrescendo)
+ ((eq? action-name 'empty) empty)
+ ((eq? action-name 'end-output) end-output)
+ ((eq? action-name 'font-def) font-def)
+ ((eq? action-name 'font-switch) font-switch)
+ ((eq? action-name 'generalmeter) generalmeter)
+ ((eq? action-name 'header-end) header-end)
+ ((eq? action-name 'lily-def) lily-def)
+ ((eq? action-name 'header) header)
+ ((eq? action-name 'invoke-char) invoke-char)
+ ((eq? action-name 'invoke-dim1) invoke-dim1)
+ ((eq? action-name 'placebox) placebox)
+ ((eq? action-name 'rulesym) rulesym)
+ ((eq? action-name 'start-line) start-line)
+ ((eq? action-name 'stem) stem)
+ ((eq? action-name 'stop-line) stop-line)
+ (else (error "unknown tag -- PS-TEX " action-name))
+ )
-(define (volta-tex w last)
- (embedded-ps-tex ((ps-scm 'volta) w last)))
+ )
;;;;;;;;;;;; PS
(define (ps-scm action-name)
(define (text f s)
(string-append "(" s ") set" f " "))
-(define
- (unknown-tex)
- "%\n\\unknown%\n")
(define (volta w last)
(string-append
"draw_tuplet"))
+ (define (unknown)
+ "\n unknown\n")
+
; dispatch on action-name
(cond ((eq? action-name 'all-definitions)
- `(eval
+ `(begin
(define beam ,beam)
(define tuplet ,tuplet)
(define bracket ,bracket)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; output definitions
-(define
- (beam o width slope thick)
- ((invoke-output o "beam") width slope thick))
-
-(define
- (bracket o h)
- ((invoke-output o "bracket") h))
-
-(define
- (char o n)
- ((invoke-output o "invoke-char") "show" n))
-
-(define
- (crescendo o w h cont)
- ((invoke-output o "crescendo") w h cont))
-
-(define
- (dashed-slur o thick dash l)
- ((invoke-output o "dashed-slur") thick dash l))
-
-(define
- (decrescendo o w h cont)
- ((invoke-output o "decrescendo") w h cont))
-
-(define
- (doublebar o h)
- ((invoke-output o "invoke-dim1") "doublebar" h))
-
-(define
- (empty o)
- ((invoke-output o "empty")))
-
-(define
- (emptybar o h) (empty o))
-
-(define
- (end-output o)
- ((invoke-output o "end-output")))
-
-(define
- (experimental-on o)
- ((invoke-output o "experimental-on")))
-
-(define
- (fatdoublebar o h)
- ((invoke-output o "invoke-dim1") "fatdoublebar" h))
-
-(define
- (finishbar o h)
- ((invoke-output o "invoke-dim1") "finishbar" h))
-
-(define
- (font i)
- (string-append
- "font"
- (make-string 1 (integer->char (+ (char->integer #\A) i)))
- ))
-
-(define
- (font-def o i s)
- ((invoke-output o "font-def") i s))
-
-(define
- (font-switch o i)
- ((invoke-output o "font-switch") i))
-
-(define
- (generalmeter o num den)
- ((invoke-output o "generalmeter") num den))
-
-(define
- (header o creator generate)
- ((invoke-output o "header") creator generate))
-
-(define
- (header-end o)
- ((invoke-output o "header-end")))
-
-(define
- (invoke-output o s)
- (eval-string (string-append s "-" o)))
-
-(define
- (lily-def o key val)
- ((invoke-output o "lily-def") key val))
-
-(define
- (maatstreep o h)
- ((invoke-output o "invoke-dim1") "maatstreep" h))
-
-(define
- (pianobrace o i)
- ((invoke-output o "invoke-char") "pianobrace" i))
-
-(define
- (placebox o x y b)
- ((invoke-output o "placebox") x y (b o)))
-
-(define
- (repeatbar o h)
- ((invoke-output o "invoke-dim1") "repeatbar" h))
-
-(define
- (repeatbarstartrepeat o h)
- ((invoke-output o "invoke-dim1") "repeatbarstartrepeat" h))
-
-(define
- (rulesym o x y)
- ((invoke-output o "rulesym") x y))
-
-(define
- (setbold o s)
- ((invoke-output o "text") "bold" s))
-
-(define
- (setdynamic o s) (empty o))
-
-(define
- (setfinger o s)
- ((invoke-output o "text") "finger" s))
-
-(define
- (sethuge o s)
- ((invoke-output o "text") "huge" s))
-
-(define
- (setitalic o s)
- ((invoke-output o "text") "italic" s))
-
-(define
- (setlarge o s)
- ((invoke-output o "text") "large" s))
-
-(define
- (setLarge o s)
- ((invoke-output o "text") "Large" s))
-
-(define
- (setnumber o s)
- ((invoke-output o "text") "number" s))
-
-; urg, howto do all these sizes;
-; what about: fontjj fontj font fonti fontii
-(define
- (setnumber-1 o s)
- ((invoke-output o "text") "numberj" s))
-
-(define
- (settext o s)
- ((invoke-output o "text") "text" s))
-
-(define
- (settypewriter o s)
- ((invoke-output o "text") "typewriter" s))
-
-(define
- (slur o l)
- ((invoke-output o "slur") l))
-
-(define
- (tuplet o dx dy dir)
- ((invoke-output o "tuplet") dx dy dir))
-
-(define
- (stem o kern width height depth)
- ((invoke-output o "stem") kern width height depth))
-
-
-
-(define
- (start-line o)
- ((invoke-output o "start-line")))
-
-(define
- (startbar o h)
- ((invoke-output o "invoke-dim1") "startbar" h))
-
-(define
- (startrepeat o h)
- ((invoke-output o "invoke-dim1") "startrepeat" h))
-
-(define
- (stem o kern width height depth)
- ((invoke-output o "stem") kern width height depth))
-
-(define
- (stop-line o)
- ((invoke-output o "stop-line")))
-
-(define
- (stoprepeat o h)
- ((invoke-output o "invoke-dim1") "stoprepeat" h))
-
-(define
- (tuplet-ps dx dy dir)
- (string-append
- (numbers->string (list dx dy (inexact->exact dir)))
- "draw_tuplet"))
-
-(define
- (unknown o)
- ((invoke-output o "unknown")))
-
-(define
- (volta o w last)
- ((invoke-output o "volta") w last))
-
"bars" = \table {
"empty" "emptybar" 0
- "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "" "emptybar" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
"|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 16.0\pt
"||" "doublebar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt
"|." "finishbar" 1 -4.0\pt 0.0\pt 0.0\pt 16.0\pt
}
- "meters" = \table {
- "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- }
-
% dims ignored for this table
"param" = \table {
"brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 80.0\pt
"bars" = \table {
"empty" "emptybar" 0
- "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "" "emptybar" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
"|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
"||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
"|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
- "meters" = \table {
- "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- }
-
% dims ignored for this table
"param" = \table {
"bracket" "staffbracket" 1 0.0\pt 0.0\pt 20.0\pt 160.0\pt
Atom::Atom ()
: dim_ (Interval (0,0),Interval (0,0))
{
- /*
- urg
- We should probably make Atom an abstract base class to
- derive Ps_atom and Tex_atom from.
- But Atom is used as a simple type *everywhere*,
- and we don't have virtual contructors.
- */
str_ = "unknown\n";
origin_l_ = 0;
}
#define LILY_GUILE_HH
#include "config.hh"
+#include "string.hh"
#include <guile/gh.h>
#include <libguile.h>
+SCM ly_symbol (String name);
+
SCM ly_append (SCM a, SCM b);
SCM ly_eval (SCM a);
SCM ly_func_o (char const* name);
~Protected_scm ();
Protected_scm &operator = (Protected_scm const &);
operator SCM ();
+ SCM to_SCM () const;
};
#endif /* PROTECTED_SCM_HH */
return gh_list (a, SCM_UNDEFINED);
}
-SCM
-ly_quote ()
-{
- return gh_eval_str ("'quote");
-}
/*
scm_m_quote doesn't use any env, but needs one for a good signature in GUILE.
return gh_eval_str (buf);
}
+/*
+ See: libguile/symbols.c
+
+ SCM
+ scm_string_to_symbol(s)
+
+*/
+SCM
+ly_symbol (String name)
+{
+ return gh_car (scm_intern (name.ch_C(), name.length_i()));
+}
SCM
lambda_scm (String str, Array<int> args_arr)
SCM args_scm = SCM_EOL;
for (int i = args_arr.size () - 1; i >= 0; i--)
args_scm = gh_cons (gh_int2scm (args_arr[i]), args_scm);
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o (str.ch_l ()), args_scm)));
- return scm;
+ args_scm = gh_cons (ly_symbol (str.ch_l ()), args_scm);
+ return args_scm;
}
// scm_top_level_env(SCM_CDR(scm_top_level_lookup_closure_var)))
SCM args_scm = SCM_EOL;
for (int i = args_arr.size (); i--; )
args_scm = gh_cons (gh_str02scm (args_arr[i].ch_l ()), args_scm);
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o (str.ch_l ()), args_scm)));
- return scm;
+ args_scm = gh_cons (ly_symbol (str.ch_l ()), args_scm);
+ return args_scm;
}
SCM
for (int i = args_arr.size (); i--; )
args_scm = gh_cons (gh_double2scm (args_arr[i]), args_scm);
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o (str.ch_l ()), args_scm)));
- return scm;
+ args_scm = gh_cons (ly_symbol (str.ch_l ()), args_scm);
+ return args_scm;
}
/**
a.dim_[Y_AXIS] *= 1 / 1000.0;
Array<Real> arr;
arr.push (m.code ());
- a.lambda_ = (lambda_scm ("char", arr));
+
+
+ a.lambda_ = gh_list (ly_symbol ("char"),
+ gh_int2scm (m.code ()),
+ SCM_UNDEFINED);
a.str_ = "afm_find: " + s;
a.font_ = font_;
return a;
Array<Real> arr;
arr.push (h);
Atom a = (*symtables_p_) ("bars")->lookup (str);
- a.lambda_ = (lambda_scm (a.str_, arr));
- a.str_ = "bar";
+
+
+ a.lambda_ = gh_list (ly_symbol (a.str_.ch_C()),
+ gh_double2scm (h),
+ SCM_UNDEFINED);
+
+
a.dim_.y () = Interval (-h/2, h/2);
a.font_ = font_;
return a;
SCM
offset2scm (Offset o)
{
- return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]), SCM_UNDEFINED);
+ return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]),
+ SCM_UNDEFINED);
}
Atom
// (lambda (o) (dashed-slur o thick dash '(stuff))
a.lambda_ =
- gh_append2 (ly_lambda_o (),
- gh_list (gh_append2 (ly_func_o ("dashed-slur"),
- gh_cons (gh_double2scm (thick),
- gh_cons (gh_double2scm (dash),
- gh_list (ly_quote_scm (gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED)), SCM_UNDEFINED)))), SCM_UNDEFINED));
+ gh_list (ly_symbol ("dashed-slur"),
+ gh_double2scm (thick),
+ gh_double2scm (dash),
+ gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED),
+ SCM_UNDEFINED);
a.str_ = "dashed_slur";
return a;
Atom
Lookup::rule_symbol (Real height, Real width) const
{
- Atom a = (*symtables_p_) ("param")->lookup ("rule");
- Array<Real> arr;
- arr.push (height);
- arr.push (width);
- a.lambda_ = (lambda_scm (a.str_, arr));
- a.str_ = "rule_symbol";
+ Atom a;
+ a.lambda_ = gh_list (ly_symbol ("rulesym"),
+ gh_double2scm (height),
+ gh_double2scm (width),
+ SCM_UNDEFINED);
a.dim_.x () = Interval (0, width);
a.dim_.y () = Interval (0, height);
return a;
Array<Real> arr;
Real stem_width = paper_l_->get_var ("stemthickness");
- arr.push (-stem_width /2);
- arr.push (stem_width);
- arr.push (y2);
- arr.push (-y1);
- a.lambda_ = (lambda_scm ("stem", arr));
- a.str_ = "stem";
+ gh_list (ly_symbol ("stem"),
+ gh_double2scm(-stem_width /2),
+ gh_double2scm(stem_width),
+ gh_double2scm(y2),
+ gh_double2scm(-y1),
+ SCM_UNDEFINED);
+
a.font_ = font_;
return a;
}
arr.push (height);
arr.push (continued ? height/2 : 0);
String hairpin = String (decresc ? "de" : "") + "crescendo\n";
- a.lambda_ = (lambda_scm (hairpin, arr));
+ a.lambda_ = lambda_scm (hairpin, arr);
a.str_ = "hairpin";
a.dim_.x () = Interval (0, width);
a.dim_.y () = Interval (-2*height, 2*height);
return a;
}
+SCM
+array_to_list (SCM *a , int l)
+{
+ SCM list = SCM_EOL;
+ for (int i= l; i--; )
+ {
+ list = gh_cons (a[i], list);
+ }
+ return list;
+}
+
Atom
Lookup::slur (Array<Offset> controls) const
{
assert (controls.size () == 8);
-
Real dx = controls[3].x () - controls[0].x ();
Real dy = controls[3].y () - controls[0].y ();
Atom a;
scontrols[i] = offset2scm (controls[indices[i]]);
- a.lambda_ =
- gh_append2 (ly_lambda_o (),
- gh_list (gh_append2 (ly_func_o ("slur"),
- gh_list (ly_quote_scm (gh_list (scontrols[0],
- scontrols[1],
- scontrols[2],
- scontrols[3],
- scontrols[4],
- scontrols[5],
- scontrols[6],
- scontrols[7],
- SCM_UNDEFINED)),
- SCM_UNDEFINED)
- ),
- SCM_UNDEFINED)
- );
-
-
- a.str_ = "slur";
+ a.lambda_ =gh_list (ly_symbol ("slur"),
+ array_to_list (scontrols, 8),
+ SCM_UNDEFINED);
a.dim_[X_AXIS] = Interval (0, dx);
a.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
void
output_def (Paper_outputter* p, String key, String val)
{
- SCM args_scm =
- gh_cons (gh_str02scm (key.ch_l ()), gh_cons (gh_str02scm (val.ch_l ()), SCM_EOL));
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("lily-def"), args_scm)));
- p->output_scheme (scm);
+ SCM args_scm = gh_list (ly_symbol ("lily-def"),
+ gh_str02scm (key.ch_l ()),
+ gh_str02scm (val.ch_l ()), SCM_UNDEFINED);
+ p->output_scheme (args_scm);
}
void
output_settings (p);
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("experimental-on"), SCM_EOL)));
-
+ SCM scm = gh_list (ly_symbol ("experimental-on"), SCM_UNDEFINED);
p->output_scheme (scm);
-
- scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("header-end"), SCM_EOL)));
-
+ scm = gh_list (ly_symbol ("header-end"), SCM_UNDEFINED);
p->output_scheme (scm);
return p;
#include <time.h>
#include <fstream.h>
+
+#include "virtual-methods.hh"
#include "paper-outputter.hh"
#include "paper-stream.hh"
#include "molecule.hh"
Paper_outputter::~Paper_outputter ()
{
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("end-output"), SCM_EOL)));
-
+ SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED);
output_scheme (scm);
}
void
Paper_outputter::output_header ()
{
+ String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
+ gh_eval_str (s.ch_C());
+
+
String creator;
if (no_timestamps_global_b)
creator = "GNU LilyPond\n";
}
SCM args_scm =
- gh_cons (gh_str02scm (creator.ch_l ()),
- gh_cons (gh_str02scm (generate.ch_l ()), SCM_EOL));
+ gh_list (gh_str02scm (creator.ch_l ()),
+ gh_str02scm (generate.ch_l ()), SCM_UNDEFINED);
#ifndef NPRINT
DOUT << "output_header\n";
}
#endif
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("header"), args_scm)));
-
+ SCM scm = gh_cons (ly_symbol ("header"), args_scm);
output_scheme (scm);
}
a_off += o;
if (!i->lambda_)
- {
- // urg
- i->lambda_ = gh_append2 (ly_lambda_o (),
- ly_list1 (ly_func_o ("empty")));
- }
-
- switch_to_font (i->font_);
+ continue;
-#ifndef NPRINT
- if (check_debug && !monitor->silent_b ("Guile"))
+ if (check_debug)
{
- DOUT << i->str_ << "\n";
- gh_display (i->lambda_); gh_newline ();
+ output_comment (classname (i.ptr ()->origin_l_));
+
}
-#endif
+
+ switch_to_font (i->font_);
- SCM args_scm =
- gh_cons (gh_double2scm (a_off.x ()),
- gh_cons (gh_double2scm (a_off.y ()),
- gh_cons (i->lambda_, SCM_EOL)));
+ SCM args_scm = gh_list (gh_double2scm (a_off.x ()),
+ gh_double2scm (a_off.y ()),
+ i->lambda_.to_SCM (),
+ SCM_UNDEFINED);
-#ifndef NPRINT
- if (check_debug && !monitor->silent_b ("Guile"))
- {
- gh_display (args_scm); gh_newline ();
- }
-#endif
- SCM box_scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("placebox"), args_scm)));
+ SCM box_scm = gh_cons (ly_symbol ("placebox"), args_scm);
output_scheme (box_scm);
}
void
Paper_outputter::output_comment (String str)
{
- // urg
- *outstream_l_ << "% " << str << "\n";
+ if (String (output_global_ch) == "scm")
+ {
+ *outstream_l_ << "; " << str << '\n';
+ }
+ else
+ {
+ *outstream_l_ << "% " << str << "\n";
+ }
}
if (String (output_global_ch) == "scm")
{
static SCM port = 0;
+
// urg
if (!port)
{
int fd = 1;
- ofstream * of = dynamic_cast <ofstream*> (outstream_l_->os);
+ ofstream * of = dynamic_cast<ofstream*> (outstream_l_->os);
if (of)
fd = of->rdbuf()->fd();
FILE *file = fdopen (fd, "a");
port = scm_standard_stream_to_port (file, "a", "");
scm_display (gh_str02scm ("(load 'lily.scm)\n"), port);
- scm_display (gh_str02scm ("(define (of) 'ps)\n"), port);
- scm_display (gh_str02scm ("(define (of) 'tex)\n"), port);
}
- scm_display (gh_str02scm ("(display ((eval "), port);
+ scm_display (gh_str02scm ("("), port);
scm_write (scm, port);
- scm_display (gh_str02scm (") (of)))\n"), port);
- scm_newline (port);
+ scm_display (gh_str02scm (")\n"),port);
scm_fflush (port);
-
- return;
}
else
{
- SCM str_scm = gh_call1 (ly_eval (scm), gh_eval_str (o.ch_l ()));
- char* c = gh_scm2newstr (str_scm, NULL);
+ SCM result = scm_eval (scm);
+ char *c=gh_scm2newstr (result, NULL);
+
*outstream_l_ << c;
free (c);
}
void
Paper_outputter::start_line ()
{
- SCM scm =
- gh_append2 (ly_lambda_o (),
- gh_list (ly_func_o ("start-line"), SCM_UNDEFINED));;
-
+ SCM scm = gh_list (ly_symbol ("start-line"), SCM_UNDEFINED);
output_scheme (scm);
}
-/*
- 26 fonts ought to be enough for anyone.
-*/
void
Paper_outputter::output_font_def (int i, String str)
{
- //urg, broken with guile-1.3
- //return;
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("font-def"),
- gh_cons (gh_int2scm (i), gh_cons (gh_str02scm (str.ch_l ()), SCM_EOL)))));
-
+ SCM scm =gh_list (ly_symbol ("font-def"),
+ gh_int2scm (i),
+ gh_str02scm (str.ch_l ()),
+ SCM_UNDEFINED);
+
output_scheme (scm);
}
void
Paper_outputter::output_font_switch (int i)
{
- //urg, broken with guile-1.2, 1.3
- //return;
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("font-switch"),
- gh_cons (gh_int2scm (i), SCM_EOL))));
+ SCM scm = gh_list (ly_symbol ("font-switch"),
+ gh_int2scm (i),
+ SCM_UNDEFINED);
output_scheme (scm);
}
void
Paper_outputter::stop_line ()
{
- SCM scm =
- gh_append2 (ly_lambda_o (),
- ly_list1 (gh_append2 (ly_func_o ("stop-line"), SCM_EOL)));
-
+ SCM scm = gh_list (ly_symbol ("stop-line"), SCM_UNDEFINED);
output_scheme (scm);
current_font_ = "";
{
return object_;
}
+
+SCM
+Protected_scm::to_SCM () const
+{
+ return object_;
+}
%!PS-Adobe-1.0: lily.ps
+% 2 setlanguagelevel % hmm. auto_resize_dicts doesn't help either.
% round cappings
1 setlinecap
% transplant a TeX dimension into the PS output.
\def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\the\csname #1\endcsname) deftexdimen}}
+
{%
\def\par{ }% %Ugh. Don't try this at home, kids!
% neat file-include trick by Piet van Oostrum <piet@cs.uu.nl>
% stuff too early
%
\filedef\includelilyps{lily.ps}%
- \expandafter\special{! \includelilyps}
+ \expandafter\special{! \includelilyps }
}