| 159 | } |
| 160 | |
| 161 | public finish(settings: Settings, sharedDataBag: Map<string, unknown> | null = null): void { |
| 162 | if (!this.shortName) { |
| 163 | this.shortName = this.name; |
| 164 | if (this.shortName.length > Track._shortNameMaxLength) { |
| 165 | this.shortName = this.shortName.substr(0, Track._shortNameMaxLength); |
| 166 | } |
| 167 | } |
| 168 | for(const s of this.staves){ |
| 169 | s.finish(settings, sharedDataBag); |
| 170 | if(s.isPercussion){ |
| 171 | this.playbackInfo.program = 0; |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | public applyLyrics(lyrics: Lyrics[]): void { |
| 177 | for (const lyric of lyrics) { |