11 Score::do_connect(PCol *c1, PCol *c2, Real d)
13 Idealspacing*sp=pscore_->get_spacing(c1,c2);
22 Score::connect_nonmus(PCol* c1, PCol *c2, Real d)
24 if (c2->used() && c1->used()) {
27 // alert! this is broken!
28 if (c1->breakable()) {
29 do_connect(c1->postbreak, c2,d);
31 if (c2->breakable()) {
32 do_connect(c1, c2->prebreak,d);
34 if (c1->breakable() &&c2->breakable()) {
35 do_connect(c1->postbreak, c2->prebreak,d);
39 /* this needs A LOT of rethinking.
41 generate springs between columns.
44 Score::calc_idealspacing()
46 PCursor<Score_column*> sc(cols_);
48 for (; sc.ok(); sc++) {
50 for (int i=0; i < sc->durations.sz(); i++) {
51 Real d = sc->durations[i];
52 Real dist = paper_->duration_to_dist(d);
53 PCol * c2 = find_col(sc->when + d,true)->pcol_;
54 connect_nonmus(sc->pcol_, c2, dist);
55 c2 = find_col(sc->when + d,false)->pcol_;
56 connect_nonmus(sc->pcol_, c2, dist);
58 else if (sc->used()) { // ignore empty columns
59 PCol * c2 = find_col(sc->when,true)->pcol_;
60 connect_nonmus(sc->pcol_, c2, 0.0);