MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / applyPitchOffsets

Method applyPitchOffsets

packages/alphatab/src/model/ModelUtils.ts:93–106  ·  view source on GitHub ↗
(settings: Settings, score: Score)

Source from the content-addressed store, hash-verified

91 }
92
93 public static applyPitchOffsets(settings: Settings, score: Score): void {
94 for (let i: number = 0; i < score.tracks.length; i++) {
95 if (i < settings.notation.displayTranspositionPitches.length) {
96 for (const staff of score.tracks[i].staves) {
97 staff.displayTranspositionPitch = -settings.notation.displayTranspositionPitches[i];
98 }
99 }
100 if (i < settings.notation.transpositionPitches.length) {
101 for (const staff of score.tracks[i].staves) {
102 staff.transpositionPitch = -settings.notation.transpositionPitches[i];
103 }
104 }
105 }
106 }
107
108 /**
109 * Checks if the given string is a tuning inticator.

Callers 2

updateSettingsMethod · 0.80
_internalRenderTracksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected