mirror of
https://github.com/vsariola/sointu.git
synced 2025-11-14 05:42:47 -05:00
fix(sointu): NumDelayLines did not take polyphony into account, resulting in panic
This commit is contained in:
2
patch.go
2
patch.go
@ -30,7 +30,7 @@ func (p Patch) NumDelayLines() int {
|
|||||||
for _, instr := range p {
|
for _, instr := range p {
|
||||||
for _, unit := range instr.Units {
|
for _, unit := range instr.Units {
|
||||||
if unit.Type == "delay" {
|
if unit.Type == "delay" {
|
||||||
total += len(unit.VarArgs)
|
total += len(unit.VarArgs) * instr.NumVoices
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user