| title | changeTrackMute | ||||||
|---|---|---|---|---|---|---|---|
| sidebar_custom_props |
|
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
Changes the given tracks to be muted or not. This will result in a muting of the primary and secondary midi channel that the track uses for playback. If the track shares the channels with another track, all tracks will be muted as during playback they cannot be distinguished.<Signature style="block" js={[["identifier","changeTrackMute"],["token","("],["identifier","tracks"],["token",":"],["whitespace"," "],["identifier","Track","/docs/reference/types/model/track"],["token","[]"],["token",","],["whitespace"," "],["identifier","mute"],["token",":"],["whitespace"," "],["identifier","boolean"],["token",")"],["token",":"],["whitespace"," "],["identifier","void"]]} csharp={[["keyword","void"],["whitespace"," "],["identifier","ChangeTrackMute"],["token","("],["identifier","IList","https://learn.microsoft.com/en-us/dotnet/api/system.collections.ilist"],["token","<"],["identifier","Track","/docs/reference/types/model/track"],["token",">"],["whitespace"," "],["identifier","tracks"],["token",","],["whitespace"," "],["identifier","bool"],["whitespace"," "],["identifier","mute"],["token",")"]]} kotlin={[["identifier","fun"],["whitespace"," "],["identifier","changeTrackMute"],["token","("],["identifier","tracks"],["token",":"],["whitespace"," "],["identifier","alphaTab.collections.List"],["token","<"],["identifier","Track","/docs/reference/types/model/track"],["token",">"],["token",","],["whitespace"," "],["identifier","mute"],["token",":"],["whitespace"," "],["identifier","Boolean"],["token",")"],["token",":"],["whitespace"," "],["identifier","Unit"]]} />
| Parameter | Summary |
|---|---|
| The list of track to mute or unmute. | |
| If set to true, the tracks will be muted. If false they are unmuted. |
<Tabs defaultValue="javascript" values={[ { label: "JavaScript", value: "javascript"}, { label: "C#", value: "csharp"}, { label: "Android", value: "android"} ]}
```js const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab')); api.changeTrackMute([api.score.tracks[0], api.score.tracks[1]], true); ``` ```cs var api = new AlphaTabApi(...); api.ChangeTrackMute(new Track[] { api.Score.Tracks[0], api.Score.Tracks[1] }, true); ``` ```kotlin val api = AlphaTabApi(...) api.changeTrackMute(alphaTab.collections.List(api.score.tracks[0], api.score.tracks[1]), true); ```