This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-07-04 15:05:49 +03:00
parent 4e295a3a2f
commit 3c6c24c6af
9 changed files with 206 additions and 67 deletions

View File

@ -176,6 +176,7 @@ func (m *Model) deriveParams(unit *sointu.Unit) []Parameter {
if !ok {
return ret
}
portIndex := 0
for i, up := range unitType {
if !up.CanSet && !up.CanModulate {
continue // skip parameters that cannot be set or modulated
@ -186,7 +187,12 @@ func (m *Model) deriveParams(unit *sointu.Unit) []Parameter {
if unit.Type == "send" && up.Name == "port" {
continue
}
ret = append(ret, Parameter{m: m, unit: unit, up: &unitType[i], vtable: &namedParameter{}})
q := 0
if up.CanModulate {
portIndex++
q = portIndex
}
ret = append(ret, Parameter{m: m, unit: unit, up: &unitType[i], vtable: &namedParameter{}, port: q})
}
if unit.Type == "oscillator" && unit.Parameters["type"] == sointu.Sample {
ret = append(ret, Parameter{m: m, unit: unit, vtable: &gmDlsEntryParameter{}})