+2002-08-04 Han-Wen <hanwen@cs.uu.nl>
+
+ * lily/lily-guile.cc: change gh_str02scm scm_makfrom0str.
+
+2002-08-04 Werner Lemberg <wl@gnu.org>
+
+ * tex/lilyponddefs.tex: s/filllastpage/lastpagefill/.
+
+ * Documentation/user/refman.itely: Document it.
+
2002-08-04 Han-Wen <hanwen@cs.uu.nl>
* lily/main.cc (sane_putenv): Oops. Should supply a private copy
@cindex @code{interscoreline}
@cindex @code{interscorelinefill}
+If the variable @code{lastpagefill} is defined (that is, it gets any
+value assigned in the @code{\paper} block), systems are evenly
+distributed vertically on the last page. This might produce ugly results
+in case there are not enough systems on the last page. Note that
+@command{lilypond-book} ignores @code{lastpagefill}. See
+@ref{Merging text and music with lilypond-book} for more information.
+
+@cindex @code{lastpagefill}
+
Page breaks are normally computed by @TeX{}, so they are not under
direct control of LilyPond. However, you can insert a commands into
the @file{.tex} output to instruct @TeX{} where to break pages. You
@end menu
Operating lilypond is done through text files: to print a piece of
-music, you enter the music in a file. When you run lilypond, that
-file is read, and after some computations, the program produces a file
-containing the sheet music that you can print or view.
+music, you enter the music in a file. When you run lilypond on that
+file, the program produces another file which contains sheet music that
+you can print or view.
This tutorial starts with a small introduction to the LilyPond music
language. After this first contact, we will show you how to run
@node First steps
@section First steps
-We tsart off with showing how very simple music is entered in
-LilyPond: you get a simple note by typing its note name, from
+We start off by showing how very simple music is entered in
+LilyPond: you get a note simply by typing its note name, from
@code{a} through @code{g}. So if you enter
@quotation
@example
@separate
A sharp (@texisharp{}) is made by adding ``@code{is}'', a flat
-(@texiflat{}) by adding ``@code{es}'':
+(@texiflat{}) by adding ``@code{es}''. As you would expect, a
+double-sharp or double-flat is made by adding ``@code{isis}'' or
+``@code{eses}'':
@quotation
@example
@c what is more common name treble or violin?
@c in Dutch, its violin.
+@c in English its definately treble.
@quotation
@example
-\clef violin
+\clef treble
\clef bass
\clef alto
\clef tenor
@end quotation
@separate
-From these commands and notes, a piece of music can be formed. A piece
-of music is made by enclosing it in ``@code{\notes @{ ... @}}''.
-LilyPond then knows that music follows (and not lyrics, for example):
+@c From these commands and notes, a piece of music can be formed. A piece
+@c of music is made by enclosing it in ``@code{\notes @{ ... @}}''.
+@c rephrased:
+With these commands you can now write a piece of music. The next step
+is to enclose your music inside ``@code{\notes @{ .. @}}''.
+This lets LilyPond know that music (and not lyrics, for example) follows:
@quotation
@example
@end quotation
@separate
-At this point, the piece of music is ready to be printed. This is done
-by combining the music with a printing command.
+Now the piece of music is almost ready to be printed. The final step is to
+combine the music with a printing command.
-The printing command is the so-called ``@code{\paper}'' block. You
-will see later that the @code{\paper} block is necessary to customize
+The printing command is the so-called ``@code{\paper}'' block. Later on
+you will see that the @code{\paper} block is used to customize
printing specifics. The music and the @code{\paper} block are combined by
enclosing them in ``@code{\score @{ ... @}}''. This is what a full
LilyPond source file looks like:
@node Running LilyPond
@section Running LilyPond
-In the last section, we explained what kind of things you could enter
-in a lilypond file. In this section we explain how to run LilyPond,
+In the last section we explained what kind of things you could enter
+in a lilypond file. In this section we explain how to run LilyPond
and how view or print the output. If you have not used LilyPond
-before, want to test your setup of LilyPond, or try to run an example
-file yourself, then read this section. The instructions that follow
+before, want to test your setup of LilyPond, or want to run an example
+file yourself, read this section. Most of the instructions that follow
are for running LilyPond on Unix-like systems. Some additional
instructions for running LilyPond on Windows are given at the end of
this section.
-You begin with opening a terminal window, and start up a text editor.
-For example, open an xterm and execute @code{joe}. In your text editor,
-enter the following input, and save the file as @file{test.ly}:
+Begin by opening a terminal window and starting a text editor.
+For example, you could open an xterm and execute @code{joe}. In your
+text editor, enter the following input and save the file as
+@file{test.ly}:
@quotation
@example
@quotation
@example
-GNU LilyPond 1.4.0
+GNU LilyPond 1.6.0
Now processing: `/home/fred/ly/test.ly'
Parsing...
Interpreting music...[1]
kghostview test.ps
@end example
@end quotation
-If you are satisfied with the looks of the music displayed on your
-screen, you can print the PS file by clicking File/Print inside
-ghostview.
+If the music on your screen looks good, you can print it by clicking
+File/Print inside ghostview.
The DVI file (@file{test.dvi}) contains the same sheet music in a
different format. DVI files are more easily processed by the computer,
-so viewing them usually is quicker. Execute @code{xdvi test.dvi} or
+so viewing them usually is quicker. You can run @code{xdvi test.dvi} or
@code{kdvi test.dvi} to view the DVI file. In Xdvi, the mouse buttons
-activate magnifying glasses. Unfortunately, variable symbols, such as
-beams and slurs won't show up in these.
+activate magnifying glasses. Unfortunately, variable symbols (such as
+beams and slurs) are not displayed in the magnifying glasses.
If your DVI viewer does not have a "Print" button, you can print the
file by executing @code{lpr test.ps}.
@cindex PostScript
@cindex PDF
-A final option, is to use the popular PDF format. You can get a PDF
-file by running @code{ly2dvi --pdf test.ly}. With the @code{--pdf},
-you will get a DVI, PS and PDF file. The viewers for the PS files also
+A final option is to use the popular PDF format. You can get a PDF
+file by running @code{ly2dvi --pdf test.ly}. With @code{--pdf}
+you will get DVI, PS and PDF files. Viewers for PS files also
accept PDF files, but there are also many other applications for
viewing PDF files.
-If you are familiar with @TeX{}, then one warning is in place: do not
-use other DVI drivers like @code{dvilj}. The @TeX{} coming out of
-LilyPond uses embedded PostScript code, and will not render correctly
-if you use anything different than @code{dvips}.
+If you are familiar with @TeX{}, be warned: do not use other
+DVI drivers like @code{dvilj}. The @TeX{} coming out of LilyPond
+uses embedded PostScript code and will not render correctly if
+you use anything other than @code{dvips}.
@cindex dvips
@cindex dvilj
@cindex DVI driver
@unnumberedsubsec Windows users
-Windows users start the terminal by clicking on the LilyPond or Cygwin
-icon. Notepad is sufficient for editing the LilyPond file. Viewing
-the PS file can be done with:
+Windows users can start the terminal by clicking on the LilyPond or
+Cygwin icons. You can use any text editor (such as Notepad) to edit
+the LilyPond file. Viewing the PS file can be done with:
@quotation
@example
@code{gsview32 test.ps}
@strong{SUMMARY}
-To run LilyPond, enter a file, and run the command @code{ly2dvi} on
-that file. The resulting files are either DVI or PostScript, and can
+To run LilyPond, input a text file, then run the command @code{ly2dvi} on
+that file. The resulting files are either DVI or PostScript, and can
be viewed with @code{xdvi} (unix) and ghostview (unix and windows)
-respectively. The following table summarizes the constructs that were
+respectively. The following table summarizes the constructs that were
discussed in the previous two sections.
@multitable @columnfractions .3 .3 .4
@c but we'd need to remove the ', from \key and tie
To raise a note by an octave, add a high quote @code{'} (apostrophe) to
the note name, to lower a note one octave, add a ``low quote'' @code{,}
-(a comma). The central C is @code{c'}:
+(a comma). Middle C is @code{c'}:
@quotation
@example
A tie is created by entering a tilde ``@code{~}'' between the notes to
be tied. A tie between two notes means that the second note must not be
-played separately, but just makes the first note sound longer:
+played separately; it just makes the first note sound longer:
@quotation
@lilypond[fragment,verbatim]
The solution is to use ``relative octave'' mode. In practice, this is
the most convenient way to copy existing music. To use relative mode,
add @code{\relative} before the piece of music. You must also give a
-note from which relative starts, in this case @code{c''}. If you type
-no octavation quotes, relative mode chooses the note that is closest
-to the previous one, which is often just the one you need.
+note from which relative starts, in this case @code{c''}. If you don't
+use octavation quotes (ie don't add ' or , after a note), relative mode
+chooses the note that is closest to the previous one. Since most music
+has small intervals, you can write quite a lot in relative mode without
+using octavation quotes.
@c don't use commas or quotes in this sentence
For example: @code{c f} goes up; @code{c g} goes down:
@end quotation
@separate
+
@c needed better, maybe even redundant explanation
+@c added another example below.
@c grappig: Pa vond het heel logies, en slim toen-i eenmaal begreep.
@c in eerste instantie drong het `relative' niet door zonder extra uitleg.
-You can make a large interval by adding octavation quotes. Note that
+You can make larger intervals by adding octavation quotes. Note that
quotes or commas do not determine the absolute height of a note;
the height of a note is relative to the previous one.
@c don't use commas or quotes in this sentence
@separate
+Here's an example of the difference between relative mode and
+``normal'' (non-relative) mode:
+
+@quotation
+@example
+\relative a @{
+\clef bass
+ a d a e d c' d'
+@}
+@end example
+
+@lilypond[fragment]
+\property Score.timing = ##f
+\property Staff.TimeSignature = \turnOff
+\relative a {
+\clef bass
+ a d a e d c' d'
+}
+@end lilypond
+@end quotation
+@separate
+
+@quotation
+@example
+\clef bass
+ a d a e d c' d'
+@end example
+
+@lilypond[fragment]
+\property Score.timing = ##f
+\property Staff.TimeSignature = \turnOff
+\clef bass
+ a d a e d c' d'
+@end lilypond
+@end quotation
+@separate
+
@strong{SUMMARY}
-The following table summarizes the syntax learned in this section.
+The following table summarizes the syntax learned so far in this section.
@multitable @columnfractions .3 .3 .4
example above) in a bunch of stacked staves.
@end ignore
-Of course, you can combine beams and ties with chords. Notice that
+You can combine beams and ties with chords. Notice that
beam and tie markings must be placed outside the chord markers:
@quotation
@lilypond[relative 0, fragment,verbatim]
When you want to combine chords with slurs and dynamics, technical
detail crops up: you have type these commands next to the notes, which
-means that they have to be inside the @code{< >}:
+means that they have to be inside the @code{< >}. Don't get confused
+by the chord @code{< >} and the dynamic @code{\< \>}!
@quotation
@end quotation
@separate
-There is one golden rule that you should keep in mind when writing
-LilyPond input:
-@quotation
-@strong{DO NOT START A PIECE WITH A CHORD}
-@end quotation
-Of course, it is a allowed, but the result might not be what you expect:
+@c this example is a bit too strongly worded -- there's nothing wrong
+@c with starting a piece with a chord; you just have to be careful when
+@c you do so. I've rephrased this example below.
+@c There is one golden rule that you should keep in mind when writing
+@c LilyPond input:
+@c @quotation
+@c @strong{DO NOT START A PIECE WITH A CHORD}
+@c @end quotation
+@c Of course, it is a allowed, but the result might not be what you expect:
+
+@c rephrased "don't start with a chord"
+There is one caution when using chords: if you use a chord at the very
+beginning of the piece, LilyPond might not understand what you want:
+
@quotation
@lilypond[verbatim,singleline]
\score { \notes <c'2 e'2> }
@end quotation
@separate
-If you have a piece that starts with a chord, then you must explicitly
+If you have a piece that begins with a chord, you must explicitly
state that the notes of the chord are to be put on the same staff, in
-the same voice. This is done by specifying @code{\context Staff} for
-the notes:
+the same voice. This is done by specifying @code{\context Staff} or
+@code{\context Voice} for the notes:
@quotation
@lilypond[verbatim,singleline]
@separate
-
@strong{SUMMARY}
@multitable @columnfractions .3 .3 .4
@end multitable
-You know the basic ingredients of a music file, so this is the right
-moment to try your at hand at doing it yourself: try to type some
+Now you know the basic ingredients of a music file, so this is the right
+moment to try your at hand at doing it yourself: try typing some
simple examples, and experiment a little.
-When you're comfortable with the basics, then you might want to read
-the rest of this chapter. It also a manual in tutorial-style, but it
+When you're comfortable with the basics, you might want to read
+the rest of this chapter. It continues in tutorial-style, but it
is much more in-depth, dealing with more advanced topics such as
-lyrics, chords, orchestral scores and parts, fine tuning output,
+lyrics, chords, orchestral scores and parts, fine tuning of output,
polyphonic music, and integrating text and music.
continue;
#endif
#if !STAT_MACROS_BROKEN
+
struct stat sbuf;
if (stat (path.to_str0 (), &sbuf) != 0)
continue;
-
+
if (S_ISDIR (sbuf.st_mode))
continue;
#endif
{
SCM sname = ly_symbol2scm (name.to_str0 ());
- SCM name_string = ly_str02scm (name.to_str0 ());
+ SCM name_string = scm_makfrom0str (name.to_str0 ());
SCM val;
All_font_metrics::find_tfm (String name)
{
SCM sname = ly_symbol2scm (name.to_str0 ());
- SCM name_string = ly_str02scm (name.to_str0 ());
+ SCM name_string = scm_makfrom0str (name.to_str0 ());
SCM val;
if (!tfm_p_dict_->try_retrieve (sname, &val))
// guh.
text_->set_grob_property ("text",
- ly_str02scm (to_string (gh_scm2int (bn)).to_str0 ()));
+ scm_makfrom0str (to_string (gh_scm2int (bn)).to_str0 ()));
}
}
if (Span_req * c = dynamic_cast<Span_req*> (m))
{
if (scm_equal_p (c->get_mus_property ("span-type"),
- ly_str02scm ("abort")) == SCM_BOOL_T)
+ scm_makfrom0str ("abort")) == SCM_BOOL_T)
{
reqs_drul_[START] = 0;
reqs_drul_[STOP] = 0;
beam_ = 0;
}
else if (scm_equal_p (c->get_mus_property ("span-type"),
- ly_str02scm ("beam")) == SCM_BOOL_T)
+ scm_makfrom0str ("beam")) == SCM_BOOL_T)
{
Direction d =c->get_span_dir ();
SCM properties = Font_interface::font_alist_chain (me);
- Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.to_str0 ()), properties);
+ Molecule tm = Text_item::text2molecule (me, scm_makfrom0str (str.to_str0 ()), properties);
the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0);
}
#endif
&& !to_boolean (s->get_grob_property ("full-size-change")))
{
str += "_change";
- s->set_grob_property ("glyph-name", ly_str02scm (str.to_str0 ()));
+ s->set_grob_property ("glyph-name", scm_makfrom0str (str.to_str0 ()));
}
}
else
Duration *r = (Duration *) ly_cdr (s);
scm_puts ("#<Duration ", port);
- scm_display (ly_str02scm (r->string ().to_str0 ()), port);
+ scm_display (scm_makfrom0str (r->string ().to_str0 ()), port);
scm_puts (" >", port);
return 1;
if (gh_string_p (s) || gh_pair_p (s))
{
cresc_->set_grob_property ("edge-text",
- gh_cons (s, ly_str02scm ("")));
+ gh_cons (s, scm_makfrom0str ("")));
daddy_trans_->set_property ((start_type + "Text").to_str0 (),
SCM_EOL);
}
s = get_property ("instrument");
if (!gh_string_p (s))
- s = ly_str02scm ("piano");
+ s = scm_makfrom0str ("piano");
SCM eq = get_property ("instrumentEqualizer");
{
figure_ = new Item (get_property ("BassFigure"));
announce_grob(figure_, rest_req_->self_scm()); // todo
- figure_->set_grob_property ("text" , ly_str02scm ("-"));
+ figure_->set_grob_property ("text" , scm_makfrom0str ("-"));
}
else if (figures_.size ())
{
scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, SCM_UNDEFINED), scm_current_error_port ());
scm_flush (scm_current_error_port ());
- return ly_str02scm ("cmr10");
+ return scm_makfrom0str ("cmr10");
}
doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL);
- SCM entry = gh_cons (ly_str02scm (varlist), ly_str02scm (doc));
+ SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
}
const char * vars)
{
SCM s = ly_symbol2scm (symbol);
- SCM d = ly_str02scm (descr);
+ SCM d = scm_makfrom0str (descr);
SCM l = parse_symbol_list (vars);
#endif
-/*
- We don't use gh_symbol2scm directly, since it has const-correctness
- problems in GUILE 1.3.4
-
- */
-SCM my_gh_symbol2scm (const char* x);
-
#ifdef CACHE_SYMBOLS
value = gh_symbol2scm ((char*) (x)); \
value; })
#else
-inline SCM ly_symbol2scm(char const* x) { return my_gh_symbol2scm((x)); }
+inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); }
#endif
}
<chords,notes,figures>{RESTNAME} {
const char *s = YYText ();
- yylval.scm = ly_str02scm (s);
+ yylval.scm = scm_makfrom0str (s);
return RESTNAME;
}
<chords,notes,figures>R {
/* yylval is union. Must remember STRING before setting SCM*/
String *sp = yylval.string;
- yylval.scm = ly_str02scm (sp->to_str0 ());
+ yylval.scm = scm_makfrom0str (sp->to_str0 ());
delete sp;
return STRING;
}
if (c == '{' || c == '}') // brace open is for not confusing dumb tools.
here_input ().warning (
_ ("Brace found at end of lyric. Did you forget a space?"));
- yylval.scm = ly_str02scm (s.to_str0 ());
+ yylval.scm = scm_makfrom0str (s.to_str0 ());
return STRING;
String msg (_f ("unknown escaped string: `\\%s'", str));
LexerError (msg.to_str0 ());
- yylval.scm = ly_str02scm (str.to_str0 ());
+ yylval.scm = scm_makfrom0str (str.to_str0 ());
return STRING;
}
}
}
- yylval.scm = ly_str02scm (str.to_str0 ());
+ yylval.scm = scm_makfrom0str (str.to_str0 ());
return STRING;
}
if (Span_req *req_ = dynamic_cast<Span_req*> (m))
{
if (scm_equal_p (req_->get_mus_property ("span-type"),
- ly_str02scm ("abort")) == SCM_BOOL_T)
+ scm_makfrom0str ("abort")) == SCM_BOOL_T)
{
reqs_drul_[START] = 0;
reqs_drul_[STOP] = 0;
ligature_ = 0;
}
else if (scm_equal_p (req_->get_mus_property ("span-type"),
- ly_str02scm ("ligature")) == SCM_BOOL_T)
+ scm_makfrom0str ("ligature")) == SCM_BOOL_T)
{
Direction d = req_->get_span_dir ();
reqs_drul_[d] = req_;
return ly_car (scm_last_pair (list));
}
-SCM
-ly_str02scm (char const*c)
-{
- // this all really sucks, guile should take char const* arguments!
- return gh_str02scm ((char*)c);
-}
-
SCM
ly_write2scm (SCM s)
")
{
- return ly_str02scm (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
+ return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
}
-/**
- Read a file, and shove it down GUILE. GUILE also has file read
- functions, but you can't fiddle with the path of those.
-
-
- TODO: JUNKME.
-*/
-void
-read_lily_scm_file (String fn)
-{
- gh_eval_str ((char *) gulp_file_to_string (fn).to_str0 ());
-}
-
extern "C" {
// maybe gdb 5.0 becomes quicker if it doesn't do fancy C++ typing?
void
if (verbose_global_b)
progress_indication ("\n");
- read_lily_scm_file ("lily.scm");
+
+
+ scm_primitive_load_path (scm_makfrom0str ("lily.scm"));
scm_set_current_module (last_mod);
}
cp = "list";
}
- return ly_str02scm (cp);
+ return scm_makfrom0str (cp);
}
/*
sprintf (str, "%d ", gh_scm2int (s));
}
- return ly_str02scm (str);
+ return scm_makfrom0str (str);
}
/*
LY_DEFINE(ly_unit, "ly-unit", 0, 0, 0, (),
"Return the unit used for lengths as a string.")
{
- return ly_str02scm (INTERNAL_UNIT);
+ return scm_makfrom0str (INTERNAL_UNIT);
}
LY_DEFINE(ly_verbose, "ly-verbose", 0, 0, 0, (),
return l;
}
-SCM my_gh_symbol2scm (const char* x)
-{
- return gh_symbol2scm ((char*)x);
-}
String
print_scm_val (SCM val)
Syllable_group *
Lyric_phrasing_engraver::lookup_context_id (const String &context_id)
{
- SCM key = ly_str02scm (context_id.to_str0 ());
+ SCM key = scm_makfrom0str (context_id.to_str0 ());
if (! gh_null_p (voice_alist_))
{
SCM s = scm_assoc (key, voice_alist_);
void
Lyric_phrasing_engraver::record_extender (const String &context_id, Grob * extender)
{
- SCM key = ly_str02scm (context_id.to_str0 ());
+ SCM key = scm_makfrom0str (context_id.to_str0 ());
if (! gh_null_p (voice_alist_))
{
SCM s = scm_assoc (key, voice_alist_);
{
String combine = String (key) + "=" + String (value);
char * s = strdup(combine.to_str0 ());
- // return putenv (s);
+ return putenv (s);
}
return -1;
}
{
setup_paths ();
- /* Prepare GUILE for heavy memory usage. If you have plenty memory,
- this may speed up GUILE a bit. If you're short on memory, these
- settings
+ /*
- export GUILE_INIT_SEGMENT_SIZE_1=36000
- export GUILE_MAX_SEGMENT_SIZE=576000
+ These settings hopefully prepare lily for a lot of memory usage.
- may considerably decrease memory footprint (~*0.85), with a small
- execution time penalty (~*1.10). However, if this 15% gain in memory
- usage prevents swapping, the execution time falls drastically. */
-
+ In practice the effect on GC times is barely measurable -- larger
+ segments cost slighly less time for the conservative marking. (but
+ not impressively much)
+
+ */
sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", false);
sane_putenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", false);
c++;
next = to_string (c);
}
- m = ly_str02scm (next.to_str0 ());
+ m = scm_makfrom0str (next.to_str0 ());
}
else
{
daddy_trans_->set_property ("rehearsalMark", m);
text_->set_grob_property ("text",
- ly_str02scm (t.to_str0 ()));
+ scm_makfrom0str (t.to_str0 ()));
String style = "mark-number";
for (int i=0; i < t.length (); i++)
{
if (scm_equal_p (sp->get_mus_property ("span-type"),
- ly_str02scm ("rest")) == SCM_BOOL_T)
+ scm_makfrom0str ("rest")) == SCM_BOOL_T)
{
if (sp->get_span_dir () == STOP)
{
if (measures > gh_scm2int (s))
{
Molecule s = Text_item::text2molecule (me,
- ly_str02scm (to_string (measures).to_str0 ()),
+ scm_makfrom0str (to_string (measures).to_str0 ()),
alist_chain);
s.align_to (X_AXIS, CENTER);
SCM_ASSERT_TYPE(m, mus, SCM_ARG1, __FUNCTION__ ,"music");
const char * nm = classname (m);
- return ly_str02scm (nm);
+ return scm_makfrom0str (nm);
}
LY_DEFINE(ly_music_list_p,"music-list?", 1, 0, 0,
s[0] = (pit->notename_ + 2)%7 + 'a';
s[0] = toupper (s[0]);
- SCM charstr = ly_str02scm (s);
+ SCM charstr = scm_makfrom0str (s);
SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
charstr,
else if (Span_req *req_ = dynamic_cast<Span_req*> (m))
{
if (scm_equal_p (req_->get_mus_property ("span-type"),
- ly_str02scm ("abort")) == SCM_BOOL_T)
+ scm_makfrom0str ("abort")) == SCM_BOOL_T)
{
in_ligature = 0;
}
else if (scm_equal_p (req_->get_mus_property ("span-type"),
- ly_str02scm ("ligature")) == SCM_BOOL_T)
+ scm_makfrom0str ("ligature")) == SCM_BOOL_T)
{
in_ligature = (req_->get_span_dir () == START);
}
if (s.length ())
{
Item * t = new Item (get_property ("NoteName"));
- t->set_grob_property ("text", ly_str02scm (s.to_str0 ()));
+ t->set_grob_property ("text", scm_makfrom0str (s.to_str0 ()));
announce_grob(t, reqs_[0]->self_scm());
texts_.push (t);
}
String r = to_string (Paper_column::get_rank (me));
SCM properties = Font_interface::font_alist_chain (me);
- Molecule t = Text_item::text2molecule (me, ly_str02scm (r.to_str0 ()),
+ Molecule t = Text_item::text2molecule (me, scm_makfrom0str (r.to_str0 ()),
properties);
t.align_to (X_AXIS, CENTER);
t.align_to (Y_AXIS, DOWN);
gh_define ("security-paranoia", SCM_BOOL_T);
}
- file_ = scm_open_file (ly_str02scm (name.to_str0 ()),
- ly_str02scm ("w"));
+ file_ = scm_open_file (scm_makfrom0str (name.to_str0 ()),
+ scm_makfrom0str ("w"));
SCM exp = scm_list_n (ly_symbol2scm ("find-dumper"),
- ly_str02scm (output_format_global.to_str0 ()),
+ scm_makfrom0str (output_format_global.to_str0 ()),
SCM_UNDEFINED);
output_func_ = scm_primitive_eval (exp);
generate = generate + to_string (' ' * (120 - generate.length ())>? 0) ;
String creator = "lelie";
- SCM args_scm = scm_list_n (ly_str02scm (creator.to_str0 ()),
- ly_str02scm (generate.to_str0 ()), SCM_UNDEFINED);
+ SCM args_scm = scm_list_n (scm_makfrom0str (creator.to_str0 ()),
+ scm_makfrom0str (generate.to_str0 ()), SCM_UNDEFINED);
SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm);
Paper_outputter::output_comment (String str)
{
output_scheme (scm_list_n (ly_symbol2scm ("comment"),
- ly_str02scm ((char*)str.to_str0 ()),
+ scm_makfrom0str ((char*)str.to_str0 ()),
SCM_UNDEFINED)
);
}
{
SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
- ly_str02scm (k.get_str0 ()),
- ly_str02scm (to_string (v).get_str0 ()),
+ scm_makfrom0str (k.get_str0 ()),
+ scm_makfrom0str (to_string (v).get_str0 ()),
SCM_UNDEFINED);
output_scheme (scm);
}
{
SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
- ly_str02scm (k.get_str0 ()),
- ly_str02scm (v.get_str0 ()),
+ scm_makfrom0str (k.get_str0 ()),
+ scm_makfrom0str (v.get_str0 ()),
SCM_UNDEFINED);
output_scheme (scm);
}
Paper_outputter::output_int_def (String k, int v)
{
SCM scm = scm_list_n (ly_symbol2scm ("lily-def"),
- ly_str02scm (k.get_str0 ()),
- ly_str02scm (to_string (v).get_str0 ()),
+ scm_makfrom0str (k.get_str0 ()),
+ scm_makfrom0str (to_string (v).get_str0 ()),
SCM_UNDEFINED);
output_scheme (scm);
}
Paper_outputter::write_header_field_to_file (String filename, SCM key, SCM value)
{
output_scheme (scm_list_n (ly_symbol2scm ("header-to-file"),
- ly_str02scm (filename.to_str0 ()),
+ scm_makfrom0str (filename.to_str0 ()),
ly_quote_scm (key), value,
SCM_UNDEFINED));
}
}
| output_def {
if (dynamic_cast<Paper_def*> ($1))
- THIS->lexer_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ());
+ THIS->lexer_->set_identifier (scm_makfrom0str ("$defaultpaper"), $1->self_scm ());
else if (dynamic_cast<Midi_def*> ($1))
- THIS->lexer_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ());
+ THIS->lexer_->set_identifier (scm_makfrom0str ("$defaultmidi"), $1->self_scm ());
}
| embedded_scm {
// junk value
SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor"));
SCM result = gh_call1 (func, $2);
- if (gh_equal_p ($2, ly_str02scm ("tremolo")))
+ if (gh_equal_p ($2, scm_makfrom0str ("tremolo")))
{
/*
we can not get durations and other stuff correct down the line, so we have to
scm_gc_unprotect_object ($3->self_scm ());
csm->set_mus_property ("context-type",$2);
- csm->set_mus_property ("context-id", ly_str02scm (""));
+ csm->set_mus_property ("context-id", scm_makfrom0str (""));
$$ = csm;
}
| E_LEFTSQUARE {
Span_req *l = new Span_req;
l->set_span_dir (START);
- l->set_mus_property ("span-type", ly_str02scm ("ligature"));
+ l->set_mus_property ("span-type", scm_makfrom0str ("ligature"));
l->set_spot (THIS->here_input ());
$$ = new Request_chord (SCM_EOL);
| E_RIGHTSQUARE {
Span_req *l = new Span_req;
l->set_span_dir (STOP);
- l->set_mus_property ("span-type", ly_str02scm ("ligature"));
+ l->set_mus_property ("span-type", scm_makfrom0str ("ligature"));
l->set_spot (THIS->here_input ());
$$ = new Request_chord (SCM_EOL);
$$ = csm;
$$->set_spot (THIS->here_input ());
- csm->set_mus_property ("context-type", ly_str02scm ("Score"));
+ csm->set_mus_property ("context-type", scm_makfrom0str ("Score"));
}
| PARTIAL duration_length {
Moment m = - unsmob_duration ($2)->length_mom ();
scm_gc_unprotect_object (p->self_scm ());
$$ =sp ;
- sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
+ sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score"));
}
| CLEF STRING {
SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties"));
scm_gc_unprotect_object (seq->self_scm ());
$$ =sp ;
- sp-> set_mus_property ("context-type", ly_str02scm ("Staff"));
+ sp-> set_mus_property ("context-type", scm_makfrom0str ("Staff"));
}
| TIME_T fraction {
Music * p1 = set_property_music (ly_symbol2scm ( "timeSignatureFraction"), $2);
TODO: should make alias TimingContext for Score
*/
- sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
+ sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score"));
}
;
| '[' {
Span_req*b= new Span_req;
b->set_span_dir (START);
- b->set_mus_property ("span-type", ly_str02scm ("beam"));
+ b->set_mus_property ("span-type", scm_makfrom0str ("beam"));
$$ =b;
| ']' {
Span_req*b= new Span_req;
b->set_span_dir ( STOP);
- b->set_mus_property ("span-type", ly_str02scm ("beam"));
+ b->set_mus_property ("span-type", scm_makfrom0str ("beam"));
$$ = b;
}
| BREATHE {
'(' {
Span_req* s= new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ( "slur"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "slur"));
s->set_spot (THIS->here_input());
}
| E_OPEN {
Span_req* s= new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur"));
s->set_spot (THIS->here_input());
}
| E_SMALLER {
Span_req*s =new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo"));
s->set_spot (THIS->here_input());
}
| E_BIGGER {
Span_req*s =new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ("decrescendo"));
+ s->set_mus_property ("span-type", scm_makfrom0str ("decrescendo"));
s->set_spot (THIS->here_input());
}
;
open_request_parens:
E_EXCLAMATION {
Span_req *s = new Span_req;
- s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo"));
s->set_spot (THIS->here_input());
$$ = s;
| ')' {
Span_req* s= new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ( "slur"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "slur"));
s->set_spot (THIS->here_input());
}
| E_CLOSE {
Span_req* s= new Span_req;
$$ = s;
- s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
+ s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur"));
s->set_spot (THIS->here_input());
}
;
String ds = to_string ($1);
Text_script_req* t = new Text_script_req;
SCM finger = ly_symbol2scm ("finger");
- t->set_mus_property ("text", ly_str02scm (ds.to_str0 ()));
+ t->set_mus_property ("text", scm_makfrom0str (ds.to_str0 ()));
t->set_mus_property ("text-type" , finger);
t->set_spot (THIS->here_input ());
$$ = t;
script_abbreviation:
'^' {
- $$ = gh_str02scm ("Hat");
+ $$ = scm_makfrom0str ("Hat");
}
| '+' {
- $$ = gh_str02scm ("Plus");
+ $$ = scm_makfrom0str ("Plus");
}
| '-' {
- $$ = gh_str02scm ("Dash");
+ $$ = scm_makfrom0str ("Dash");
}
| '|' {
- $$ = gh_str02scm ("Bar");
+ $$ = scm_makfrom0str ("Bar");
}
| '>' {
- $$ = gh_str02scm ("Larger");
+ $$ = scm_makfrom0str ("Larger");
}
| '.' {
- $$ = gh_str02scm ("Dot");
+ $$ = scm_makfrom0str ("Dot");
}
;
Span_req *sp2 = new Span_req;
sp1-> set_span_dir ( START);
sp2-> set_span_dir ( STOP);
- SCM r = ly_str02scm ("rest");
+ SCM r = scm_makfrom0str ("rest");
sp1->set_mus_property ("span-type", r);
sp2->set_mus_property ("span-type", r);
if (!abort_req)
{
abort_req = new Span_req;
- abort_req->set_mus_property ("span-type", ly_str02scm ("abort"));
+ abort_req->set_mus_property ("span-type", scm_makfrom0str ("abort"));
}
if (combine_b && combine_b != previously_combined_b)
p->bracket_ = 0;
}
if (scm_equal_p (s->get_mus_property ("span-type"),
- ly_str02scm (p->name_))==SCM_BOOL_T)
+ scm_makfrom0str (p->name_))==SCM_BOOL_T)
{
p->req_l_drul_[s->get_span_dir ()] = s;
return true;
for (Pedal_info*p = info_alist_; p->name_; p ++)
{
if (scm_equal_p (s->get_mus_property ("span-type"),
- ly_str02scm (p->name_)) == SCM_BOOL_T)
+ scm_makfrom0str (p->name_)) == SCM_BOOL_T)
{
p->req_l_drul_[s->get_span_dir ()] = s;
return true;
Pitch *r = (Pitch *) ly_cdr (s);
scm_puts ("#<Pitch ", port);
- scm_display (ly_str02scm (r->string ().to_str0 ()), port);
+ scm_display (scm_makfrom0str (r->string ().to_str0 ()), port);
scm_puts (" >", port);
return 1;
{
if (s != "" || (volta_found && !gh_string_p (wb)))
{
- daddy_trans_->set_property ("whichBar", ly_str02scm (s.to_str0 ()));
+ daddy_trans_->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
}
}
}
type = ".|.";
}
- gl = ly_str02scm (type.to_str0 ());
+ gl = scm_makfrom0str (type.to_str0 ());
if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl) != SCM_BOOL_T)
me->internal_set_grob_property (glyph_symbol, gl);
}
/*
UGH UGH
*/
- if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("brace"))
- && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket")))
+ if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str ("brace"))
+ && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str ("bracket")))
inf.grob_->translate_axis (-0.8, X_AXIS); // ugh
- else if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("bracket"))
- && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket")))
+ else if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str ("bracket"))
+ && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str ("bracket")))
{
inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh
inf.grob_->set_grob_property ("arch-height",
SCM gl = me->get_grob_property ("glyph");
if (scm_ilength (me->get_grob_property ("elements")) <= 1
- && gh_equal_p (gl,ly_str02scm ("bar-line")))
+ && gh_equal_p (gl,scm_makfrom0str ("bar-line")))
{
me->suicide ();
}
pscore_->outputter_->output_scheme (scm_list_n (ly_symbol2scm ("define-origin"),
- ly_str02scm (ip->file_string ().to_str0 ()),
+ scm_makfrom0str (ip->file_string ().to_str0 ()),
gh_int2scm (ip->line_number ()),
gh_int2scm (ip->column_number ()),
SCM_UNDEFINED));
SCM chain = Font_interface::font_alist_chain (me);
Molecule n = Text_item::text2molecule (me,
- ly_str02scm (to_string (num).to_str0 ()),
+ scm_makfrom0str (to_string (num).to_str0 ()),
chain);
Molecule d = Text_item::text2molecule (me,
- ly_str02scm (to_string (den).to_str0 ()),
+ scm_makfrom0str (to_string (den).to_str0 ()),
chain);
n.align_to (X_AXIS, CENTER);
d.align_to (X_AXIS, CENTER);
if (!gh_string_p (which))
which
= (now.main_part_ || now.main_part_ == last_moment_.main_part_)
- ? SCM_EOL : ly_str02scm ("|");
+ ? SCM_EOL : scm_makfrom0str ("|");
Moment mp = measure_position ();
bool start_of_measure = (last_moment_.main_part_ != now.main_part_&& !mp.main_part_ );
return existing;
Link_array<Translator_def> path
- = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.to_str0 ()), get_output_def ());
+ = unsmob_translator_def (definition_)->path_to_acceptable_translator (scm_makfrom0str ((char*)n.to_str0 ()), get_output_def ());
if (path.size ())
{
SCM_ASSERT_TYPE(tr, trans, SCM_ARG1, __FUNCTION__, "Context");
char const* nm = classname (tr);
- return ly_str02scm (nm);
+ return scm_makfrom0str (nm);
}
LY_DEFINE(ly_translator_description,
if (done_count_ <= alt_count_)
add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
- ly_str02scm (repstr.to_str0 ()), SCM_UNDEFINED));
+ scm_makfrom0str (repstr.to_str0 ()), SCM_UNDEFINED));
}
else
{
for (char const **p = eat_spanners; *p; p++)
{
- if (t == ly_str02scm (*p))
+ if (t == scm_makfrom0str (*p))
return true;
}
}
\fi
\def\EndLilyPondOutput{%
-\ifundefined{lilypondpaperfilllastpage}%
+\ifundefined{lilypondpaperlastpagefill}%
\vskip 0pt plus \lilypondpaperinterscorelinefill00 fill
\fi
\csname bye\endcsname}