use of com.xenoage.zong.musicxml.types.MxlScoreInstrument in project Zong by Xenoage.
the class InstrumentsReader method readScoreInstruments.
private void readScoreInstruments() {
for (MxlScoreInstrument mxlScoreInstr : mxlScorePart.getScoreInstruments()) {
String id = mxlScoreInstr.getId();
Info info = new Info();
info.id = id;
info.name = checkNotNull(mxlScoreInstr.getInstrumentName());
info.abbreviation = mxlScoreInstr.getInstrumentAbbreviation();
infos.put(id, info);
}
}
use of com.xenoage.zong.musicxml.types.MxlScoreInstrument in project Zong by Xenoage.
the class InstrumentsReader method createInstruments.
private List<Instrument> createInstruments() {
List<Instrument> ret = alist();
for (MxlScoreInstrument mxlScoreInstr : mxlScorePart.getScoreInstruments()) {
Instrument instrument = readInstrument(getInfo(mxlScoreInstr.getId()));
ret.add(instrument);
}
// a default instrument with this transposition
if (ret.size() == 0 && partTranspose != Transpose.Companion.getNoTranspose()) {
PitchedInstrument instrument = new PitchedInstrument(mxlPart.getId(), 0);
instrument.setTranspose(partTranspose);
ret.add(instrument);
}
return ret;
}
Aggregations