This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-07-06 22:31:53 +03:00
parent 57926d4b0e
commit 5a11b290a2
4 changed files with 30 additions and 91 deletions

View File

@ -157,6 +157,7 @@ func (m LoadPreset) Do() {
m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy())
}
newInstr := instrumentPresets[m.Index].Copy()
newInstr.NumVoices = clamp(m.d.Song.Patch[m.d.InstrIndex].NumVoices, 1, vm.MAX_VOICES)
m.Model.assignUnitIDs(newInstr.Units)
m.d.Song.Patch[m.d.InstrIndex] = newInstr
}