+pl 20.jcn1
+ - interstaff slurs v0: preludes-1.ly
+ - warnings for silly interbeam settings
+
pl 20
* fix: cello suites
+ * fix: petites preludes (rediculous dims)
+
* fix extender
+ * fix fingering 'a-5': font direction broken *again*
+
* fix braces
+ * multibar rests: SkipBars=0
+
* ly2dvi barfs on linewidth = -1.
* fix midi output.
* handle EOF graciously in error messages.
- * really centered whole rest
-
- * centered multi-bar-rest
-
* declare notenametab?
* midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=20
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
\paper{
\translator{
\GrandStaffContext
- minVerticalAlign = 2.5*\staffheight;
- maxVerticalAlign = 2.5*\staffheight;
+ minVerticalAlign = 3.0*\staffheight;
+ maxVerticalAlign = 3.0*\staffheight;
}
linewidth=-1.;
}
--- /dev/null
+\score{
+ \type GrandStaff <
+ \type Staff=one \notes\relative c'{
+ \stemup c8( c \translator Staff=two \stemup c )c
+ r2
+ \translator Staff=one
+ \stemdown c8( c \translator Staff=two \stemup c )c
+ r2
+ \stemdown c8( c \translator Staff=one \stemdown c )c
+ r2
+ \translator Staff=two
+ \stemup c8( c \translator Staff=one \stemdown c )c
+ r2
+ }
+ \type Staff=two \notes\relative c'{
+ \clef bass;
+ s1
+ s1
+ s1
+ s1
+ }
+ >
+ \paper{
+ % no slur damping
+ slur_slope_damping = 10.0;
+ \translator{
+ \GrandStaffContext
+ minVerticalAlign = 3.0*\staffheight;
+ maxVerticalAlign = 3.0*\staffheight;
+ }
+ linewidth=-1.;
+ }
+}
if (prop.isnum_b ())
beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
- // silly try at interstaff beam
// must set minVerticalAlign == maxVerticalAlign to get sane results
// see input/test/beam-interstaff.ly
prop = get_property ("minVerticalAlign", 0);
if (prop.isnum_b ())
- beam_p_->vertical_align_f_ = prop;
+ beam_p_->vertical_align_drul_[MIN] = prop;
prop = get_property ("maxVerticalAlign", 0);
if (prop.isnum_b ())
- {
- beam_p_->vertical_align_f_ += (Real)prop;
- beam_p_->vertical_align_f_ /= (Real)2;
- }
+ beam_p_->vertical_align_drul_[MAX] = prop;
announce_element (Score_element_info (beam_p_, reqs_drul_[START]));
}
damping_i_ = 1;
quantisation_ = NORMAL;
multiple_i_ = 0;
+ vertical_align_drul_[MIN] = 0;
+ vertical_align_drul_[MAX] = -1;
}
void
dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0;
dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
dash_i_ = 0;
+ interstaff_f_ = 0;
+ vertical_align_drul_[MIN] = 0;
+ vertical_align_drul_[MAX] = -1;
}
Molecule*
Molecule* mol_p = new Molecule;
mol_p->add_atom (a);
+ mol_p->translate_axis (-interstaff_f_, Y_AXIS);
return mol_p;
}
#include "note-column.hh"
#include "paper-def.hh"
#include "encompass-info.hh"
+#include "slur.hh"
+#include "staff-sym.hh"
+#include "debug.hh"
Encompass_info::Encompass_info ()
{
Real notewidth = paper->note_width () * 0.8;
Real internote = interline / 2;
- Stem* stem = note->stem_l_;
+ Stem* stem_l_ = note->stem_l_;
/*
set o_.x () to middle of notehead or on the exact position of stem,
according to slur direction
*/
- o_.x () = stem->hpos_f ();
+ o_.x () = stem_l_->hpos_f ();
/*
- stem->dir == dir
+ stem_l_->dir == dir
________
| | / \
x| x| |x |x
*/
- if (stem->dir_ != dir)
- o_.x () -= 0.5 * notewidth * stem->dir_;
+ if (stem_l_->dir_ != dir)
+ o_.x () -= 0.5 * notewidth * stem_l_->dir_;
- o_.y () = stem->extent (Y_AXIS)[dir];
+ o_.y () = stem_l_->extent (Y_AXIS)[dir];
/*
leave a gap: slur mustn't touch head/stem
*/
o_.y () += 2.5 * internote * dir;
- if (stem->dir_ != dir)
+ if (stem_l_->dir_ != dir)
o_.y () += 1.0 * internote * dir;
-}
+ Slur* slur_l_ = stem_l_->slur_l_;
+ if (slur_l_->encompass_arr_.size ()
+ && stem_l_->staff_sym_l_ != slur_l_->encompass_arr_[0]->stem_l_->staff_sym_l_)
+ {
+ if (stem_l_->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
+ {
+ slur_l_->interstaff_f_ = stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS)
+ - slur_l_->encompass_arr_[0]->stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS);
+ }
+ else
+ {
+ warning (_ ("invalid dimension cache: guessing staff position"));
+ if (slur_l_->vertical_align_drul_[MIN] !=
+ slur_l_->vertical_align_drul_[MAX])
+ warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
+ slur_l_->interstaff_f_ = slur_l_->vertical_align_drul_[MIN];
+ // urg, guess staff order:
+ // if our stem ends higher, our staff is probably lower...
+ if (stem_l_->chord_start_f () > slur_l_->encompass_arr_[0]->stem_l_->chord_start_f ())
+ slur_l_->interstaff_f_ *= -1;
+ }
+ o_.y () += slur_l_->interstaff_f_;
+ }
+}
int multiple_i_;
/// vertical align distance between staffs
- Real vertical_align_f_;
+ Drul_array<Real> vertical_align_drul_;
Array<Stem_info> sinfo_;
int dash_i_;
+ Real interstaff_f_;
+ Drul_array<Real> vertical_align_drul_;
protected:
virtual Molecule* do_brew_molecule_p () const;
DOWN=-1,
LEFT=-1,
RIGHT=1,
+ MIN=-1,
+ MAX=1,
CENTER=0,
SMALLER=-1,
BIGGER=1,
class Slur : public Bow
{
public:
- Link_array<Note_column> encompass_arr_;
- void add_column (Note_column*);
-
Slur ();
-
VIRTUAL_COPY_CONS(Score_element);
+
+ void add_column (Note_column*);
+ Link_array<Note_column> encompass_arr_;
protected:
virtual Array<Offset> get_encompass_offset_arr () const;
*/
Beam* beam_l_;
+ /// our slur (urg)
+ Slur* slur_l_;
+
Drul_array<int> beams_i_drul_;
/// maximum number of beams
Scalar prop = get_property ("slurdash", 0);
if (prop.isnum_b ())
s_p->dash_i_ = prop;
+
+ prop = get_property ("minVerticalAlign", 0);
+ if (prop.isnum_b ())
+ s_p->vertical_align_drul_[MIN] = prop;
+
+ prop = get_property ("maxVerticalAlign", 0);
+ if (prop.isnum_b ())
+ s_p->vertical_align_drul_[MAX] = prop;
+
requests_arr_.push (slur_req_l);
start_slur_l_arr_.push (s_p);
announce_element (Score_element_info (s_p, slur_req_l));
#include "main.hh"
-
Slur::Slur ()
{
}
if (!n->head_l_arr_.size ())
warning (_ ("Putting slur over rest."));
encompass_arr_.push (n);
+ n->stem_l_->slur_l_ = this;
add_dependency (n);
}
Encompass_info info (encompass_arr_[i], dir_);
notes.push (info.o_ - left);
}
+ d.y () += interstaff_f_;
notes.push (d);
return notes;
#include "lookup.hh"
#include "stem-info.hh"
#include "beam.hh"
+#include "staff-sym.hh"
Stem_info::Stem_info ()
{
if (beam_l_->sinfo_.size ()
&& stem_l_->staff_sym_l_ != beam_l_->sinfo_[0].stem_l_->staff_sym_l_)
{
- // hmm, perhaps silly now to have vertical_align in Beam
- interstaff_f_ = beam_l_->vertical_align_f_ / internote_f;
- // urg, guess staff order:
- // if our stem ends higher, our staff is probably lower...
- if (idealy_f_ * beam_dir_ > beam_l_->sinfo_[0].idealy_f_ * beam_dir_)
- interstaff_f_ *= -1;
+ if (stem_l_->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
+ {
+ interstaff_f_ = stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS)
+ - beam_l_->sinfo_[0].stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS) / internote_f;
+ }
+ else
+ {
+ warning (_ ("invalid dimension cache: guessing staff position"));
+ if (beam_l_->vertical_align_drul_[MIN] !=
+ beam_l_->vertical_align_drul_[MAX])
+ warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
+ interstaff_f_ = beam_l_->vertical_align_drul_[MIN] / internote_f;
+ // urg, guess staff order:
+ // if our stem ends higher, our staff is probably lower...
+ if (idealy_f_ * beam_dir_ > beam_l_->sinfo_[0].idealy_f_ * beam_dir_)
+ interstaff_f_ *= -1;
+ }
idealy_f_ += interstaff_f_ * beam_dir_;
miny_f_ += interstaff_f_ * beam_dir_;
maxy_f_ += interstaff_f_ * beam_dir_;
\version "1.0.14";
-one = \notes\relative c {
+% urg, this all changed and was never fixed
+% howto get rid of these ridiculous dimensions????
+% to view the output, subsitute 0.0 with 0.0 in the .tex file...
+
+% one = \type Voice=one \notes\relative c {
+% one = \notes\relative c {
+one = \type Staff=treble \notes\relative c {
\property Voice . textstyle = "italic"
r16\p_"legato"\< [g''-1( c-3 )e-5] r [g,-1( c )e]
r [g,( c )d] r [b-1( d-2 \!)g-5] |
r [a, c g'-5] r [a, c f!-4] |
% ugh arpeggio
<
- { \voiceone f4 r s }
- { \voicetwo <g,4 d'> r s }
+ { \voiceone f4 r }
+ { \voicetwo <g,4 d'> r }
>
\onevoice
+ % s
% ugh beam across staffs slur starts at lower staff
- r16 [g,-1( b d] |
- \voiceone
- )b s4 [g'16-1( b-2 d] )b s s s [f'-2 g-3 b-5 f-2] |
- \onevoice
+% r16 [g,-1( b d] |
+% \voiceone
+% )b s4 [g'16-1( b-2 d] )b s s s [f'-2 g-3 b-5 f-2] |
+% \onevoice
+ \translator Staff=bass\stemup
+ r16 [g,,-5( b-4 d ]
+ [f-1 \translator Staff=treble\stemdown g16-1 b d] | \stemup )b
+ \translator Staff=bass\stemdown
+ [g-5( b-4 d-2] f-1
+ \translator Staff=treble\stemup
+ [g16-1 b-2 d] )b
+ \translator Staff=bass\stemup
+ \clef "violin";
+ [g-4 b-2 d-1]
+ \stemup
+ % urg, below translator change affects previous beam too!?
+ % howto separate translator command from previous beam end?
+ \skip 4*0;
+ [\translator Staff=treble f-2 g-3 b-5 f-2] |
+ \stemboth
[e-1\f c'-5( g-3 f-2] [e-1 c'-5 g-3 e-2]
[)d c'-5( f,-3 e-2] [d-1 b'-5 f-3 d-2] |
[)c b'-5( e,-3 d-2] [c-1 a'-5 e-3 c-2]
[es-2 fis-3 a-4 c-5]
<
{ \voiceone r [c8 b16] }
- { \voicetwo [d,8 f-2] }
+ %%% urg urg ?{ \voicetwo [d,8 f-2] }
>
\onevoice |
<c1\mf g e>
\bar "|.";
}
-two = \notes\relative c{
+% two = \notes\relative c{
+% two = \type Voice=three \notes\relative c{
+two = \type Staff=bass \notes\relative c{
\property Voice . textstyle = "roman"
c4-5 e-3 g-\mordent^"(\\textsharp)" g,4 |
d'-\mordent-5 f-3 a-\mordent^"(\\textsharp)" a,4 |
f4-1 e d-3-\prall c |
g'-\mordent^"(\\textsharp)" g, g'-\mordent g, |
g'-\mordent g, g'-\mordent g, |
- % ugh f should be at upper staff
- g'-\mordent r r16 [g,-5( b-4 d] )f-1 s s s |
- s [g-5( b-4 d-2] )f-1 s s s s \clef "violin"; [g-4 b-2 d-1]
- s s s s \clef bass; |
+% % ugh f should be at upper staff
+% g'-\mordent r r16 [g,-5( b-4 d] )f-1 s s s |
+% g'-\mordent r r16 [g,-5( b-4 d \translator Staff=treble )f-1 ] s s s |
+% \translator Staff=bass
+% s [g-5( b-4 d-2] )f-1 s s s s \clef "violin"; [g-4 b-2 d-1]
+% s s s s \clef bass; |
+ g' r s s | s s s s \clef bass; |
<
- { \voiceone g,,1 ~ g ~ g ~ g ~ g ~ g ~ g }
- { \voicetwo g,1 ~ g ~ g ~ g ~ g ~ g ~ g }
+% { \voiceone g,,1 ~ g ~ g ~ g ~ g ~ g ~ g }
+% { \voicetwo g,1 ~ g ~ g ~ g ~ g ~ g ~ g }
+ { \voicethree g1 ~ g ~ g ~ g ~ g ~ g ~ g }
+ { \voicefour g,1 ~ g ~ g ~ g ~ g ~ g ~ g }
>
<c,1 c,>
\bar "|.";
\score{
% Moderato
\grand_staff
- \include "preludes-paper.ly";
+% \include "preludes-paper.ly";
+ \paper{
+ % no slur damping
+ slur_slope_damping = 10.0;
+ % linewidth= 193.\mm;
+ linewidth= 180.\mm;
+ gourlay_maxmeasures = 4.0;
+ \translator{
+ \GrandStaffContext
+ minVerticalAlign = 3.0*\staffheight;
+ maxVerticalAlign = 3.0*\staffheight;
+ }
+ }
\midi{ \tempo 4 = 80; }
\header {
opus = "BWV 924";