feat: add mute and solo toggles for instruments

Closes #168
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-16 00:44:14 +03:00
parent 7b213bd8b0
commit 063b2c29c5
9 changed files with 106 additions and 9 deletions

View File

@ -168,11 +168,12 @@ func (v *Instruments) List() List {
return List{v}
}
func (v *Instruments) Item(i int) (name string, maxLevel float32, ok bool) {
func (v *Instruments) Item(i int) (name string, maxLevel float32, mute bool, ok bool) {
if i < 0 || i >= len(v.d.Song.Patch) {
return "", 0, false
return "", 0, false, false
}
name = v.d.Song.Patch[i].Name
mute = v.d.Song.Patch[i].Mute
start := v.d.Song.Patch.FirstVoiceForInstrument(i)
end := start + v.d.Song.Patch[i].NumVoices
if end >= vm.MAX_VOICES {