changeTrackVolume
Description​
Changes the volume of the given tracks. This will result in a volume change of the primary and secondary midi channel that the track uses for playback. If the track shares the channels with another track, all related tracks will be changed as they cannot be distinguished.
- JavaScript
- C#
- Kotlin
Parameter | Summary |
---|---|
tracksAll | The tracks for which the volume should be changed. |
volumeAll | The volume to set for all tracks in percent (0-1) |
Examples​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.changeTrackVolume([api.score.tracks[0], api.score.tracks[1]], 1.5);
api.changeTrackVolume([api.score.tracks[2]], 0.5);
var api = new AlphaTabApi<MyControl>(...);
api.ChangeTrackVolume(new Track[] { api.Score.Tracks[0], api.Score.Tracks[1] }, 1.5);
api.ChangeTrackVolume(new Track[] { api.Score.Tracks[2] }, 0.5);
val api = AlphaTabApi<MyControl>(...);
api.changeTrackVolume(alphaTab.collections.List<alphaTab.model.Track>(api.score.tracks[0], api.score.tracks[1]), 1.5);
api.changeTrackVolume(alphaTab.collections.List<alphaTab.model.Track>(api.score.tracks[2]), 0.5);