use of com.xenoage.zong.musiclayout.notation.BeamNotation in project Zong by Xenoage.
the class BeamsSpacer method compute.
public Map<Beam, BeamSpacing> compute(Score score, Notations notations, FramesSpacing frames) {
Map<Beam, BeamSpacing> ret = map();
BeamIterator itB = new BeamIterator(score);
for (Beam beam : itB) {
MP mp = itB.getMp();
int staffLinesCount = score.getStaff(mp).getLinesCount();
val frame = frames.getFrame(mp.measure);
val system = frame.getSystem(mp.measure);
val beamNotation = (BeamNotation) notations.get(beam);
ret.put(beam, beamSpacer.compute(beamNotation, system, score));
}
return ret;
}
use of com.xenoage.zong.musiclayout.notation.BeamNotation in project Zong by Xenoage.
the class BeamNotator method compute.
@MaybeNull
public BeamNotation compute(Beam beam, Notations notations) {
// compute fragments
List<Fragments> fragments = beamFragmenter.compute(beam);
// get minimum stem length and gap
BeamRules beamRules = BeamRules.getRules(beam);
float gapIs = beamRules.getGapIs();
// collect chords
List<ChordNotation> chords = notations.getBeamChords(beam);
// create notation
BeamNotation beamNotation = new BeamNotation(beam, beam.getMP(), fragments, gapIs, chords);
return beamNotation;
}
Aggregations