* Gets the fermata for a given beat. * @param beat The beat to get the fermata for. * @returns
(beat: Beat)
| 421 | * @returns |
| 422 | */ |
| 423 | public getFermata(beat: Beat): Fermata | null { |
| 424 | const fermataMap = this.fermata; |
| 425 | if (fermataMap === null) { |
| 426 | return null; |
| 427 | } |
| 428 | if (fermataMap.has(beat.playbackStart)) { |
| 429 | return fermataMap.get(beat.playbackStart)!; |
| 430 | } |
| 431 | if (beat.index === 0 && fermataMap.has(0)) { |
| 432 | return fermataMap.get(0)!; |
| 433 | } |
| 434 | return null; |
| 435 | } |
| 436 | |
| 437 | /** |
| 438 | * Adds the given sync point to the list of sync points for this bar. |