mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(tracker): loading preset did not update the ids
When a preset was loaded, its IDs were not updated, causing ID collisions in the song and send targets going wrong.
This commit is contained in:
parent
db2d9cac9d
commit
e09af5ab34
@ -29,6 +29,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
x87 stack.
|
x87 stack.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Loading a preset did not update the IDs of the newly loaded instrument,
|
||||||
|
causing ID collisions and sends target wrong units.
|
||||||
- The x87 native filter unit was denormalizing and eating up a lot of CPU ([#68][i68])
|
- The x87 native filter unit was denormalizing and eating up a lot of CPU ([#68][i68])
|
||||||
- Modulating delaytime in wasm could crash, because delay time was converted to
|
- Modulating delaytime in wasm could crash, because delay time was converted to
|
||||||
int with i32.trunc_f32_u. Using i32.trunc_f32_s fixed this.
|
int with i32.trunc_f32_u. Using i32.trunc_f32_s fixed this.
|
||||||
|
@ -145,7 +145,9 @@ func (m *Model) LoadPreset(index int) Action {
|
|||||||
for m.d.InstrIndex >= len(m.d.Song.Patch) {
|
for m.d.InstrIndex >= len(m.d.Song.Patch) {
|
||||||
m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy())
|
m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy())
|
||||||
}
|
}
|
||||||
m.d.Song.Patch[m.d.InstrIndex] = instrumentPresets[index].Copy()
|
newInstr := instrumentPresets[index].Copy()
|
||||||
|
(*Model)(m).assignUnitIDs(newInstr.Units)
|
||||||
|
m.d.Song.Patch[m.d.InstrIndex] = newInstr
|
||||||
}, allowed: func() bool {
|
}, allowed: func() bool {
|
||||||
return true
|
return true
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user