mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat(vm)!: implement cross-instrument modulation of all voices
The "auto" was misleading, as it meant self modulation when targetting a unit within instrument itself and just voice 0 when cross-instrument modulation. This feature changes the "auto" meaning "self" for instruments self-modulating, and "all" voices for cross-instrument modulations. "all" is implemented by compiling a single send into multiple repeated sends, with only the last popping the stack (if necessary). Closes #107
This commit is contained in:
parent
7ee43f199a
commit
8c8232f76e
6
patch.go
6
patch.go
@ -177,7 +177,11 @@ func (p Patch) ParamHintString(instrIndex, unitIndex int, param string) string {
|
||||
return fmt.Sprintf("%.2f", float32(value)/64-1)
|
||||
case "voice":
|
||||
if value == 0 {
|
||||
return "auto"
|
||||
targetIndex, _, err := p.FindSendTarget(unit.Parameters["target"])
|
||||
if err == nil && targetIndex != instrIndex {
|
||||
return "all"
|
||||
}
|
||||
return "self"
|
||||
}
|
||||
return fmt.Sprintf("%v", value)
|
||||
case "target":
|
||||
|
Reference in New Issue
Block a user