ScorePartwise root = new ScorePartwise();
root.setMovementTitle(score.getTitle());
int idx = 1;
for (Part part : score.getPartArray()) {
ScorePartDefinition def = new ScorePartDefinition();
def.setPartName(instrumentNames.get(part.getInstrument()));
def.setId("P" + idx);
root.getPartDefinitionList().add(def);
ScorePart xmlPart = new ScorePart();
xmlPart.setId(def.getId());
double currentMeasureSize = 0;
List<Note> partNotes = new ArrayList<Note>();
for (Phrase phrase : part.getPhraseArray()) {
partNotes.addAll(phrase.getNoteList());
}