| 5 | import { ToggleButton } from './primitives/ToggleButton'; |
| 6 | |
| 7 | function pickTrackIcon(track: alphaTab.model.Track): IconNode { |
| 8 | if (track.playbackInfo.primaryChannel === 9 || track.staves[0]?.isPercussion) { |
| 9 | return Icons.TrackDrum; |
| 10 | } |
| 11 | const program = track.playbackInfo.program; |
| 12 | if (program >= 0 && program <= 7) { |
| 13 | // Acoustic Grand .. Clavi |
| 14 | return Icons.TrackPiano; |
| 15 | } |
| 16 | if ((program >= 52 && program <= 54) || program === 85) { |
| 17 | // Choir Aahs / Voice Oohs / Synth Voice / Lead 6 (voice) |
| 18 | return Icons.TrackVoice; |
| 19 | } |
| 20 | if (program >= 112 && program <= 119) { |
| 21 | // Percussive program range (Tinkle Bell .. Reverse Cymbal) |
| 22 | return Icons.TrackDrum; |
| 23 | } |
| 24 | return Icons.Track; |
| 25 | } |
| 26 | |
| 27 | injectStyles( |
| 28 | 'TrackItem', |