10 Score::do_connect(PCol
*c1
, PCol
*c2
, Real d
)
12 Idealspacing
*sp
=pscore_
->get_spacing(c1
,c2
);
21 Score::connect_nonmus(PCol
* c1
, PCol
*c2
, Real d
)
23 if (c2
->used
&& c1
->used
) {
26 // alert! this is broken!
28 do_connect(c1
->postbreak
, c2
,d
);
31 do_connect(c1
, c2
->prebreak
,d
);
33 if (c1
->breakable
&&c2
->breakable
) {
34 do_connect(c1
->postbreak
, c2
->prebreak
,d
);
38 /* this needs A LOT of rethinking.
40 generate springs between columns.
43 Score::calc_idealspacing()
45 PCursor
<Score_column
*> sc(cols_
);
47 for (; sc
.ok(); sc
++) {
49 for (int i
=0; i
< sc
->durations
.sz(); i
++) {
50 Mtime d
= sc
->durations
[i
];
51 Real dist
= duration_to_idealspace(d
);
52 PCol
* c2
= find_col(sc
->when
+ d
,true)->pcol
;
53 connect_nonmus(sc
->pcol
, c2
, dist
);
54 c2
= find_col(sc
->when
+ d
,false)->pcol
;
55 connect_nonmus(sc
->pcol
, c2
, dist
);
57 else if (sc
->used()) { // ignore empty columns
58 PCol
* c2
= find_col(sc
->when
,true)->pcol
;
59 connect_nonmus(sc
->pcol
,c2
,0.0);