and not to us personally. See file(Documentation/links.yo) for more info.
-sect(DOZE)
+sect(WINDOWS 32)
If you have received this file as part of a DOS/Window32 distribution
(package()-*.zip), then it is advisable to also download the source
-pl 2.jcn2
+--- ../lilypond-1.1.2/NEWS Thu Nov 5 20:51:37 1998
+++ b/NEWS Fri Nov 6 00:10:46 1998
+@@ -1,6 +1,11 @@
+pl 2.hwn1
+ - scm cleanups, chop-decimal
+ - scarlatti clef.
+
+
+ pl 1.mb1
+ - Support for cautionary accidentals. , i.e. accidentals
+- within parantheses. Syntax: 'cis?'. Try input/test/accid.fly
+ within parentheses. Syntax: 'cis?'. Try input/test/accid.fly
+ Note that the font has changed.
+ - bf: No unnecessary warnings about time signatures
+ - Added optional second argument of \key. Set to \major or \minor pl 2.jcn2
pl 2.jcn1
- commented-out Level-2 PostScript in lily.ps (J. Buehler)
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=2
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=hwn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
{
push (s);
}
+
+String
+File_path::str () const
+{
+ String s;
+ for (int i=0; i< size (); i++)
+ {
+ s = s + elem (i);
+ if (i < size () -1 )
+ s += ":";
+ }
+ return s;
+}
/// add to end of path.
Array<String>::push;
+ String str ()const;
void add (String str);
void parse_path (String);
};
ScoreContext = \translator {
\type Score_engraver;
\name Score;
- defaultClef = violin;
+ defaultClef = treble;
\consists "Timing_engraver";
markScriptPadding = "4.0";
barColumnPriority = "-4";
markBreakPriority = "-4";
- defaultClef = violin;
+ defaultClef = treble;
\consists "Timing_engraver";
\consists "Bar_column_engraver";
(apply string-append
(map (lambda (n) (string-append (number->string n) " ")) l)))
+(define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
+
(define (number->octal-string x)
(let* ((n (inexact->exact x))
(n64 (quotient n 64))
(define
(number->dim-tex x)
(string-append
- (number->string x) "pt "))
+ (number->string (chop-decimal x)) "pt "))
(define
(control->string c)
--- /dev/null
+; lily.scm -- implement Scheme output routines for TeX and PostScript
+;
+; source file of the GNU LilyPond music typesetter
+;
+; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+
+; TODO
+; - naming
+; - ready ps code (draw_bracket) vs tex/ps macros/calls (pianobrace),
+; all preparations from ps,tex to scm
+
+;;; graphical lisp element
+(define (add-column p) (display "adding column (in guile): ") (display p) (newline))
+
+;;; library funtions
+(define
+ (numbers->string l)
+ (apply string-append
+ (map (lambda (n) (string-append (number->string n) " ")) l)))
+
+(define (number->octal-string x)
+ (let* ((n (inexact->exact x))
+ (n64 (quotient n 64))
+ (n8 (quotient (- n (* n64 64)) 8)))
+ (string-append
+ (number->string n64)
+ (number->string n8)
+ (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
+
+(define (inexact->string x radix)
+ (let ((n (inexact->exact x)))
+ (number->string n radix)))
+
+(define
+ (number->dim-tex x)
+ (string-append
+ (number->string x) "pt "))
+
+(define
+ (control->string c)
+ (string-append
+ (string-append (number->string (car c)) " ")
+ (string-append (number->string (cadr c)) " ")))
+
+(define
+ (embedded-ps-tex s)
+ (string-append "\\embeddedps{" s "}"))
+
+(define
+ (invoke-char-ps s i)
+ (string-append
+ "(\\" (inexact->string i 8) ") " s " " ))
+
+(define
+ (invoke-char-tex s i)
+ (string-append
+ "\n\\" s "{" (inexact->string i 10) "}" ))
+
+(define
+ (invoke-dim1-ps s d)
+ (string-append
+ (number->string d) " " s ))
+
+(define
+ (invoke-dim1-tex s d)
+ (string-append
+ "\n\\" s "{" (number->dim-tex d) "}"))
+
+(define
+ (invoke-output o s)
+ (eval-string (string-append s "-" o)))
+
+;;; output definitions
+
+(define
+ (beam o width slope thick)
+ ((invoke-output o "beam") width slope thick))
+
+(define
+ (beam-ps width slope thick)
+ (string-append
+ (numbers->string (list width slope thick)) " draw_beam " ))
+
+(define
+ (beam-tex width slope thick)
+ (embedded-ps-tex (beam-ps width slope thick)))
+
+(define
+ (bracket o h)
+ ((invoke-output o "bracket") h))
+
+(define
+ (bracket-ps h)
+ (invoke-dim1-ps "draw_bracket" h))
+
+(define
+ (bracket-tex h)
+ (embedded-ps-tex (bracket-ps h)))
+
+(define
+ (char o n)
+ ((invoke-output o "invoke-char") "show" n))
+
+(define
+ (dashed-slur o thick dash l)
+ ((invoke-output o "dashed-slur") thick dash l))
+
+(define
+ (dashed-slur-ps thick dash l)
+ (string-append
+ (apply string-append (map control->string l))
+ (number->string thick)
+ " [ "
+ (if (> 1 dash) (number->string (- (* thick dash) thick)) "0") " "
+ (number->string (* 2 thick))
+ " ] 0 draw_dashed_slur"))
+
+(define
+ (dashed-slur-tex thick dash l)
+ (embedded-ps-tex (dashed-slur-ps thick dash l)))
+
+(define
+ (doublebar o h)
+ ((invoke-output o "invoke-dim1") "doublebar" h))
+
+(define
+ (empty o)
+ ((invoke-output o "empty")))
+
+(define
+ (empty-ps)
+ "\n empty\n")
+
+(define
+ (empty-tex)
+ "%\n\\empty%\n")
+
+(define
+ (emptybar o h) (empty o))
+
+(define
+ (end-output o)
+ ((invoke-output o "end-output")))
+
+(define
+ (end-output-ps)
+ "\nshowpage\n")
+
+(define
+ (end-output-tex)
+ "\n\\EndLilyPondOutput")
+
+(define
+ (experimental-on o)
+ ((invoke-output o "experimental-on")))
+
+(define
+ (experimental-on-ps) "")
+
+(define
+ (experimental-on-tex) "\\turnOnExperimentalFeatures")
+
+(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))
+; (empty o))
+
+(define
+ (font-def-ps i s)
+ (string-append
+ "\n/" (font i) " {/"
+ (substring s 0 (- (string-length s) 3))
+ " findfont 12 scalefont setfont} bind def\n"))
+
+(define
+ (font-def-tex i s)
+ (string-append
+ "\\font" (font-switch-tex i) "=" s "\n"))
+
+(define
+ (font-switch o i)
+ ((invoke-output o "font-switch") i))
+
+(define
+ (font-switch-ps i)
+ (string-append (font i) " "))
+
+(define
+ (font-switch-tex i)
+ (string-append
+ "\\" (font i) "\n"))
+
+(define
+ (generalmeter o num den)
+ ((invoke-output o "generalmeter") num den))
+
+(define
+ (generalmeter-ps num den)
+ (string-append (number->string (inexact->exact num)) " " (number->string (inexact->exact den)) " generalmeter "))
+
+(define
+ (generalmeter-tex num den)
+ (string-append
+ "\\generalmeter{" (number->string (inexact->exact num)) "}{" (number->string (inexact->exact den)) "}"))
+
+(define
+ (header o creator generate)
+ ((invoke-output o "header") creator generate))
+
+(define
+ (header-ps creator generate)
+ (string-append
+ "%!PS-Adobe-3.0\n"
+ "%%Creator: " creator generate "\n"))
+
+(define
+ (header-tex creator generate)
+ (string-append
+ "%created by: " creator generate "\n"))
+
+(define
+ (header-end o)
+ ((invoke-output o "header-end")))
+
+(define
+ (header-end-ps) "")
+
+(define
+ (header-end-tex) "\\turnOnPostScript")
+
+(define
+ (lily-def o key val)
+ ((invoke-output o "lily-def") key val))
+
+(define
+ (lily-def-ps key val)
+ (string-append
+ "/" key " {" val "} bind def\n"))
+
+(define
+ (lily-def-tex key val)
+ (string-append
+ "\\def\\" key "{" val "}\n"))
+
+(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
+ (placebox-ps x y s)
+ (string-append
+ (number->string x) " " (number->string y) " {" s "} placebox "))
+
+(define
+ (placebox-tex x y s)
+ (string-append
+ "\\placebox{"
+ (number->dim-tex y) "}{" (number->dim-tex x) "}{" s "}"))
+
+(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
+ (rulesym-ps x y)
+ (string-append
+ (number->string x) " "
+ (number->string y) " "
+ "rulesym"))
+
+(define
+ (rulesym-tex x y)
+ (string-append
+ "\\rulesym{" (number->dim-tex x) "}{" (number->dim-tex 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))
+
+(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
+ (slur-ps l)
+ (string-append
+ (apply string-append (map control->string l))
+ " draw_slur"))
+
+(define
+ (slur-tex l)
+ (embedded-ps-tex (slur-ps l)))
+
+(define
+ (stem o kern width height depth)
+ ((invoke-output o "stem") kern width height depth))
+
+(define
+ (stem-ps kern width height depth)
+ (string-append (numbers->string (list kern width height depth))
+ "draw_stem" ))
+
+(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
+ (start-line o)
+ ((invoke-output o "start-line")))
+
+(define
+ (start-line-ps)
+ (string-append
+ (urg-fix-font-ps)
+ "\nstart_line {\n"))
+
+(define
+ (start-line-tex)
+ (string-append
+ (urg-fix-font-tex)
+ "\\hbox{%\n"))
+
+(define
+ (startrepeat o h)
+ ((invoke-output o "invoke-dim1") "startrepeat" h))
+
+(define
+ (stop-line o)
+ ((invoke-output o "stop-line")))
+
+(define
+ (stop-line-ps)
+ "}\nstop_line\n")
+
+(define
+ (stop-line-tex)
+ "}\\interscoreline")
+
+(define
+ (stoprepeat o h)
+ ((invoke-output o "invoke-dim1") "stoprepeat" h))
+
+(define
+ (text-ps f s)
+ (string-append "(" s ") set" f " "))
+
+(define
+ (text-tex f s)
+ (string-append "\\set" f "{" s "}"))
+
+(define
+ (urg-fix-font-ps)
+ "/fontA { /feta20 findfont 12 scalefont setfont} bind def fontA\n")
+
+(define
+ (urg-fix-font-tex)
+ "\\font\\fontA=feta20.afm\\fontA\n")
+
+(define
+ (urg-font-switch-ps i)
+ "\n/feta20 findfont 12 scalefont setfont \n")
+
Clef_engraver::Clef_engraver()
{
- clef_p_ = 0;
clef_req_l_ = 0;
clef_type_str_ = "";
c0_position_i_ = 0;
octave_dir_ = CENTER;
}
+struct Clef_settings {
+ char const *name;
+ char const *cleftype;
+ int position;
+} clef_settings[] = {
+ {"treble", "treble", -2},
+ {"violin", "treble", -2},
+ {"G", "treble", -2},
+ {"G2", "treble", -2},
+ {"scarlatti", "scarlatti", 0 },
+ {"french", "treble",-4 },
+ {"soprano", "alto",-4 },
+ {"mezzosoprano", "alto",-2 },
+ {"alto", "alto",0 },
+ {"tenor", "alto",2 },
+ {"baritone", "alto",4 },
+ {"varbaritone", "bass",0 },
+ {"bass" , "bass",2 },
+ {"F", "bass", 2},
+ {"subbass", "bass",4},
+ {0,0,0}
+};
+
+
+
+
/*
Ugh. Should have support for Dictionaries in mudela.
*/
}
else
octave_dir_ = CENTER;
- if (s == "treble" ||
- s == "violin" ||
- s == "G" || s == "G2")
- {
- clef_type_str_ = "violin";
- clef_position_i_ = -2;
- }
- else if (s == "french")
- {
- clef_type_str_ = "violin";
- clef_position_i_ = -4;
- }
- else if (s == "soprano")
- {
- clef_type_str_ = "alto";
- clef_position_i_ = -4;
- }
- else if (s == "mezzosoprano")
- {
- clef_type_str_ = "alto";
- clef_position_i_ = -2;
- }
- else if (s == "alto")
- {
- clef_type_str_ = "alto";
- clef_position_i_ = 0;
- }
- else if (s == "tenor")
- {
- clef_type_str_ = "alto";
- clef_position_i_ = 2;
- }
- else if (s == "baritone")
- {
- clef_type_str_ = "alto";
- clef_position_i_ = 4;
- }
- else if (s == "varbaritone")
- {
- clef_type_str_ = "bass";
- clef_position_i_ = 0;
- }
- else if (s == "bass" || s == "F")
- {
- clef_type_str_ = "bass";
- clef_position_i_ = 2;
- }
- else if (s == "subbass")
+
+ bool found = 0;
+ for (Clef_settings *c = clef_settings; !found && c->name; c++)
{
- clef_type_str_ = "bass";
- clef_position_i_ = 4;
- }
- else
+ if (c->name == s)
+ {
+ clef_type_str_ = c->cleftype;
+ clef_position_i_ = c->position;
+ found = 1;
+ }
+ }
+ if (!found)
{
switch(toupper (s[0]))
{
clef_type_str_ = "bass";
break;
case 'G':
- clef_type_str_ = "violin";
+ clef_type_str_ = "treble";
break;
case 'C':
clef_type_str_ = "alto";
}
clef_position_i_ = 2 * (s[1] - '0') - 6;
}
- if (clef_type_str_ == "violin")
+
+ if (clef_type_str_ == "treble")
c0_position_i_ = clef_position_i_ - 4;
else if (clef_type_str_ == "alto")
c0_position_i_ = clef_position_i_;
else if (clef_type_str_ == "bass")
c0_position_i_ = clef_position_i_ + 4;
+ else if (clef_type_str_ == "scarlatti")
+ c0_position_i_ = 0;
else
assert (false);
-
c0_position_i_ -= (int) octave_dir_ * 7;
{
create_clef();
if (!clef_req_l_)
- clef_p_->default_b_ = true;
+ for (int i=0; i < clef_p_arr_.size (); i++)
+ {
+ clef_p_arr_[i]->default_b_ = true;
+ }
+
}
/* ugh; should make Clef_referenced baseclass */
if (clef_type_str_.length_i ())
{
create_clef();
- clef_p_->default_b_ = false;
+ for (int i=0; i < clef_p_arr_.size (); i++)
+
+ clef_p_arr_[i]->default_b_ = false;
}
}
void
Clef_engraver::create_clef()
{
- if (!clef_p_)
+ if (clef_type_str_ == "scarlatti")
{
- clef_p_ = new Clef_item;
- clef_p_->break_priority_i_ = -2; // ugh
- announce_element (Score_element_info (clef_p_,clef_req_l_));
+ while (clef_p_arr_.size () < 2)
+ {
+ Clef_item *ct= new Clef_item;
+ ct->break_priority_i_ = -2; // UGH
+ announce_element (Score_element_info (ct, clef_req_l_));
+ clef_p_arr_.push (ct);
+ }
+ clef_p_arr_[0]->symbol_ = "treble";
+ clef_p_arr_[0]->y_position_i_ = 4;
+ clef_p_arr_[1]->symbol_ = "bass";
+ clef_p_arr_[1]->y_position_i_ = -4;
+ }
+ else
+ {
+ if (!clef_p_arr_.size ())
+ {
+ Clef_item *c= new Clef_item;
+ c->break_priority_i_ = -2; // ugh
+ announce_element (Score_element_info (c, clef_req_l_));
+ clef_p_arr_.push (c);
+ }
+
+ for (int i=0; i < clef_p_arr_.size (); i++)
+ {
+ clef_p_arr_[i]->symbol_ = clef_type_str_;
+ clef_p_arr_[i]->y_position_i_ = clef_position_i_;
+ clef_p_arr_[i]->octave_dir_ = octave_dir_;
+ }
}
- clef_p_->read (*this);
}
+
void
Clef_engraver::do_process_requests()
{
if (clef_req_l_)
{
create_clef();
- clef_p_->default_b_ = false;
+ for (int i=0; i < clef_p_arr_.size (); i++)
+ clef_p_arr_[i]->default_b_ = false;
}
}
void
Clef_engraver::do_pre_move_processing()
{
- if (clef_p_)
+ for (int i=0; i <clef_p_arr_.size (); i++)
{
- typeset_element (clef_p_);
- clef_p_ = 0;
+ typeset_element (clef_p_arr_[i]);
}
+ clef_p_arr_.clear ();
}
+
void
Clef_engraver::do_post_move_processing()
{
void
Clef_engraver::do_removal_processing()
{
- if (clef_p_)
+ if (clef_p_arr_.size ())
{
- clef_p_->unlink ();
- delete clef_p_;
- clef_p_ =0;
+ assert (false);
}
}
}
}
+/*
+ FIXME
+*/
Clef_item::Clef_item()
{
breakable_b_ =true;
default_b_ = false;
change_b_ = true;
octave_dir_ = CENTER;
- symbol_ = "violin";
+ symbol_ = "treble";
y_position_i_ = -2;
// Ugh: This should be const, I guess.
- octave_marker_td_p_.set_p (new Text_def());
+ octave_marker_td_p_.set_p (new Text_def());// UGH!
octave_marker_td_p_->text_str_ = "8";
octave_marker_td_p_->style_str_ = "italic";
}
-void
-Clef_item::read (Clef_engraver const &k)
-{
- symbol_ = k.clef_type_str_;
- y_position_i_ = k.clef_position_i_;
- octave_dir_ = k.octave_dir_;
-}
+
Molecule*
Clef_item::brew_molecule_p() const
/// where is c-0 in the staff?
class Clef_engraver : public Engraver {
- Clef_item *clef_p_;
+ Link_array<Clef_item> clef_p_arr_;
Clef_change_req * clef_req_l_;
void create_clef();
void read_req (Clef_change_req*);
DECLARE_MY_RUNTIME_TYPEINFO;
SCORE_ELEMENT_CLONE(Clef_item);
Clef_item();
- void read (Clef_engraver const&);
};
#endif // CLEFITEM_HH
#include "config.hh"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_LIBGUILE
-extern "C" {
-#include <guile/gh.h>
-}
-#else
-typedef long SCM;
-#endif
+#include <guile/gh.h>
+#include <libguile.h>
SCM ly_append (SCM a, SCM b);
SCM ly_eval (SCM a);
SCM ly_func_o (char const* name);
SCM ly_lambda_o ();
SCM ly_list1 (SCM a);
-SCM ly_list2(SCM a, SCM b);
SCM ly_quote ();
+SCM ly_quote_scm (SCM s);
-#ifdef __cplusplus
-}
-#endif
#include "array.hh"
#include "scalar.hh"
+
SCM lambda_scm (String str, Array<int> args_arr);
SCM lambda_scm (String str, Array<Real> args_arr);
SCM lambda_scm (String str, Array<Scalar> args_arr);
#ifndef PROTECTED_SCM_HH
#define PROTECTED_SCM_HH
-#include "lily-guile.hh"
+#include <guile/gh.h>
/*
Mix GUILE GC with C++ ctors and dtors.
source file of the GNU LilyPond music typesetter
(c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <stdio.h>
#include "lily-guile.hh"
#include "main.hh"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
SCM
ly_append (SCM a, SCM b)
{
}
SCM
-ly_list2(SCM a, SCM b)
+ly_quote ()
{
- return gh_call2 (gh_eval_str ("list"), a, b);
+ return gh_eval_str ("'quote");
}
SCM
-ly_quote ()
+ly_quote_scm (SCM s)
{
- return gh_eval_str ("'quote");
+ return gh_list (ly_quote (), s, SCM_UNDEFINED);
}
SCM
SCM
ly_func_o (char const* name)
{
- char buf[200];
+ char buf[200]; // ugh.
snprintf (buf, 200, "'(%s o)", name);
return gh_eval_str (buf);
}
-#ifdef __cplusplus
-}
-#endif
SCM
lambda_scm (String str, Array<int> args_arr)
return afm_find (String ("clefs") + String ("-") + st);
}
+SCM
+offset2scm (Offset o)
+{
+ return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]), SCM_UNDEFINED);
+}
+
Atom
Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
{
assert (controls.size () == 8);
-
- Real dx = controls[3].x () - controls[0].x ();
- Real dy = controls[3].y () - controls[0].y ();
+ Offset d = controls[3] - controls[0];
+
+ Real dx = d[X_AXIS];
+ Real dy = d[Y_AXIS];
Atom a;
a.font_ = font_;
a.dim_[X_AXIS] = Interval (0, dx);
a.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
- // (lambda (o) (dashed-slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2))))
- a.lambda_ = (
- ly_append (ly_lambda_o (),
- ly_list1 (ly_append (ly_func_o ("dashed-slur"),
- gh_cons (gh_double2scm (thick), gh_cons (gh_double2scm (dash),
- ly_list1 (ly_list2 (ly_quote (),
- gh_cons (ly_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
- SCM_EOL))))))))))));
+ SCM sc[4];
+ for (int i=0; i< 4; i++)
+ {
+ sc[i] = offset2scm (controls[i]);
+ }
+
+ // (lambda (o) (dashed-slur o thick dash '(stuff))
+ a.lambda_ = gh_list (gh_append3 (ly_lambda_o (),
+ ly_func_o ("dashed-slur"),
+ gh_list (gh_double2scm (thick),
+ gh_double2scm (dash),
+ ly_quote_scm (gh_list (sc[0], sc[1], sc[2], sc[3], SCM_UNDEFINED)),
+ SCM_UNDEFINED)
+ ), SCM_UNDEFINED);
a.str_ = "dashed_slur";
return a;
+ to_str (continued ? height/2 : 0) +
+ " draw_" + String (decresc ? "de" : "") + "cresc\n";
a.str_ = ps;
-
-
a.dim_.x () = Interval (0, width);
a.dim_.y () = Interval (-2*height, 2*height);
a.font_ = font_;
Lookup::plet (Real dy , Real dx, Direction dir) const
{
String ps;
-
-
+
ps += String_convert::double_str (dx) + " "
+ String_convert::double_str (dy) + " "
+ String_convert::int_str ( (int)dir) +
Real dx = controls[3].x () - controls[0].x ();
Real dy = controls[3].y () - controls[0].y ();
Atom a;
-
- // (lambda (o) (slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2) .. )))
- a.lambda_ = (
- ly_append (ly_lambda_o (),
- ly_list1 (ly_append (ly_func_o ("slur"),
- ly_list1 (ly_list2 (ly_quote (),
- gh_cons (ly_list2 (gh_double2scm (controls[5].x ()), gh_double2scm (controls[5].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[6].x ()), gh_double2scm (controls[6].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[7].x ()), gh_double2scm (controls[7].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[4].x ()), gh_double2scm (controls[4].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
- gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
- SCM_EOL))))))))))))));
+
+ SCM scontrols [8];
+ int indices[] = {5,6,7,4,1,2,3,0};
+
+ for (int i= 0; i < 8; i++)
+ 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.dim_[X_AXIS] = Interval (0, dx);
Paper_outputter::output_scheme (SCM scm)
{
String o = String ("\'") + output_global_ch;
-#ifndef NPRINT
- if (check_debug && !monitor->silent_b ("Guile"))
- {
- gh_display (scm); gh_newline ();
- }
-#endif
- // urg; temporary hack to debug scheme error #unknown
+
if (String (output_global_ch) == "scm")
{
static SCM port = 0;
port = scm_standard_stream_to_port (file, "a", "");
scm_display (gh_str02scm ("(load 'lily.scm)\n"), port);
}
-#if 0
- *outstream_l_ << "(display ((eval ";
- scm_write (scm, port);
- *outstream_l_ << ") 'tex))\n";
-#else
+
scm_display (gh_str02scm ("(display ((eval "), port);
scm_write (scm, port);
scm_display (gh_str02scm (") 'tex))\n"), port);
scm_newline (port);
scm_fflush (port);
-#endif
+
return;
}
- SCM str_scm = gh_call1 (ly_eval (scm), gh_eval_str (o.ch_l ()));
- char* c = gh_scm2newstr (str_scm, NULL);
-#ifndef NPRINT
- if (check_debug && !monitor->silent_b ("Guile"))
+ else
{
- gh_display (str_scm); gh_newline ();
+ SCM str_scm = gh_call1 (ly_eval (scm), gh_eval_str (o.ch_l ()));
+ char* c = gh_scm2newstr (str_scm, NULL);
+ *outstream_l_ << c;
+ free (c);
}
-#endif
- *outstream_l_ << c;
- free (c);
}
-
void
Paper_outputter::output_string (String str)
{
Paper_outputter::start_line ()
{
SCM scm =
- ly_append (ly_lambda_o (),
- ly_list1 (ly_append (ly_func_o ("start-line"), SCM_EOL)));
+ gh_append2 (ly_lambda_o (),
+ gh_list (ly_func_o ("start-line"), SCM_UNDEFINED));;
output_scheme (scm);
}
enddef;
-fet_beginchar("G clef", "violin", "violinclef")
+fet_beginchar("G clef", "treble", "trebleclef")
if test = 1:
draw_staff(-1,3);
fi;
draw_gclef((1.7 interline#,0), 1.0);
fet_endchar;
-fet_beginchar("G clef", "violin_change", "cviolinclef")
+fet_beginchar("G clef", "treble_change", "ctrebleclef")
draw_gclef((1.3 interline#,0), .8);
fet_endchar;