@mudelafile{dots.fly}
Multiple measure rests do not collide with barlines and clefs. They
-are not expanded when you set @code{Score.SkipBars}. Although the
+are not expanded when you set @code{Score.skipBars}. Although the
multi-measure-rest is a Spanner, minimum distances are set to keep it
colliding from barlines.
@mudelafile{tie.ly}
+When tieing notes with accidentals across a bar boundary, the
+accidental must not be drawn on the note in the new bar.
+Instead, the next note of the same pitch in this bar should always show the
+accidental (even if it's natural).
+Well, and slurring a accidentaled note to a natural one across bar
+boundaries should be explicit...
+
+@mudelafile{tie-accidental.ly}
+
Beams can be typeset over fixed distance aligned staffs, beam
beautification doesn't really work, but knees do. Beams should be
behave well, wherever the switching point is.
--- /dev/null
+\include "paper16.ly"
+
+\score { \notes
+ \relative cis' {
+
+% \clef french; % same as octaviated bass
+\clef violin;
+\key cis \major; cis1 \key ces \major; ces
+\clef soprano;
+\key cis \major; cis \key ces \major; ces
+\clef mezzosoprano;
+\key cis \major; cis \key ces \major; ces
+\clef alto;
+\key cis \major; cis \key ces \major; ces
+\clef tenor;
+\key cis \major; cis \key ces \major; ces
+\clef baritone;
+\key cis \major; cis \key ces \major; ces
+\clef bass;
+\key cis \major; cis \key ces \major; ces
+}
+
+ \paper{\paper_sixteen}
+
+}
--- /dev/null
+
+\score { \notes
+ \relative cis' {
+
+\time 4/4;
+gis'2 gis ~ |
+gis gis4 gis |
+g2 gis ~ |
+gis g4 gis |
+g2 gis( |
+)g gis4 gis |
+}
flip (&align_dir_);
sort_elements ();
- Real interline= paper_l ()->get_realvar (interline_scm_sym);
+ Real interline= paper_l ()->get_var ("interline");
Link_array<Score_element> elems;
for (int i=0; i < elem_l_arr_.size(); i++)
SCM symbol_list = SCM_EOL;
Array<Real> dists;
- SCM current_origin = ly_ch_C_to_scm ("");
+ SCM current_origin = ly_str02scm ("");
for (int i=0; i <= elems.size (); i++)
{
Score_element *next_elt = i < elems.size ()
if (next_elt)
{
- next_origin = next_elt->get_elt_property (origin_scm_sym);
+ next_origin = next_elt->get_elt_property ("origin");
next_origin =
- (next_origin == SCM_BOOL_F)
- ? ly_ch_C_to_scm ("")
- : SCM_CDR (next_origin);
+ (next_origin == SCM_UNDEFINED)
+ ? ly_str02scm ("")
+ : next_origin;
}
else
- next_origin = ly_ch_C_to_scm ("begin-of-note");
+ next_origin = ly_str02scm ("begin-of-note");
SCM extra_space
= scm_eval (scm_listify (ly_symbol ("break-align-spacer"),
symbol_list = SCM_CDR (scm_reverse (symbol_list));
for (int i=0; i <elems.size()-1; i++)
{
- elems[i]->set_elt_property (SCM_CAR (symbol_list),
+ String sym_str = ly_scm2string (SCM_CAR (symbol_list));
+ elems[i]->set_elt_property (sym_str,
scm_cons (gh_double2scm (0),
gh_double2scm (dists[i+1])));
// urg
- SCM first_pair = elems[0]->get_elt_property (minimum_space_scm_sym);
- if (first_pair == SCM_BOOL_F)
+ SCM first_pair = elems[0]->get_elt_property ("minimum-space");
+ if (first_pair == SCM_UNDEFINED)
first_pair = gh_cons (gh_double2scm (0.0), gh_double2scm (0.0));
else
- first_pair = SCM_CDR (first_pair);
+ first_pair = first_pair;
scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
- elems[0]->set_elt_property (minimum_space_scm_sym, first_pair);
+ elems[0]->set_elt_property ("minimum-space", first_pair);
Axis_align_item::do_pre_processing();
Real stretch_distance =0.;
- if (SCM_CAR (symbol_list) == extra_space_scm_sym)
+ if (SCM_CAR (symbol_list) == gh_symbol2scm ("extra-space"))
{
spring_len += dists.top ();
stretch_distance = dists.top ();
}
- else if (SCM_CAR (symbol_list) == minimum_space_scm_sym)
+ else if (SCM_CAR (symbol_list) == gh_symbol2scm ("minimum-space"))
{
spring_len = spring_len >? dists.top ();
stretch_distance = spring_len;
The pairs are in the format of an interval (ie. CAR < CDR).
*/
- column_l ()->set_elt_property (extra_space_scm_sym,
+ column_l ()->set_elt_property ("extra-space",
scm_cons (gh_double2scm (pre_space),
gh_double2scm (spring_len)));
- column_l ()->set_elt_property (stretch_distance_scm_sym,
+ column_l ()->set_elt_property ("stretch-distance",
gh_cons (gh_double2scm (-dists[0]),
gh_double2scm (stretch_distance)));
void
Break_align_item::add_breakable_item (Item *it)
{
- SCM pr = it->remove_elt_property (break_priority_scm_sym);
+ SCM pr = it->remove_elt_property ("break-priority");
- if (pr == SCM_BOOL_F)
+ if (pr == SCM_UNDEFINED)
return;
- int priority = gh_scm2int (SCM_CDR (pr));
+ int priority = gh_scm2int (pr);
Score_element * column_l = get_elt_by_priority (priority);
Axis_group_item * hg=0;
warning bells about missing Y refpoints go off later on.
*/
hg->set_parent (this, Y_AXIS);
- hg->set_elt_property (ly_symbol ("origin"), ly_ch_C_to_scm (it->name ()));
+ hg->set_elt_property ("origin", ly_str02scm (it->name ()));
pscore_l_->typeset_element (hg);
add_element_priority (hg, priority);
hg->add_element (it);
}
+
#include <libguile.h>
#include "direction.hh"
-SCM ly_ch_C_to_scm (char const*c);
+SCM ly_str02scm (char const*c);
SCM ly_ch_C_eval_scm (char const*c);
SCM ly_symbol (String name);
String symbol_to_string (SCM);
void read_lily_scm_file (String);
void init_lily_guile ();
-#include "ly-symbols.hh"
+
void init_ly_protection ();
unsigned int ly_scm_hash (SCM s);
Key_item::Key_item ()
{
multi_octave_b_ = false;
- set_elt_property (breakable_scm_sym, SCM_BOOL_T);
+ set_elt_property ("breakable", SCM_BOOL_T);
set_c_position (0);
}
{
p -= 7; /* Typeset below c_position */
}
+ /* Provide for the four cases in which there's a glitch */
+ /* it's a hack, but probably not worth */
+ /* the effort of finding a nicer solution. dl. */
+ if (get_c_position ()==2 && a>0 && p==3)
+ p -= 7;
+ if (get_c_position ()==-3 && a>0 && p==-1)
+ p += 7;
+ if (get_c_position ()==-4 && a<0 && p==-1)
+ p += 7;
+ if (get_c_position ()==-2 && a<0 && p==-3)
+ p += 7;
return p + get_c_position ();
}
}
+
#include "debug.hh"
SCM
-ly_ch_C_to_scm (char const*c)
+ly_str02scm (char const*c)
{
// this all really sucks, guile should take char const* arguments!
return gh_str02scm ((char*)c);
Simple_file_storage f(s);
- return ly_ch_C_to_scm (f.ch_C());
+ return ly_str02scm (f.ch_C());
}
void
Item * support_l = support_l_arr_[i];
Note_req * note_l = mel_l_arr_[i];
- if (tied_l_arr_.find_l (support_l) &&
- !note_l->forceacc_b_)
- {
- if (!forget)
- local_key_.set (note_l->pitch_);
- continue;
- }
-
+ if (tied_l_arr_.find_l (support_l) && !forget)
+ local_key_.set (note_l->pitch_);
+
if (!note_l->forceacc_b_
&& local_key_.different_acc (note_l->pitch_))
continue;
announce_element (Score_element_info (key_item_p_, 0));
}
-
key_item_p_->add_pitch (note_l->pitch_,
- note_l->cautionary_b_);
+ note_l->cautionary_b_);
key_item_p_->add_support (support_l);
if (!forget)
SCM wg= get_property ("weAreGraceContext", 0);
bool selfgr = gh_boolean_p (wg) &&gh_scm2bool (wg);
- bool he_gr = info.elem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F;
+ bool he_gr = info.elem_l_->get_elt_property ("grace") != SCM_UNDEFINED;
Grace_align_item * gai = dynamic_cast<Grace_align_item*> (info.elem_l_);
if (he_gr && !selfgr && gai)
ADD_THIS_TRANSLATOR(Local_key_engraver);
+
{
create_items (mark_req_l_);
text_p_->text_str_ = mark_req_l_->str_;
- SCM st = gh_str02scm ((text_p_->text_str_.index_any_i ("0123456789") >= 0 )
+ SCM st = ly_str02scm ((text_p_->text_str_.index_any_i ("0123456789") >= 0 )
? "mark" : "large");
- text_p_->set_elt_property (style_scm_sym, st);
+ text_p_->set_elt_property ("style", st);
}
}
+
Time_description const *time = get_staff_info().time_C_;
mmrest_p_ = new Multi_measure_rest;
if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
- mmrest_p_->set_elt_property (alt_symbol_scm_sym,
- ly_ch_C_to_scm ("scripts-repeatsign"));
+ mmrest_p_->set_elt_property ("alt-symbol",
+ ly_str02scm ("scripts-repeatsign"));
announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_));
start_measure_i_ = time->bars_i_;
}
}
}
+
}
SCM args_scm =
- gh_list (ly_ch_C_to_scm (creator.ch_l ()),
- ly_ch_C_to_scm (generate.ch_l ()), SCM_UNDEFINED);
+ gh_list (ly_str02scm (creator.ch_l ()),
+ ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
#ifndef NPRINT
DEBUG_OUT << "output_header\n";
}
#endif
- SCM scm = gh_cons (header_scm_sym, args_scm);
+ SCM scm = gh_cons (gh_symbol2scm ("header"), args_scm);
output_scheme (scm);
}
if (i->font_)
{
output_scheme (gh_list (ly_symbol ("select-font"),
- ly_ch_C_to_scm (symbol_to_string (i->font_).ch_C()),
+ ly_str02scm (symbol_to_string (i->font_).ch_C()),
SCM (i->magn_),
SCM_UNDEFINED));
}
SCM box_scm
- = gh_list (placebox_scm_sym,
+ = gh_list (gh_symbol2scm ("placebox"),
gh_double2scm (a_off.x ()),
gh_double2scm (a_off.y ()),
SCM(i->func_),
{
SCM scm = gh_list (ly_symbol ("font-def"),
gh_int2scm (i),
- ly_ch_C_to_scm (str.ch_l ()),
+ ly_str02scm (str.ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- ly_ch_C_to_scm (k.ch_l ()),
- ly_ch_C_to_scm (to_str(v).ch_l ()),
+ ly_str02scm (k.ch_l ()),
+ ly_str02scm (to_str(v).ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- ly_ch_C_to_scm (k.ch_l ()),
- ly_ch_C_to_scm (v.ch_l ()),
+ ly_str02scm (k.ch_l ()),
+ ly_str02scm (v.ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
- gh_define (k.ch_l (), ly_ch_C_to_scm (v.ch_l ()));
+ gh_define (k.ch_l (), ly_str02scm (v.ch_l ()));
}
void
Paper_outputter::output_int_def (String k, int v)
{
SCM scm = gh_list (ly_symbol ("lily-def"),
- ly_ch_C_to_scm (k.ch_l ()),
- ly_ch_C_to_scm (to_str (v).ch_l ()),
+ ly_str02scm (k.ch_l ()),
+ ly_str02scm (to_str (v).ch_l ()),
SCM_UNDEFINED);
output_scheme (scm);
SCM scm = gh_list (ly_symbol ("stop-last-line"), SCM_UNDEFINED);
output_scheme (scm);
}
+
}
ss->set_victim (text);
- ss->set_elt_property (script_priority_scm_sym,
+ ss->set_elt_property ("script-priority",
gh_int2scm (200));
ss->dir_ = r->dir_;
text->text_str_ = r->text_str_;
if (r->style_str_.length_i ())
- text->set_elt_property (style_scm_sym, ly_ch_C_to_scm (r->style_str_.ch_C()));
+ text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
SCM empty = get_property ("textEmptyDimension", 0);
if (gh_boolean_p (empty) && gh_scm2bool (empty))
}
ADD_THIS_TRANSLATOR(Text_engraver);
+