(xml: string, settings: Settings)
| 160 | private _initialTempo: number = -1; |
| 161 | |
| 162 | public parseXml(xml: string, settings: Settings): void { |
| 163 | this._galleryObjects = new Map<string, DrawObject>(); |
| 164 | this._tieStarts = []; |
| 165 | this._tieStartIds = new Map<number, boolean>(); |
| 166 | this._voiceCounts = new Map<number, number>(); |
| 167 | this._slurs = new Map<Beat, SlurDrawObject>(); |
| 168 | this._crescendo = new Map<Beat, WedgeDrawObject>(); |
| 169 | this._isFirstSystem = true; |
| 170 | |
| 171 | const dom: XmlDocument = new XmlDocument(); |
| 172 | try { |
| 173 | dom.parse(xml); |
| 174 | } catch (e) { |
| 175 | throw new UnsupportedFormatError('Could not parse XML', e as Error); |
| 176 | } |
| 177 | |
| 178 | this._parseDom(dom); |
| 179 | |
| 180 | this._consolidate(); |
| 181 | |
| 182 | this.score.finish(settings); |
| 183 | } |
| 184 | |
| 185 | private _consolidate() { |
| 186 | ModelUtils.consolidate(this.score); |
no test coverage detected