elDirection.addAttribute(new Attribute("placement", "above"));
Element elDirectionType = new Element("direction-type");
Element elMetronome = new Element("metronome");
Element elBeatUnit = new Element("beat-unit");
// assume quarter note beat unit
elBeatUnit.appendChild("quarter");
Element elPerMinute = new Element("per-minute");
Integer iBPM = new Float(PPMtoBPM(tempo.getTempo())).intValue();
elPerMinute.appendChild(iBPM.toString());
// assemble all the pieces
elMetronome.appendChild(elBeatUnit);