(settings: Settings, sharedDataBag: Map<string, unknown> | null = null)
| 921 | } |
| 922 | |
| 923 | public finish(settings: Settings, sharedDataBag: Map<string, unknown> | null = null): void { |
| 924 | if ( |
| 925 | this.getAutomation(AutomationType.Instrument) === null && |
| 926 | this.index === 0 && |
| 927 | this.voice.index === 0 && |
| 928 | this.voice.bar.index === 0 && |
| 929 | this.voice.bar.staff.index === 0 |
| 930 | ) { |
| 931 | this.automations.push( |
| 932 | Automation.buildInstrumentAutomation(false, 0, this.voice.bar.staff.track.playbackInfo.program) |
| 933 | ); |
| 934 | } |
| 935 | |
| 936 | switch (this.graceType) { |
| 937 | case GraceType.OnBeat: |
| 938 | case GraceType.BeforeBeat: |
| 939 | const numberOfGraceBeats: number = this.graceGroup!.beats.length; |
| 940 | // set right duration for beaming/display |
| 941 | if (numberOfGraceBeats === 1) { |
| 942 | this.duration = Duration.Eighth; |
| 943 | } else if (numberOfGraceBeats === 2) { |
| 944 | this.duration = Duration.Sixteenth; |
| 945 | } else { |
| 946 | this.duration = Duration.ThirtySecond; |
| 947 | } |
| 948 | break; |
| 949 | } |
| 950 | |
| 951 | if (this.brushType === BrushType.None) { |
| 952 | this.brushDuration = 0; |
| 953 | } |
| 954 | |
| 955 | const tremolo = this.tremoloPicking; |
| 956 | if (tremolo !== undefined) { |
| 957 | if (tremolo.marks < TremoloPickingEffect.minMarks || tremolo.marks > TremoloPickingEffect.maxMarks) { |
| 958 | this.tremoloPicking = undefined; |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | const displayMode: NotationMode = !settings ? NotationMode.GuitarPro : settings.notation.notationMode; |
| 963 | let isGradual: boolean = this.text === 'grad' || this.text === 'grad.'; |
| 964 | if (isGradual && displayMode === NotationMode.SongBook) { |
| 965 | this.text = ''; |
| 966 | } |
| 967 | let needCopyBeatForBend: boolean = false; |
| 968 | this.minNote = null; |
| 969 | this.maxNote = null; |
| 970 | this.minStringNote = null; |
| 971 | this.maxStringNote = null; |
| 972 | let visibleNotes: number = 0; |
| 973 | let isEffectSlurBeat: boolean = false; |
| 974 | for (let i: number = 0, j: number = this.notes.length; i < j; i++) { |
| 975 | const note: Note = this.notes[i]; |
| 976 | note.dynamics = this.dynamics; |
| 977 | note.finish(settings, sharedDataBag); |
| 978 | if (note.isLetRing) { |
| 979 | this.isLetRing = true; |
| 980 | } |
nothing calls this directly
no test coverage detected