()
| 895 | } |
| 896 | |
| 897 | public finishTuplet(): void { |
| 898 | const previousBeat: Beat | null = this.previousBeat; |
| 899 | let currentTupletGroup: TupletGroup | null = previousBeat ? previousBeat.tupletGroup : null; |
| 900 | if (this.hasTuplet || (this.graceType !== GraceType.None && currentTupletGroup)) { |
| 901 | if (!previousBeat || !currentTupletGroup || !currentTupletGroup.check(this)) { |
| 902 | currentTupletGroup = new TupletGroup(this.voice); |
| 903 | currentTupletGroup.check(this); |
| 904 | } |
| 905 | this.tupletGroup = currentTupletGroup; |
| 906 | } |
| 907 | |
| 908 | const barDuration = this.voice.bar.masterBar.calculateDuration(false); |
| 909 | const validBeatAutomations: Automation[] = []; |
| 910 | for (const automation of this.automations) { |
| 911 | if (automation.ratioPosition === 0) { |
| 912 | automation.ratioPosition = this.playbackStart / barDuration; |
| 913 | } |
| 914 | |
| 915 | // we store tempo automations only on masterbar level |
| 916 | if (automation.type !== AutomationType.Tempo) { |
| 917 | validBeatAutomations.push(automation); |
| 918 | } |
| 919 | } |
| 920 | this.automations = validBeatAutomations; |
| 921 | } |
| 922 | |
| 923 | public finish(settings: Settings, sharedDataBag: Map<string, unknown> | null = null): void { |
| 924 | if ( |
no test coverage detected