Skip to main content

changeTrackTranspositionPitch

since 1.4.0

Description​

Changes the pitch transpose applied to the given tracks. These pitches are additional to the ones applied to the song via the settings and data model and allows a more live-update via a UI.

Signatures​

function changeTrackVolume(tracks, semitones)JavaScript
void ChangeTrackVolume(Track[] tracks, double semitones).net
fun changeTrackVolume(tracks: alphaTab.collections.List<alphaTab.model.Track>, semitones: Double): UnitAndroid

Parameters​

ParametersTypeSummary
tracksJavaScriptalphaTab.model.Tracks[]

The array of tracks that should be changed.

tracks.netAlphaTab.Model.Tracks[]

The array of tracks that should be changed.

tracksAndroidalphaTab.collections.List<alphaTab.model.Track>

The array of tracks that should be changed.

semitonesAlldouble

The number of semitones to apply as pitch offset

Returns​

Nothing

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.changeTrackTranspositionPitch([api.score.tracks[0], api.score.tracks[1]], 3);
api.changeTrackTranspositionPitch([api.score.tracks[2]], 2);